Merge "MotionEvent: add test API to identify resampled events" into main
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index 6bd6c93..13bc512 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -12,13 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Aconfig declarations and libraries for the core framework
-java_defaults {
-    name: "framework-minus-apex-aconfig-libraries",
-
-    // Add java_aconfig_libraries to here to add them to the core framework
+filegroup {
+    name: "framework-minus-apex-aconfig-srcjars",
     srcs: [
         ":android.app.usage.flags-aconfig-java{.generated_srcjars}",
+        ":android.content.pm.flags-aconfig-java{.generated_srcjars}",
         ":android.os.flags-aconfig-java{.generated_srcjars}",
         ":android.os.vibrator.flags-aconfig-java{.generated_srcjars}",
         ":android.security.flags-aconfig-java{.generated_srcjars}",
@@ -28,9 +26,22 @@
         ":com.android.hardware.input-aconfig-java{.generated_srcjars}",
         ":com.android.text.flags-aconfig-java{.generated_srcjars}",
         ":telecom_flags_core_java_lib{.generated_srcjars}",
+        ":telephony_flags_core_java_lib{.generated_srcjars}",
         ":android.companion.virtual.flags-aconfig-java{.generated_srcjars}",
         ":android.view.inputmethod.flags-aconfig-java{.generated_srcjars}",
         ":android.widget.flags-aconfig-java{.generated_srcjars}",
+        ":com.android.media.flags.bettertogether-aconfig-java{.generated_srcjars}",
+        ":sdk_sandbox_flags_lib{.generated_srcjars}",
+    ],
+}
+
+// Aconfig declarations and libraries for the core framework
+java_defaults {
+    name: "framework-minus-apex-aconfig-libraries",
+
+    // Add java_aconfig_libraries to here to add them to the core framework
+    srcs: [
+        ":framework-minus-apex-aconfig-srcjars",
     ],
     // Add aconfig-annotations-lib as a dependency for the optimization
     libs: ["aconfig-annotations-lib"],
@@ -58,6 +69,13 @@
     defaults: ["framework-minus-apex-aconfig-java-defaults"],
 }
 
+// Telephony
+java_aconfig_library {
+    name: "telephony_flags_core_java_lib",
+    aconfig_declarations: "telephony_flags",
+    defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
 // Window
 aconfig_declarations {
     name: "com.android.window.flags.window-aconfig",
@@ -214,3 +232,28 @@
     defaults: ["framework-minus-apex-aconfig-java-defaults"],
 }
 
+// Package Manager
+aconfig_declarations {
+    name: "android.content.pm.flags-aconfig",
+    package: "android.content.pm",
+    srcs: ["core/java/android/content/pm/*.aconfig"],
+}
+
+java_aconfig_library {
+    name: "android.content.pm.flags-aconfig-java",
+    aconfig_declarations: "android.content.pm.flags-aconfig",
+    defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
+// Media BetterTogether
+aconfig_declarations {
+    name: "com.android.media.flags.bettertogether-aconfig",
+    package: "com.android.media.flags",
+    srcs: ["media/java/android/media/flags/media_better_together.aconfig"],
+}
+
+java_aconfig_library {
+    name: "com.android.media.flags.bettertogether-aconfig-java",
+    aconfig_declarations: "com.android.media.flags.bettertogether-aconfig",
+    defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
diff --git a/OWNERS b/OWNERS
index 6c25324..4e5c7d8 100644
--- a/OWNERS
+++ b/OWNERS
@@ -28,7 +28,7 @@
 # Support bulk translation updates
 per-file */res*/values*/*.xml = byi@google.com, delphij@google.com
 
-per-file **.bp,**.mk = hansson@google.com, joeo@google.com
+per-file **.bp,**.mk = hansson@google.com, joeo@google.com, lamontjones@google.com
 per-file TestProtoLibraries.bp = file:platform/platform_testing:/libraries/health/OWNERS
 per-file TestProtoLibraries.bp = file:platform/tools/tradefederation:/OWNERS
 
diff --git a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
index 66c1efc..24d815f 100644
--- a/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
+++ b/apex/jobscheduler/framework/java/android/os/PowerExemptionManager.java
@@ -420,7 +420,7 @@
     public static final int REASON_SYSTEM_EXEMPT_APP_OP = 327;
 
     /**
-     * Granted by {@link com.android.server.pm.PackageArchiverService} to the installer responsible
+     * Granted by {@link com.android.server.pm.PackageArchiver} to the installer responsible
      * for unarchiving an app.
      *
      * @hide
diff --git a/apex/jobscheduler/service/java/com/android/server/tare/Agent.java b/apex/jobscheduler/service/java/com/android/server/tare/Agent.java
index dcc324d..5c60562 100644
--- a/apex/jobscheduler/service/java/com/android/server/tare/Agent.java
+++ b/apex/jobscheduler/service/java/com/android/server/tare/Agent.java
@@ -75,7 +75,7 @@
     private static final String ALARM_TAG_AFFORDABILITY_CHECK = "*tare.affordability_check*";
 
     private final Object mLock;
-    private final Handler mHandler;
+    private final AgentHandler mHandler;
     private final Analyst mAnalyst;
     private final InternalResourceService mIrs;
     private final Scribe mScribe;
@@ -992,6 +992,7 @@
     void tearDownLocked() {
         mCurrentOngoingEvents.clear();
         mBalanceThresholdAlarmQueue.removeAllAlarms();
+        mHandler.removeAllMessages();
     }
 
     @VisibleForTesting
@@ -1290,6 +1291,11 @@
                 break;
             }
         }
+
+        void removeAllMessages() {
+            removeMessages(MSG_CHECK_ALL_AFFORDABILITY);
+            removeMessages(MSG_CHECK_INDIVIDUAL_AFFORDABILITY);
+        }
     }
 
     @GuardedBy("mLock")
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp
index e481fe9..3fb6961 100644
--- a/api/StubLibraries.bp
+++ b/api/StubLibraries.bp
@@ -33,7 +33,10 @@
         "android-non-updatable-stubs-defaults",
         "module-classpath-stubs-defaults",
     ],
-    args: metalava_framework_docs_args,
+    srcs: [
+        ":framework-minus-apex-aconfig-srcjars",
+    ],
+    args: metalava_framework_docs_args + "--error UnflaggedApi ",
     check_api: {
         current: {
             api_file: ":non-updatable-current.txt",
@@ -47,6 +50,7 @@
         api_lint: {
             enabled: true,
             new_since: ":android.api.public.latest",
+            baseline_file: ":non-updatable-lint-baseline.txt",
         },
     },
     dists: [
@@ -73,7 +77,8 @@
     "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
     "\\)"
 
-test = " --show-annotation android.annotation.TestApi"
+test = " --show-annotation android.annotation.TestApi" +
+    " --hide UnflaggedApi" // TODO(b/297362755): TestApi lint doesn't ignore existing APIs.
 
 module_libs = " --show-annotation android.annotation.SystemApi\\(" +
     "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index f2d0efe..89776db 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -1834,7 +1834,7 @@
             fn.c_str());
         return nullptr;
     }
-    ZipFileRO *zip = ZipFileRO::open(fn);
+    ZipFileRO *zip = ZipFileRO::open(fn.c_str());
     if (zip == nullptr) {
         SLOGE("Failed to open animation zip \"%s\": %s",
             fn.c_str(), strerror(errno));
diff --git a/cmds/idmap2/idmap2/Lookup.cpp b/cmds/idmap2/idmap2/Lookup.cpp
index 3704b4a..34d9179 100644
--- a/cmds/idmap2/idmap2/Lookup.cpp
+++ b/cmds/idmap2/idmap2/Lookup.cpp
@@ -94,7 +94,7 @@
       const ResStringPool* pool = am->GetStringPoolForCookie(value.cookie);
       out->append("\"");
       if (auto str = pool->string8ObjectAt(value.data); str.ok()) {
-        out->append(*str);
+        out->append(str->c_str());
       }
     } break;
     default:
diff --git a/cmds/incidentd/src/IncidentService.cpp b/cmds/incidentd/src/IncidentService.cpp
index e70748e8..5ebf3e2 100644
--- a/cmds/incidentd/src/IncidentService.cpp
+++ b/cmds/incidentd/src/IncidentService.cpp
@@ -567,7 +567,7 @@
                 fprintf(out, "Not enough arguments for section\n");
                 return NO_ERROR;
             }
-            int id = atoi(args[1]);
+            int id = atoi(args[1].c_str());
             int idx = 0;
             while (SECTION_LIST[idx] != NULL) {
                 const Section* section = SECTION_LIST[idx];
diff --git a/core/api/Android.bp b/core/api/Android.bp
index 71a2ca2..907916a 100644
--- a/core/api/Android.bp
+++ b/core/api/Android.bp
@@ -38,6 +38,11 @@
 }
 
 filegroup {
+    name: "non-updatable-lint-baseline.txt",
+    srcs: ["lint-baseline.txt"],
+}
+
+filegroup {
     name: "non-updatable-system-current.txt",
     srcs: ["system-current.txt"],
 }
diff --git a/core/api/current.txt b/core/api/current.txt
index 8de8ab8..6c6784e 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -9681,22 +9681,22 @@
   public final class VirtualDevice implements android.os.Parcelable {
     method public int describeContents();
     method public int getDeviceId();
-    method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) @NonNull public int[] getDisplayIds();
+    method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") @NonNull public int[] getDisplayIds();
     method @Nullable public String getName();
     method @Nullable public String getPersistentDeviceId();
-    method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public boolean hasCustomSensorSupport();
+    method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public boolean hasCustomSensorSupport();
     method public void writeToParcel(@NonNull android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.companion.virtual.VirtualDevice> CREATOR;
   }
 
   public final class VirtualDeviceManager {
-    method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) @Nullable public android.companion.virtual.VirtualDevice getVirtualDevice(int);
+    method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") @Nullable public android.companion.virtual.VirtualDevice getVirtualDevice(int);
     method @NonNull public java.util.List<android.companion.virtual.VirtualDevice> getVirtualDevices();
-    method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public void registerVirtualDeviceListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
-    method @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public void unregisterVirtualDeviceListener(@NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
+    method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public void registerVirtualDeviceListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
+    method @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public void unregisterVirtualDeviceListener(@NonNull android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener);
   }
 
-  @FlaggedApi(Flags.FLAG_VDM_PUBLIC_APIS) public static interface VirtualDeviceManager.VirtualDeviceListener {
+  @FlaggedApi("android.companion.virtual.flags.vdm_public_apis") public static interface VirtualDeviceManager.VirtualDeviceListener {
     method public default void onVirtualDeviceClosed(int);
     method public default void onVirtualDeviceCreated(int);
   }
@@ -15096,7 +15096,7 @@
     method public int getByteCount();
     method @NonNull public android.graphics.Color getColor(int, int);
     method @Nullable public android.graphics.ColorSpace getColorSpace();
-    method @NonNull public android.graphics.Bitmap.Config getConfig();
+    method @Nullable public android.graphics.Bitmap.Config getConfig();
     method public int getDensity();
     method @Nullable public android.graphics.Gainmap getGainmap();
     method public int getGenerationId();
@@ -17653,9 +17653,13 @@
 package android.graphics.text {
 
   public final class LineBreakConfig {
+    method @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public int getHyphenation();
     method public int getLineBreakStyle();
     method public int getLineBreakWordStyle();
     method @NonNull public android.graphics.text.LineBreakConfig merge(@NonNull android.graphics.text.LineBreakConfig);
+    field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_DISABLED = 0; // 0x0
+    field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_ENABLED = 1; // 0x1
+    field @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final int HYPHENATION_UNSPECIFIED = -1; // 0xffffffff
     field public static final int LINE_BREAK_STYLE_LOOSE = 1; // 0x1
     field public static final int LINE_BREAK_STYLE_NONE = 0; // 0x0
     field public static final int LINE_BREAK_STYLE_NORMAL = 2; // 0x2
@@ -17670,6 +17674,7 @@
     ctor public LineBreakConfig.Builder();
     method @NonNull public android.graphics.text.LineBreakConfig build();
     method @NonNull public android.graphics.text.LineBreakConfig.Builder merge(@NonNull android.graphics.text.LineBreakConfig);
+    method @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") @NonNull public android.graphics.text.LineBreakConfig.Builder setHyphenation(int);
     method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakStyle(int);
     method @NonNull public android.graphics.text.LineBreakConfig.Builder setLineBreakWordStyle(int);
   }
@@ -23946,10 +23951,12 @@
     method @Nullable public android.media.MediaRouter2.RoutingController getController(@NonNull String);
     method @NonNull public java.util.List<android.media.MediaRouter2.RoutingController> getControllers();
     method @NonNull public static android.media.MediaRouter2 getInstance(@NonNull android.content.Context);
+    method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") @Nullable public android.media.RouteListingPreference getRouteListingPreference();
     method @NonNull public java.util.List<android.media.MediaRoute2Info> getRoutes();
     method @NonNull public android.media.MediaRouter2.RoutingController getSystemController();
     method public void registerControllerCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.ControllerCallback);
     method public void registerRouteCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.RouteCallback, @NonNull android.media.RouteDiscoveryPreference);
+    method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void registerRouteListingPreferenceCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
     method public void registerTransferCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaRouter2.TransferCallback);
     method public void setOnGetControllerHintsListener(@Nullable android.media.MediaRouter2.OnGetControllerHintsListener);
     method public void setRouteListingPreference(@Nullable android.media.RouteListingPreference);
@@ -23958,6 +23965,7 @@
     method public void transferTo(@NonNull android.media.MediaRoute2Info);
     method public void unregisterControllerCallback(@NonNull android.media.MediaRouter2.ControllerCallback);
     method public void unregisterRouteCallback(@NonNull android.media.MediaRouter2.RouteCallback);
+    method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void unregisterRouteListingPreferenceCallback(@NonNull android.media.MediaRouter2.RouteListingPreferenceCallback);
     method public void unregisterTransferCallback(@NonNull android.media.MediaRouter2.TransferCallback);
   }
 
@@ -23978,6 +23986,11 @@
     method public void onRoutesUpdated(@NonNull java.util.List<android.media.MediaRoute2Info>);
   }
 
+  @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public abstract static class MediaRouter2.RouteListingPreferenceCallback {
+    ctor @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public MediaRouter2.RouteListingPreferenceCallback();
+    method @FlaggedApi("com.android.media.flags.enable_rlp_callbacks_in_media_router2") public void onRouteListingPreferenceChanged(@Nullable android.media.RouteListingPreference);
+  }
+
   public class MediaRouter2.RoutingController {
     method public void deselectRoute(@NonNull android.media.MediaRoute2Info);
     method @Nullable public android.os.Bundle getControlHints();
@@ -38643,10 +38656,10 @@
   }
 
   public final class FileIntegrityManager {
-    method @FlaggedApi(Flags.FLAG_FSVERITY_API) @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
+    method @FlaggedApi("android.security.fsverity_api") @Nullable public byte[] getFsVerityDigest(@NonNull java.io.File) throws java.io.IOException;
     method public boolean isApkVeritySupported();
     method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public boolean isAppSourceCertificateTrusted(@NonNull java.security.cert.X509Certificate) throws java.security.cert.CertificateEncodingException;
-    method @FlaggedApi(Flags.FLAG_FSVERITY_API) public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
+    method @FlaggedApi("android.security.fsverity_api") public void setupFsVerity(@NonNull java.io.File) throws java.io.IOException;
   }
 
   public final class KeyChain {
@@ -41565,7 +41578,7 @@
     field public static final int PROPERTY_HIGH_DEF_AUDIO = 16; // 0x10
     field public static final int PROPERTY_IS_ADHOC_CONFERENCE = 8192; // 0x2000
     field public static final int PROPERTY_IS_EXTERNAL_CALL = 64; // 0x40
-    field @FlaggedApi(Flags.FLAG_VOIP_APP_ACTIONS_SUPPORT) public static final int PROPERTY_IS_TRANSACTIONAL = 32768; // 0x8000
+    field @FlaggedApi("com.android.server.telecom.flags.voip_app_actions_support") public static final int PROPERTY_IS_TRANSACTIONAL = 32768; // 0x8000
     field public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL = 2048; // 0x800
     field public static final int PROPERTY_RTT = 1024; // 0x400
     field public static final int PROPERTY_SELF_MANAGED = 256; // 0x100
@@ -46573,9 +46586,9 @@
   }
 
   public class BoringLayout extends android.text.Layout implements android.text.TextUtils.EllipsizeCallback {
-    ctor @Deprecated public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
-    ctor @Deprecated public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
-    ctor @Deprecated public BoringLayout(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, float, float, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
+    ctor public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
+    ctor public BoringLayout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
+    ctor public BoringLayout(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, float, float, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
     method public void ellipsized(int, int);
     method public int getBottomPadding();
     method public int getEllipsisCount(int);
@@ -46588,12 +46601,12 @@
     method public int getLineTop(int);
     method public int getParagraphDirection(int);
     method public int getTopPadding();
-    method @Deprecated public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint);
-    method @Deprecated public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint, android.text.BoringLayout.Metrics);
-    method @Deprecated @Nullable public static android.text.BoringLayout.Metrics isBoring(@NonNull CharSequence, @NonNull android.text.TextPaint, @NonNull android.text.TextDirectionHeuristic, boolean, @Nullable android.text.BoringLayout.Metrics);
-    method @Deprecated public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
-    method @Deprecated public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
-    method @Deprecated @NonNull public static android.text.BoringLayout make(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
+    method public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint);
+    method public static android.text.BoringLayout.Metrics isBoring(CharSequence, android.text.TextPaint, android.text.BoringLayout.Metrics);
+    method @Nullable public static android.text.BoringLayout.Metrics isBoring(@NonNull CharSequence, @NonNull android.text.TextPaint, @NonNull android.text.TextDirectionHeuristic, boolean, @Nullable android.text.BoringLayout.Metrics);
+    method public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
+    method public static android.text.BoringLayout make(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
+    method @NonNull public static android.text.BoringLayout make(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
     method public android.text.BoringLayout replaceOrMake(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean);
     method @NonNull public android.text.BoringLayout replaceOrMake(@NonNull CharSequence, @NonNull android.text.TextPaint, @IntRange(from=0) int, @NonNull android.text.Layout.Alignment, @NonNull android.text.BoringLayout.Metrics, boolean, @Nullable android.text.TextUtils.TruncateAt, @IntRange(from=0) int, boolean);
     method public android.text.BoringLayout replaceOrMake(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float, android.text.BoringLayout.Metrics, boolean, android.text.TextUtils.TruncateAt, int);
@@ -46601,7 +46614,7 @@
 
   public static class BoringLayout.Metrics extends android.graphics.Paint.FontMetricsInt {
     ctor public BoringLayout.Metrics();
-    method @NonNull public android.graphics.RectF getDrawingBoundingBox();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.RectF getDrawingBoundingBox();
     field public int width;
   }
 
@@ -46786,7 +46799,7 @@
 
   public abstract class Layout {
     ctor protected Layout(CharSequence, android.text.TextPaint, int, android.text.Layout.Alignment, float, float);
-    method @NonNull public android.graphics.RectF computeDrawingBoundingBox();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.RectF computeDrawingBoundingBox();
     method public void draw(android.graphics.Canvas);
     method public void draw(android.graphics.Canvas, android.graphics.Path, android.graphics.Paint, int);
     method public void draw(@NonNull android.graphics.Canvas, @Nullable java.util.List<android.graphics.Path>, @Nullable java.util.List<android.graphics.Paint>, @Nullable android.graphics.Path, @Nullable android.graphics.Paint, int);
@@ -46795,24 +46808,24 @@
     method public void fillCharacterBounds(@IntRange(from=0) int, @IntRange(from=0) int, @NonNull float[], @IntRange(from=0) int);
     method @NonNull public final android.text.Layout.Alignment getAlignment();
     method public abstract int getBottomPadding();
-    method public final int getBreakStrategy();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getBreakStrategy();
     method public void getCursorPath(int, android.graphics.Path, CharSequence);
     method public static float getDesiredWidth(CharSequence, android.text.TextPaint);
     method public static float getDesiredWidth(CharSequence, int, int, android.text.TextPaint);
     method public abstract int getEllipsisCount(int);
     method public abstract int getEllipsisStart(int);
-    method @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final android.text.TextUtils.TruncateAt getEllipsize();
     method @IntRange(from=0) public int getEllipsizedWidth();
     method public int getHeight();
-    method public final int getHyphenationFrequency();
-    method public final int getJustificationMode();
-    method @Nullable public final int[] getLeftIndents();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getHyphenationFrequency();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final int getJustificationMode();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final int[] getLeftIndents();
     method public final int getLineAscent(int);
     method public final int getLineBaseline(int);
     method public final int getLineBottom(int);
     method public int getLineBottom(int, boolean);
     method public int getLineBounds(int, android.graphics.Rect);
-    method @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
     method public abstract boolean getLineContainsTab(int);
     method public abstract int getLineCount();
     method public abstract int getLineDescent(int);
@@ -46823,13 +46836,13 @@
     method public float getLineLeft(int);
     method public float getLineMax(int);
     method public float getLineRight(int);
-    method public final float getLineSpacingAmount();
-    method public final float getLineSpacingMultiplier();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final float getLineSpacingAmount();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final float getLineSpacingMultiplier();
     method public abstract int getLineStart(int);
     method public abstract int getLineTop(int);
     method public int getLineVisibleEnd(int);
     method public float getLineWidth(int);
-    method @IntRange(from=1) public final int getMaxLines();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @IntRange(from=1) public final int getMaxLines();
     method public int getOffsetForHorizontal(int, float);
     method public int getOffsetToLeftOf(int);
     method public int getOffsetToRightOf(int);
@@ -46840,19 +46853,19 @@
     method public final int getParagraphRight(int);
     method public float getPrimaryHorizontal(int);
     method @Nullable public int[] getRangeForRect(@NonNull android.graphics.RectF, @NonNull android.text.SegmentFinder, @NonNull android.text.Layout.TextInclusionStrategy);
-    method @Nullable public final int[] getRightIndents();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @Nullable public final int[] getRightIndents();
     method public float getSecondaryHorizontal(int);
     method public void getSelectionPath(int, int, android.graphics.Path);
     method public final float getSpacingAdd();
     method public final float getSpacingMultiplier();
-    method @NonNull public final CharSequence getText();
-    method @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public final CharSequence getText();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public final android.text.TextDirectionHeuristic getTextDirectionHeuristic();
     method public abstract int getTopPadding();
-    method public boolean getUseBoundsForWidth();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public boolean getUseBoundsForWidth();
     method @IntRange(from=0) public final int getWidth();
     method public final void increaseWidthTo(int);
     method public boolean isFallbackLineSpacingEnabled();
-    method public final boolean isFontPaddingIncluded();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public final boolean isFontPaddingIncluded();
     method public boolean isRtlCharAt(int);
     method protected final boolean isSpanned();
     field public static final int BREAK_STRATEGY_BALANCED = 2; // 0x2
@@ -46880,7 +46893,7 @@
     enum_constant public static final android.text.Layout.Alignment ALIGN_OPPOSITE;
   }
 
-  public static final class Layout.Builder {
+  @FlaggedApi("com.android.text.flags.use_bounds_for_width") public static final class Layout.Builder {
     ctor public Layout.Builder(@NonNull CharSequence, @IntRange(from=0) int, @IntRange(from=0) int, @NonNull android.text.TextPaint, @IntRange(from=0) int);
     method @NonNull public android.text.Layout build();
     method @NonNull public android.text.Layout.Builder setAlignment(@NonNull android.text.Layout.Alignment);
@@ -46898,7 +46911,7 @@
     method @NonNull public android.text.Layout.Builder setMaxLines(@IntRange(from=1) int);
     method @NonNull public android.text.Layout.Builder setRightIndents(@Nullable int[]);
     method @NonNull public android.text.Layout.Builder setTextDirectionHeuristic(@NonNull android.text.TextDirectionHeuristic);
-    method @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") @NonNull public android.text.Layout.Builder setUseBoundsForWidth(boolean);
   }
 
   public static class Layout.Directions {
@@ -47875,11 +47888,15 @@
     method public void writeToParcel(@NonNull android.os.Parcel, int);
   }
 
-  public class LineBreakConfigSpan {
+  @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public class LineBreakConfigSpan {
     ctor public LineBreakConfigSpan(@NonNull android.graphics.text.LineBreakConfig);
     method @NonNull public android.graphics.text.LineBreakConfig getLineBreakConfig();
   }
 
+  @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public static final class LineBreakConfigSpan.NoHyphenationSpan extends android.text.style.LineBreakConfigSpan {
+    ctor @FlaggedApi("com.android.text.flags.no_break_no_hyphenation_span") public LineBreakConfigSpan.NoHyphenationSpan();
+  }
+
   public interface LineHeightSpan extends android.text.style.ParagraphStyle android.text.style.WrapTogetherSpan {
     method public void chooseHeight(CharSequence, int, int, int, int, android.graphics.Paint.FontMetricsInt);
   }
@@ -50040,7 +50057,7 @@
     field public static final int VIRTUAL_KEY_RELEASE = 8; // 0x8
   }
 
-  @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public class HapticScrollFeedbackProvider implements android.view.ScrollFeedbackProvider {
+  @FlaggedApi("android.view.flags.scroll_feedback_api") public class HapticScrollFeedbackProvider implements android.view.ScrollFeedbackProvider {
     ctor public HapticScrollFeedbackProvider(@NonNull android.view.View);
     method public void onScrollLimit(int, int, int, boolean);
     method public void onScrollProgress(int, int, int, int);
@@ -51212,13 +51229,10 @@
     method @UiThread public void updatePositionInWindow();
   }
 
-  @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public interface ScrollFeedbackProvider {
+  @FlaggedApi("android.view.flags.scroll_feedback_api") public interface ScrollFeedbackProvider {
     method public void onScrollLimit(int, int, int, boolean);
-    method public default void onScrollLimit(@NonNull android.view.MotionEvent, int, boolean);
     method public void onScrollProgress(int, int, int, int);
-    method public default void onScrollProgress(@NonNull android.view.MotionEvent, int, int);
     method public void onSnapToItem(int, int, int);
-    method public default void onSnapToItem(@NonNull android.view.MotionEvent, int);
   }
 
   public class SearchEvent {
@@ -52498,7 +52512,7 @@
     method @Deprecated public static int getEdgeSlop();
     method @Deprecated public static int getFadingEdgeLength();
     method @Deprecated public static long getGlobalActionKeyTimeout();
-    method @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public int getHapticScrollFeedbackTickInterval(int, int, int);
+    method @FlaggedApi("android.view.flags.scroll_feedback_api") public int getHapticScrollFeedbackTickInterval(int, int, int);
     method public static int getJumpTapTimeout();
     method public static int getKeyRepeatDelay();
     method public static int getKeyRepeatTimeout();
@@ -52538,7 +52552,7 @@
     method @Deprecated public static int getWindowTouchSlop();
     method public static long getZoomControlsTimeout();
     method public boolean hasPermanentMenuKey();
-    method @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API) public boolean isHapticScrollFeedbackEnabled(int, int, int);
+    method @FlaggedApi("android.view.flags.scroll_feedback_api") public boolean isHapticScrollFeedbackEnabled(int, int, int);
     method public boolean shouldShowMenuShortcutsWhenKeyboardPresent();
   }
 
@@ -59871,7 +59885,7 @@
     method public final android.text.method.TransformationMethod getTransformationMethod();
     method public android.graphics.Typeface getTypeface();
     method public android.text.style.URLSpan[] getUrls();
-    method public boolean getUseBoundsForWidth();
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public boolean getUseBoundsForWidth();
     method public boolean hasSelection();
     method public boolean isAllCaps();
     method public boolean isCursorVisible();
@@ -60014,7 +60028,7 @@
     method public final void setTransformationMethod(android.text.method.TransformationMethod);
     method public void setTypeface(@Nullable android.graphics.Typeface, int);
     method public void setTypeface(@Nullable android.graphics.Typeface);
-    method public void setUseBoundsForWidth(boolean);
+    method @FlaggedApi("com.android.text.flags.use_bounds_for_width") public void setUseBoundsForWidth(boolean);
     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_UNIFORM = 1; // 0x1
diff --git a/core/api/lint-baseline.txt b/core/api/lint-baseline.txt
new file mode 100644
index 0000000..6b7910a
--- /dev/null
+++ b/core/api/lint-baseline.txt
@@ -0,0 +1,521 @@
+// Baseline format: 1.0
+UnflaggedApi: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INTERNAL_ERROR:
+    New API must be flagged with @FlaggedApi: field android.accessibilityservice.AccessibilityService.OVERLAY_RESULT_INTERNAL_ERROR
+UnflaggedApi: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_INVALID:
+    New API must be flagged with @FlaggedApi: field android.accessibilityservice.AccessibilityService.OVERLAY_RESULT_INVALID
+UnflaggedApi: android.accessibilityservice.AccessibilityService#OVERLAY_RESULT_SUCCESS:
+    New API must be flagged with @FlaggedApi: field android.accessibilityservice.AccessibilityService.OVERLAY_RESULT_SUCCESS
+UnflaggedApi: android.accessibilityservice.AccessibilityService#attachAccessibilityOverlayToDisplay(int, android.view.SurfaceControl, java.util.concurrent.Executor, java.util.function.IntConsumer):
+    New API must be flagged with @FlaggedApi: method android.accessibilityservice.AccessibilityService.attachAccessibilityOverlayToDisplay(int,android.view.SurfaceControl,java.util.concurrent.Executor,java.util.function.IntConsumer)
+UnflaggedApi: android.accessibilityservice.AccessibilityService#attachAccessibilityOverlayToWindow(int, android.view.SurfaceControl, java.util.concurrent.Executor, java.util.function.IntConsumer):
+    New API must be flagged with @FlaggedApi: method android.accessibilityservice.AccessibilityService.attachAccessibilityOverlayToWindow(int,android.view.SurfaceControl,java.util.concurrent.Executor,java.util.function.IntConsumer)
+UnflaggedApi: android.app.Activity#onRequestPermissionsResult(int, String[], int[], int):
+    New API must be flagged with @FlaggedApi: method android.app.Activity.onRequestPermissionsResult(int,String[],int[],int)
+UnflaggedApi: android.app.Activity#requestPermissions(String[], int, int):
+    New API must be flagged with @FlaggedApi: method android.app.Activity.requestPermissions(String[],int,int)
+UnflaggedApi: android.app.Activity#setAllowCrossUidActivitySwitchFromBelow(boolean):
+    New API must be flagged with @FlaggedApi: method android.app.Activity.setAllowCrossUidActivitySwitchFromBelow(boolean)
+UnflaggedApi: android.app.Activity#shouldShowRequestPermissionRationale(String, int):
+    New API must be flagged with @FlaggedApi: method android.app.Activity.shouldShowRequestPermissionRationale(String,int)
+UnflaggedApi: android.app.ActivityManager#addStartInfoTimestamp(int, long):
+    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.addStartInfoTimestamp(int,long)
+UnflaggedApi: android.app.ActivityManager#clearApplicationStartInfoCompletionListener():
+    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.clearApplicationStartInfoCompletionListener()
+UnflaggedApi: android.app.ActivityManager#getHistoricalProcessStartReasons(int):
+    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.getHistoricalProcessStartReasons(int)
+UnflaggedApi: android.app.ActivityManager#setApplicationStartInfoCompletionListener(java.util.concurrent.Executor, java.util.function.Consumer<android.app.ApplicationStartInfo>):
+    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.setApplicationStartInfoCompletionListener(java.util.concurrent.Executor,java.util.function.Consumer<android.app.ApplicationStartInfo>)
+UnflaggedApi: android.app.ApplicationStartInfo:
+    New API must be flagged with @FlaggedApi: class android.app.ApplicationStartInfo
+UnflaggedApi: android.app.ApplicationStartInfo#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.CREATOR
+UnflaggedApi: android.app.ApplicationStartInfo#LAUNCH_MODE_SINGLE_INSTANCE:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.LAUNCH_MODE_SINGLE_INSTANCE
+UnflaggedApi: android.app.ApplicationStartInfo#LAUNCH_MODE_SINGLE_INSTANCE_PER_TASK:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.LAUNCH_MODE_SINGLE_INSTANCE_PER_TASK
+UnflaggedApi: android.app.ApplicationStartInfo#LAUNCH_MODE_SINGLE_TASK:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.LAUNCH_MODE_SINGLE_TASK
+UnflaggedApi: android.app.ApplicationStartInfo#LAUNCH_MODE_SINGLE_TOP:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.LAUNCH_MODE_SINGLE_TOP
+UnflaggedApi: android.app.ApplicationStartInfo#LAUNCH_MODE_STANDARD:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.LAUNCH_MODE_STANDARD
+UnflaggedApi: android.app.ApplicationStartInfo#STARTUP_STATE_ERROR:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.STARTUP_STATE_ERROR
+UnflaggedApi: android.app.ApplicationStartInfo#STARTUP_STATE_FIRST_FRAME_DRAWN:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.STARTUP_STATE_FIRST_FRAME_DRAWN
+UnflaggedApi: android.app.ApplicationStartInfo#STARTUP_STATE_STARTED:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.STARTUP_STATE_STARTED
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_ALARM:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_ALARM
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_BACKUP:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_BACKUP
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_BOOT_COMPLETE:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_BOOT_COMPLETE
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_BROADCAST:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_BROADCAST
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_CONTENT_PROVIDER:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_CONTENT_PROVIDER
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_JOB:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_JOB
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_LAUNCHER:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_LAUNCHER
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_LAUNCHER_RECENTS:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_LAUNCHER_RECENTS
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_OTHER:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_OTHER
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_PUSH:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_PUSH
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_SERVICE
+UnflaggedApi: android.app.ApplicationStartInfo#START_REASON_START_ACTIVITY:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_REASON_START_ACTIVITY
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_APPLICATION_ONCREATE:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_APPLICATION_ONCREATE
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_BIND_APPLICATION:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_BIND_APPLICATION
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_FIRST_FRAME:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_FIRST_FRAME
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_FORK:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_FORK
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_FULLY_DRAWN:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_FULLY_DRAWN
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_INITIAL_RENDERTHREAD_FRAME:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_INITIAL_RENDERTHREAD_FRAME
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_LAUNCH:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_LAUNCH
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_RESERVED_RANGE_DEVELOPER:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_RESERVED_RANGE_DEVELOPER
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_RESERVED_RANGE_DEVELOPER_START:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_RESERVED_RANGE_DEVELOPER_START
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_RESERVED_RANGE_SYSTEM:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_RESERVED_RANGE_SYSTEM
+UnflaggedApi: android.app.ApplicationStartInfo#START_TIMESTAMP_SURFACEFLINGER_COMPOSITION_COMPLETE:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TIMESTAMP_SURFACEFLINGER_COMPOSITION_COMPLETE
+UnflaggedApi: android.app.ApplicationStartInfo#START_TYPE_COLD:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TYPE_COLD
+UnflaggedApi: android.app.ApplicationStartInfo#START_TYPE_HOT:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TYPE_HOT
+UnflaggedApi: android.app.ApplicationStartInfo#START_TYPE_WARM:
+    New API must be flagged with @FlaggedApi: field android.app.ApplicationStartInfo.START_TYPE_WARM
+UnflaggedApi: android.app.ApplicationStartInfo#describeContents():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.describeContents()
+UnflaggedApi: android.app.ApplicationStartInfo#getDefiningUid():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getDefiningUid()
+UnflaggedApi: android.app.ApplicationStartInfo#getIntent():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getIntent()
+UnflaggedApi: android.app.ApplicationStartInfo#getLaunchMode():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getLaunchMode()
+UnflaggedApi: android.app.ApplicationStartInfo#getPackageUid():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getPackageUid()
+UnflaggedApi: android.app.ApplicationStartInfo#getPid():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getPid()
+UnflaggedApi: android.app.ApplicationStartInfo#getProcessName():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getProcessName()
+UnflaggedApi: android.app.ApplicationStartInfo#getRealUid():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getRealUid()
+UnflaggedApi: android.app.ApplicationStartInfo#getReason():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getReason()
+UnflaggedApi: android.app.ApplicationStartInfo#getStartType():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getStartType()
+UnflaggedApi: android.app.ApplicationStartInfo#getStartupState():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getStartupState()
+UnflaggedApi: android.app.ApplicationStartInfo#getStartupTimestamps():
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.getStartupTimestamps()
+UnflaggedApi: android.app.ApplicationStartInfo#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.app.ApplicationStartInfo.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.app.Notification.TvExtender:
+    New API must be flagged with @FlaggedApi: class android.app.Notification.TvExtender
+UnflaggedApi: android.app.Notification.TvExtender#TvExtender():
+    New API must be flagged with @FlaggedApi: constructor android.app.Notification.TvExtender()
+UnflaggedApi: android.app.Notification.TvExtender#TvExtender(android.app.Notification):
+    New API must be flagged with @FlaggedApi: constructor android.app.Notification.TvExtender(android.app.Notification)
+UnflaggedApi: android.app.Notification.TvExtender#extend(android.app.Notification.Builder):
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.extend(android.app.Notification.Builder)
+UnflaggedApi: android.app.Notification.TvExtender#getChannelId():
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.getChannelId()
+UnflaggedApi: android.app.Notification.TvExtender#getContentIntent():
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.getContentIntent()
+UnflaggedApi: android.app.Notification.TvExtender#getDeleteIntent():
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.getDeleteIntent()
+UnflaggedApi: android.app.Notification.TvExtender#isAvailableOnTv():
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.isAvailableOnTv()
+UnflaggedApi: android.app.Notification.TvExtender#isSuppressShowOverApps():
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.isSuppressShowOverApps()
+UnflaggedApi: android.app.Notification.TvExtender#setChannelId(String):
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.setChannelId(String)
+UnflaggedApi: android.app.Notification.TvExtender#setContentIntent(android.app.PendingIntent):
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.setContentIntent(android.app.PendingIntent)
+UnflaggedApi: android.app.Notification.TvExtender#setDeleteIntent(android.app.PendingIntent):
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.setDeleteIntent(android.app.PendingIntent)
+UnflaggedApi: android.app.Notification.TvExtender#setSuppressShowOverApps(boolean):
+    New API must be flagged with @FlaggedApi: method android.app.Notification.TvExtender.setSuppressShowOverApps(boolean)
+UnflaggedApi: android.companion.AssociationInfo#getTag():
+    New API must be flagged with @FlaggedApi: method android.companion.AssociationInfo.getTag()
+UnflaggedApi: android.companion.CompanionDeviceManager#clearAssociationTag(int):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.clearAssociationTag(int)
+UnflaggedApi: android.companion.CompanionDeviceManager#setAssociationTag(int, String):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.setAssociationTag(int,String)
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_BLE_APPEARED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_BLE_APPEARED
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_BLE_DISAPPEARED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_BLE_DISAPPEARED
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_BT_CONNECTED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_BT_CONNECTED
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_BT_DISCONNECTED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_BT_DISCONNECTED
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_SELF_MANAGED_APPEARED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_SELF_MANAGED_APPEARED
+UnflaggedApi: android.companion.CompanionDeviceService#DEVICE_EVENT_SELF_MANAGED_DISAPPEARED:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceService.DEVICE_EVENT_SELF_MANAGED_DISAPPEARED
+UnflaggedApi: android.companion.CompanionDeviceService#onDeviceEvent(android.companion.AssociationInfo, int):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceService.onDeviceEvent(android.companion.AssociationInfo,int)
+UnflaggedApi: android.companion.virtual.VirtualDevice#getPersistentDeviceId():
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDevice.getPersistentDeviceId()
+UnflaggedApi: android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener#onVirtualDeviceClosed(int):
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener.onVirtualDeviceClosed(int)
+UnflaggedApi: android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener#onVirtualDeviceCreated(int):
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceManager.VirtualDeviceListener.onVirtualDeviceCreated(int)
+UnflaggedApi: android.content.AttributionSource#getDeviceId():
+    New API must be flagged with @FlaggedApi: method android.content.AttributionSource.getDeviceId()
+UnflaggedApi: android.content.AttributionSource.Builder#setDeviceId(int):
+    New API must be flagged with @FlaggedApi: method android.content.AttributionSource.Builder.setDeviceId(int)
+UnflaggedApi: android.content.AttributionSource.Builder#setNextAttributionSource(android.content.AttributionSource):
+    New API must be flagged with @FlaggedApi: method android.content.AttributionSource.Builder.setNextAttributionSource(android.content.AttributionSource)
+UnflaggedApi: android.content.ContextParams#shouldRegisterAttributionSource():
+    New API must be flagged with @FlaggedApi: method android.content.ContextParams.shouldRegisterAttributionSource()
+UnflaggedApi: android.content.ContextParams.Builder#setShouldRegisterAttributionSource(boolean):
+    New API must be flagged with @FlaggedApi: method android.content.ContextParams.Builder.setShouldRegisterAttributionSource(boolean)
+UnflaggedApi: android.content.Intent#EXTRA_ARCHIVAL:
+    New API must be flagged with @FlaggedApi: field android.content.Intent.EXTRA_ARCHIVAL
+UnflaggedApi: android.content.om.FabricatedOverlay#setResourceValue(String, android.content.res.AssetFileDescriptor, String):
+    New API must be flagged with @FlaggedApi: method android.content.om.FabricatedOverlay.setResourceValue(String,android.content.res.AssetFileDescriptor,String)
+UnflaggedApi: android.content.pm.PackageManager#FEATURE_THREAD_NETWORK:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageManager.FEATURE_THREAD_NETWORK
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#beginTransactionReadOnly():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.beginTransactionReadOnly()
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#beginTransactionWithListenerReadOnly(android.database.sqlite.SQLiteTransactionListener):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.beginTransactionWithListenerReadOnly(android.database.sqlite.SQLiteTransactionListener)
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#createRawStatement(String):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.createRawStatement(String)
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#getLastChangedRowCount():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.getLastChangedRowCount()
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#getLastInsertRowId():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.getLastInsertRowId()
+UnflaggedApi: android.database.sqlite.SQLiteDatabase#getTotalChangedRowCount():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteDatabase.getTotalChangedRowCount()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement:
+    New API must be flagged with @FlaggedApi: class android.database.sqlite.SQLiteRawStatement
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#SQLITE_DATA_TYPE_BLOB:
+    New API must be flagged with @FlaggedApi: field android.database.sqlite.SQLiteRawStatement.SQLITE_DATA_TYPE_BLOB
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#SQLITE_DATA_TYPE_FLOAT:
+    New API must be flagged with @FlaggedApi: field android.database.sqlite.SQLiteRawStatement.SQLITE_DATA_TYPE_FLOAT
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#SQLITE_DATA_TYPE_INTEGER:
+    New API must be flagged with @FlaggedApi: field android.database.sqlite.SQLiteRawStatement.SQLITE_DATA_TYPE_INTEGER
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#SQLITE_DATA_TYPE_NULL:
+    New API must be flagged with @FlaggedApi: field android.database.sqlite.SQLiteRawStatement.SQLITE_DATA_TYPE_NULL
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#SQLITE_DATA_TYPE_TEXT:
+    New API must be flagged with @FlaggedApi: field android.database.sqlite.SQLiteRawStatement.SQLITE_DATA_TYPE_TEXT
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindBlob(int, byte[]):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindBlob(int,byte[])
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindBlob(int, byte[], int, int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindBlob(int,byte[],int,int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindDouble(int, double):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindDouble(int,double)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindInt(int, int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindInt(int,int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindLong(int, long):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindLong(int,long)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindNull(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindNull(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#bindText(int, String):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.bindText(int,String)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#clearBindings():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.clearBindings()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#close():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.close()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnBlob(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnBlob(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnDouble(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnDouble(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnInt(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnInt(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnLength(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnLength(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnLong(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnLong(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnName(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnName(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnText(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnText(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getColumnType(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getColumnType(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getParameterCount():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getParameterCount()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getParameterIndex(String):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getParameterIndex(String)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getParameterName(int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getParameterName(int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#getResultColumnCount():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.getResultColumnCount()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#isOpen():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.isOpen()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#readColumnBlob(int, byte[], int, int, int):
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.readColumnBlob(int,byte[],int,int,int)
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#reset():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.reset()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#step():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.step()
+UnflaggedApi: android.database.sqlite.SQLiteRawStatement#toString():
+    New API must be flagged with @FlaggedApi: method android.database.sqlite.SQLiteRawStatement.toString()
+UnflaggedApi: android.graphics.Gainmap#Gainmap(android.graphics.Gainmap, android.graphics.Bitmap):
+    New API must be flagged with @FlaggedApi: constructor android.graphics.Gainmap(android.graphics.Gainmap,android.graphics.Bitmap)
+UnflaggedApi: android.graphics.Path#computeBounds(android.graphics.RectF):
+    New API must be flagged with @FlaggedApi: method android.graphics.Path.computeBounds(android.graphics.RectF)
+UnflaggedApi: android.graphics.fonts.FontFamily.Builder#buildVariableFamily():
+    New API must be flagged with @FlaggedApi: method android.graphics.fonts.FontFamily.Builder.buildVariableFamily()
+UnflaggedApi: android.graphics.text.LineBreakConfig#LINE_BREAK_STYLE_UNSPECIFIED:
+    New API must be flagged with @FlaggedApi: field android.graphics.text.LineBreakConfig.LINE_BREAK_STYLE_UNSPECIFIED
+UnflaggedApi: android.graphics.text.LineBreakConfig#LINE_BREAK_WORD_STYLE_UNSPECIFIED:
+    New API must be flagged with @FlaggedApi: field android.graphics.text.LineBreakConfig.LINE_BREAK_WORD_STYLE_UNSPECIFIED
+UnflaggedApi: android.graphics.text.LineBreakConfig#merge(android.graphics.text.LineBreakConfig):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.LineBreakConfig.merge(android.graphics.text.LineBreakConfig)
+UnflaggedApi: android.graphics.text.LineBreakConfig.Builder#merge(android.graphics.text.LineBreakConfig):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.LineBreakConfig.Builder.merge(android.graphics.text.LineBreakConfig)
+UnflaggedApi: android.graphics.text.LineBreaker.Builder#setUseBoundsForWidth(boolean):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.LineBreaker.Builder.setUseBoundsForWidth(boolean)
+UnflaggedApi: android.graphics.text.PositionedGlyphs#NO_OVERRIDE:
+    New API must be flagged with @FlaggedApi: field android.graphics.text.PositionedGlyphs.NO_OVERRIDE
+UnflaggedApi: android.graphics.text.PositionedGlyphs#getFakeBold(int):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getFakeBold(int)
+UnflaggedApi: android.graphics.text.PositionedGlyphs#getFakeItalic(int):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getFakeItalic(int)
+UnflaggedApi: android.graphics.text.PositionedGlyphs#getItalicOverride(int):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getItalicOverride(int)
+UnflaggedApi: android.graphics.text.PositionedGlyphs#getWeightOverride(int):
+    New API must be flagged with @FlaggedApi: method android.graphics.text.PositionedGlyphs.getWeightOverride(int)
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_CAR:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_CAR
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_COMPUTER:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_COMPUTER
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_GAME_CONSOLE:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_GAME_CONSOLE
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_SMARTPHONE:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_SMARTPHONE
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_SMARTWATCH:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_SMARTWATCH
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_TABLET:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_TABLET
+UnflaggedApi: android.media.MediaRoute2Info#TYPE_REMOTE_TABLET_DOCKED:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRoute2Info.TYPE_REMOTE_TABLET_DOCKED
+UnflaggedApi: android.media.midi.MidiUmpDeviceService:
+    New API must be flagged with @FlaggedApi: class android.media.midi.MidiUmpDeviceService
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#MidiUmpDeviceService():
+    New API must be flagged with @FlaggedApi: constructor android.media.midi.MidiUmpDeviceService()
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#SERVICE_INTERFACE:
+    New API must be flagged with @FlaggedApi: field android.media.midi.MidiUmpDeviceService.SERVICE_INTERFACE
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#getDeviceInfo():
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.getDeviceInfo()
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#getOutputPortReceivers():
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.getOutputPortReceivers()
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#onBind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onBind(android.content.Intent)
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#onClose():
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onClose()
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onCreate()
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#onDeviceStatusChanged(android.media.midi.MidiDeviceStatus):
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onDeviceStatusChanged(android.media.midi.MidiDeviceStatus)
+UnflaggedApi: android.media.midi.MidiUmpDeviceService#onGetInputPortReceivers():
+    New API must be flagged with @FlaggedApi: method android.media.midi.MidiUmpDeviceService.onGetInputPortReceivers()
+UnflaggedApi: android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM:
+    New API must be flagged with @FlaggedApi: field android.os.Build.VERSION_CODES.VANILLA_ICE_CREAM
+UnflaggedApi: android.os.PerformanceHintManager.Session#setPreferPowerEfficiency(boolean):
+    New API must be flagged with @FlaggedApi: method android.os.PerformanceHintManager.Session.setPreferPowerEfficiency(boolean)
+UnflaggedApi: android.os.UserManager#DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO:
+    New API must be flagged with @FlaggedApi: field android.os.UserManager.DISALLOW_NEAR_FIELD_COMMUNICATION_RADIO
+UnflaggedApi: android.provider.Settings#ACTION_CREDENTIAL_PROVIDER:
+    New API must be flagged with @FlaggedApi: field android.provider.Settings.ACTION_CREDENTIAL_PROVIDER
+UnflaggedApi: android.telecom.Call.Details#PROPERTY_IS_TRANSACTIONAL:
+    New API must be flagged with @FlaggedApi: field android.telecom.Call.Details.PROPERTY_IS_TRANSACTIONAL
+UnflaggedApi: android.telecom.Call.Details#getId():
+    New API must be flagged with @FlaggedApi: method android.telecom.Call.Details.getId()
+UnflaggedApi: android.telephony.CarrierConfigManager#KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.CarrierConfigManager.KEY_CARRIER_SUPPORTED_SATELLITE_SERVICES_PER_PROVIDER_BUNDLE
+UnflaggedApi: android.telephony.DisconnectCause#SATELLITE_ENABLED:
+    New API must be flagged with @FlaggedApi: field android.telephony.DisconnectCause.SATELLITE_ENABLED
+UnflaggedApi: android.telephony.NetworkRegistrationInfo#SERVICE_TYPE_MMS:
+    New API must be flagged with @FlaggedApi: field android.telephony.NetworkRegistrationInfo.SERVICE_TYPE_MMS
+UnflaggedApi: android.telephony.NetworkRegistrationInfo#isNonTerrestrialNetwork():
+    New API must be flagged with @FlaggedApi: method android.telephony.NetworkRegistrationInfo.isNonTerrestrialNetwork()
+UnflaggedApi: android.telephony.PhoneNumberUtils#isWpsCallNumber(String):
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneNumberUtils.isWpsCallNumber(String)
+UnflaggedApi: android.telephony.ServiceState#isUsingNonTerrestrialNetwork():
+    New API must be flagged with @FlaggedApi: method android.telephony.ServiceState.isUsingNonTerrestrialNetwork()
+UnflaggedApi: android.telephony.TelephonyManager#EVENT_DISPLAY_SOS_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.telephony.TelephonyManager.EVENT_DISPLAY_SOS_MESSAGE
+UnflaggedApi: android.telephony.TelephonyManager#PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED:
+    New API must be flagged with @FlaggedApi: field android.telephony.TelephonyManager.PURCHASE_PREMIUM_CAPABILITY_RESULT_USER_DISABLED
+UnflaggedApi: android.text.BoringLayout#computeDrawingBoundingBox():
+    New API must be flagged with @FlaggedApi: method android.text.BoringLayout.computeDrawingBoundingBox()
+UnflaggedApi: android.text.BoringLayout.Metrics#getDrawingBoundingBox():
+    New API must be flagged with @FlaggedApi: method android.text.BoringLayout.Metrics.getDrawingBoundingBox()
+UnflaggedApi: android.text.DynamicLayout#getLineBreakConfig():
+    New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.getLineBreakConfig()
+UnflaggedApi: android.text.DynamicLayout.Builder#setLineBreakConfig(android.graphics.text.LineBreakConfig):
+    New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.Builder.setLineBreakConfig(android.graphics.text.LineBreakConfig)
+UnflaggedApi: android.text.DynamicLayout.Builder#setUseBoundsForWidth(boolean):
+    New API must be flagged with @FlaggedApi: method android.text.DynamicLayout.Builder.setUseBoundsForWidth(boolean)
+UnflaggedApi: android.text.Layout#computeDrawingBoundingBox():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.computeDrawingBoundingBox()
+UnflaggedApi: android.text.Layout#getBreakStrategy():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getBreakStrategy()
+UnflaggedApi: android.text.Layout#getEllipsize():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getEllipsize()
+UnflaggedApi: android.text.Layout#getHyphenationFrequency():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getHyphenationFrequency()
+UnflaggedApi: android.text.Layout#getJustificationMode():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getJustificationMode()
+UnflaggedApi: android.text.Layout#getLeftIndents():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getLeftIndents()
+UnflaggedApi: android.text.Layout#getLineBreakConfig():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getLineBreakConfig()
+UnflaggedApi: android.text.Layout#getLineSpacingAmount():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getLineSpacingAmount()
+UnflaggedApi: android.text.Layout#getLineSpacingMultiplier():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getLineSpacingMultiplier()
+UnflaggedApi: android.text.Layout#getMaxLines():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getMaxLines()
+UnflaggedApi: android.text.Layout#getRightIndents():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getRightIndents()
+UnflaggedApi: android.text.Layout#getTextDirectionHeuristic():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getTextDirectionHeuristic()
+UnflaggedApi: android.text.Layout#getUseBoundsForWidth():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.getUseBoundsForWidth()
+UnflaggedApi: android.text.Layout#isFontPaddingIncluded():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.isFontPaddingIncluded()
+UnflaggedApi: android.text.Layout.Builder:
+    New API must be flagged with @FlaggedApi: class android.text.Layout.Builder
+UnflaggedApi: android.text.Layout.Builder#Builder(CharSequence, int, int, android.text.TextPaint, int):
+    New API must be flagged with @FlaggedApi: constructor android.text.Layout.Builder(CharSequence,int,int,android.text.TextPaint,int)
+UnflaggedApi: android.text.Layout.Builder#build():
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.build()
+UnflaggedApi: android.text.Layout.Builder#setAlignment(android.text.Layout.Alignment):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setAlignment(android.text.Layout.Alignment)
+UnflaggedApi: android.text.Layout.Builder#setBreakStrategy(int):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setBreakStrategy(int)
+UnflaggedApi: android.text.Layout.Builder#setEllipsize(android.text.TextUtils.TruncateAt):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setEllipsize(android.text.TextUtils.TruncateAt)
+UnflaggedApi: android.text.Layout.Builder#setEllipsizedWidth(int):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setEllipsizedWidth(int)
+UnflaggedApi: android.text.Layout.Builder#setFallbackLineSpacingEnabled(boolean):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setFallbackLineSpacingEnabled(boolean)
+UnflaggedApi: android.text.Layout.Builder#setFontPaddingIncluded(boolean):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setFontPaddingIncluded(boolean)
+UnflaggedApi: android.text.Layout.Builder#setHyphenationFrequency(int):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setHyphenationFrequency(int)
+UnflaggedApi: android.text.Layout.Builder#setJustificationMode(int):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setJustificationMode(int)
+UnflaggedApi: android.text.Layout.Builder#setLeftIndents(int[]):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setLeftIndents(int[])
+UnflaggedApi: android.text.Layout.Builder#setLineBreakConfig(android.graphics.text.LineBreakConfig):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setLineBreakConfig(android.graphics.text.LineBreakConfig)
+UnflaggedApi: android.text.Layout.Builder#setLineSpacingAmount(float):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setLineSpacingAmount(float)
+UnflaggedApi: android.text.Layout.Builder#setLineSpacingMultiplier(float):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setLineSpacingMultiplier(float)
+UnflaggedApi: android.text.Layout.Builder#setMaxLines(int):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setMaxLines(int)
+UnflaggedApi: android.text.Layout.Builder#setRightIndents(int[]):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setRightIndents(int[])
+UnflaggedApi: android.text.Layout.Builder#setTextDirectionHeuristic(android.text.TextDirectionHeuristic):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setTextDirectionHeuristic(android.text.TextDirectionHeuristic)
+UnflaggedApi: android.text.Layout.Builder#setUseBoundsForWidth(boolean):
+    New API must be flagged with @FlaggedApi: method android.text.Layout.Builder.setUseBoundsForWidth(boolean)
+UnflaggedApi: android.text.StaticLayout#computeDrawingBoundingBox():
+    New API must be flagged with @FlaggedApi: method android.text.StaticLayout.computeDrawingBoundingBox()
+UnflaggedApi: android.text.StaticLayout.Builder#setUseBoundsForWidth(boolean):
+    New API must be flagged with @FlaggedApi: method android.text.StaticLayout.Builder.setUseBoundsForWidth(boolean)
+UnflaggedApi: android.text.style.LineBreakConfigSpan:
+    New API must be flagged with @FlaggedApi: class android.text.style.LineBreakConfigSpan
+UnflaggedApi: android.text.style.LineBreakConfigSpan#LineBreakConfigSpan(android.graphics.text.LineBreakConfig):
+    New API must be flagged with @FlaggedApi: constructor android.text.style.LineBreakConfigSpan(android.graphics.text.LineBreakConfig)
+UnflaggedApi: android.text.style.LineBreakConfigSpan#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.equals(Object)
+UnflaggedApi: android.text.style.LineBreakConfigSpan#getLineBreakConfig():
+    New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.getLineBreakConfig()
+UnflaggedApi: android.text.style.LineBreakConfigSpan#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.hashCode()
+UnflaggedApi: android.text.style.LineBreakConfigSpan#toString():
+    New API must be flagged with @FlaggedApi: method android.text.style.LineBreakConfigSpan.toString()
+UnflaggedApi: android.view.HapticScrollFeedbackProvider#HapticScrollFeedbackProvider(android.view.View):
+    New API must be flagged with @FlaggedApi: constructor android.view.HapticScrollFeedbackProvider(android.view.View)
+UnflaggedApi: android.view.HapticScrollFeedbackProvider#onScrollLimit(int, int, int, boolean):
+    New API must be flagged with @FlaggedApi: method android.view.HapticScrollFeedbackProvider.onScrollLimit(int,int,int,boolean)
+UnflaggedApi: android.view.HapticScrollFeedbackProvider#onScrollProgress(int, int, int, int):
+    New API must be flagged with @FlaggedApi: method android.view.HapticScrollFeedbackProvider.onScrollProgress(int,int,int,int)
+UnflaggedApi: android.view.HapticScrollFeedbackProvider#onSnapToItem(int, int, int):
+    New API must be flagged with @FlaggedApi: method android.view.HapticScrollFeedbackProvider.onSnapToItem(int,int,int)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollLimit(android.view.MotionEvent, int, boolean):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollLimit(android.view.MotionEvent,int,boolean)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollLimit(int, int, int, boolean):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollLimit(int,int,int,boolean)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollProgress(android.view.MotionEvent, int, int):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollProgress(android.view.MotionEvent,int,int)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onScrollProgress(int, int, int, int):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onScrollProgress(int,int,int,int)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onSnapToItem(android.view.MotionEvent, int):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onSnapToItem(android.view.MotionEvent,int)
+UnflaggedApi: android.view.ScrollFeedbackProvider#onSnapToItem(int, int, int):
+    New API must be flagged with @FlaggedApi: method android.view.ScrollFeedbackProvider.onSnapToItem(int,int,int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SCROLL_AMOUNT_FLOAT:
+    New API must be flagged with @FlaggedApi: field android.view.accessibility.AccessibilityNodeInfo.ACTION_ARGUMENT_SCROLL_AMOUNT_FLOAT
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo#isGranularScrollingSupported():
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.isGranularScrollingSupported()
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo#setGranularScrollingSupported(boolean):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.setGranularScrollingSupported(boolean)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#CollectionInfo(int, int, boolean, int, int, int):
+    New API must be flagged with @FlaggedApi: constructor android.view.accessibility.AccessibilityNodeInfo.CollectionInfo(int,int,boolean,int,int,int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#UNDEFINED:
+    New API must be flagged with @FlaggedApi: field android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.UNDEFINED
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#getImportantForAccessibilityItemCount():
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.getImportantForAccessibilityItemCount()
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo#getItemCount():
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.getItemCount()
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder:
+    New API must be flagged with @FlaggedApi: class android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#Builder():
+    New API must be flagged with @FlaggedApi: constructor android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder()
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#build():
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.build()
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setColumnCount(int):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setColumnCount(int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setHierarchical(boolean):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setHierarchical(boolean)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setImportantForAccessibilityItemCount(int):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setImportantForAccessibilityItemCount(int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setItemCount(int):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setItemCount(int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setRowCount(int):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setRowCount(int)
+UnflaggedApi: android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder#setSelectionMode(int):
+    New API must be flagged with @FlaggedApi: method android.view.accessibility.AccessibilityNodeInfo.CollectionInfo.Builder.setSelectionMode(int)
+UnflaggedApi: android.view.animation.AnimationUtils#getExpectedPresentationTimeMillis():
+    New API must be flagged with @FlaggedApi: method android.view.animation.AnimationUtils.getExpectedPresentationTimeMillis()
+UnflaggedApi: android.view.animation.AnimationUtils#getExpectedPresentationTimeNanos():
+    New API must be flagged with @FlaggedApi: method android.view.animation.AnimationUtils.getExpectedPresentationTimeNanos()
+UnflaggedApi: android.view.autofill.AutofillManager#clearAutofillRequestCallback():
+    New API must be flagged with @FlaggedApi: method android.view.autofill.AutofillManager.clearAutofillRequestCallback()
+UnflaggedApi: android.view.autofill.AutofillManager#setAutofillRequestCallback(java.util.concurrent.Executor, android.view.autofill.AutofillRequestCallback):
+    New API must be flagged with @FlaggedApi: method android.view.autofill.AutofillManager.setAutofillRequestCallback(java.util.concurrent.Executor,android.view.autofill.AutofillRequestCallback)
+UnflaggedApi: android.view.autofill.AutofillRequestCallback:
+    New API must be flagged with @FlaggedApi: class android.view.autofill.AutofillRequestCallback
+UnflaggedApi: android.view.autofill.AutofillRequestCallback#onFillRequest(android.view.inputmethod.InlineSuggestionsRequest, android.os.CancellationSignal, android.service.autofill.FillCallback):
+    New API must be flagged with @FlaggedApi: method android.view.autofill.AutofillRequestCallback.onFillRequest(android.view.inputmethod.InlineSuggestionsRequest,android.os.CancellationSignal,android.service.autofill.FillCallback)
+UnflaggedApi: android.view.inputmethod.InlineSuggestionsRequest.Builder#setClientSupported(boolean):
+    New API must be flagged with @FlaggedApi: method android.view.inputmethod.InlineSuggestionsRequest.Builder.setClientSupported(boolean)
+UnflaggedApi: android.view.inputmethod.InlineSuggestionsRequest.Builder#setServiceSupported(boolean):
+    New API must be flagged with @FlaggedApi: method android.view.inputmethod.InlineSuggestionsRequest.Builder.setServiceSupported(boolean)
+UnflaggedApi: android.widget.TextView#getUseBoundsForWidth():
+    New API must be flagged with @FlaggedApi: method android.widget.TextView.getUseBoundsForWidth()
+UnflaggedApi: android.widget.TextView#setUseBoundsForWidth(boolean):
+    New API must be flagged with @FlaggedApi: method android.widget.TextView.setUseBoundsForWidth(boolean)
diff --git a/core/api/module-lib-lint-baseline.txt b/core/api/module-lib-lint-baseline.txt
index 471745a..a0d3858 100644
--- a/core/api/module-lib-lint-baseline.txt
+++ b/core/api/module-lib-lint-baseline.txt
@@ -45,3 +45,57 @@
     SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.linkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
 SamShouldBeLast: android.os.IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient, int):
     SAM-compatible parameters (such as parameter 1, "recipient", in android.os.IBinder.unlinkToDeath) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
+
+
+UnflaggedApi: android.Manifest.permission#BLUETOOTH_STACK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BLUETOOTH_STACK
+UnflaggedApi: android.Manifest.permission#CONTROL_AUTOMOTIVE_GNSS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_AUTOMOTIVE_GNSS
+UnflaggedApi: android.Manifest.permission#GET_INTENT_SENDER_INTENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_INTENT_SENDER_INTENT
+UnflaggedApi: android.Manifest.permission#MAKE_UID_VISIBLE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MAKE_UID_VISIBLE
+UnflaggedApi: android.Manifest.permission#MANAGE_REMOTE_AUTH:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_REMOTE_AUTH
+UnflaggedApi: android.Manifest.permission#USE_COMPANION_TRANSPORTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.USE_COMPANION_TRANSPORTS
+UnflaggedApi: android.Manifest.permission#USE_REMOTE_AUTH:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.USE_REMOTE_AUTH
+UnflaggedApi: android.app.Activity#isResumed():
+    New API must be flagged with @FlaggedApi: method android.app.Activity.isResumed()
+UnflaggedApi: android.companion.CompanionDeviceManager#MESSAGE_REQUEST_CONTEXT_SYNC:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceManager.MESSAGE_REQUEST_CONTEXT_SYNC
+UnflaggedApi: android.companion.CompanionDeviceManager#MESSAGE_REQUEST_PERMISSION_RESTORE:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceManager.MESSAGE_REQUEST_PERMISSION_RESTORE
+UnflaggedApi: android.companion.CompanionDeviceManager#MESSAGE_REQUEST_REMOTE_AUTHENTICATION:
+    New API must be flagged with @FlaggedApi: field android.companion.CompanionDeviceManager.MESSAGE_REQUEST_REMOTE_AUTHENTICATION
+UnflaggedApi: android.companion.CompanionDeviceManager#addOnMessageReceivedListener(java.util.concurrent.Executor, int, android.companion.CompanionDeviceManager.OnMessageReceivedListener):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.addOnMessageReceivedListener(java.util.concurrent.Executor,int,android.companion.CompanionDeviceManager.OnMessageReceivedListener)
+UnflaggedApi: android.companion.CompanionDeviceManager#addOnTransportsChangedListener(java.util.concurrent.Executor, android.companion.CompanionDeviceManager.OnTransportsChangedListener):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.addOnTransportsChangedListener(java.util.concurrent.Executor,android.companion.CompanionDeviceManager.OnTransportsChangedListener)
+UnflaggedApi: android.companion.CompanionDeviceManager#removeOnMessageReceivedListener(int, android.companion.CompanionDeviceManager.OnMessageReceivedListener):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.removeOnMessageReceivedListener(int,android.companion.CompanionDeviceManager.OnMessageReceivedListener)
+UnflaggedApi: android.companion.CompanionDeviceManager#removeOnTransportsChangedListener(android.companion.CompanionDeviceManager.OnTransportsChangedListener):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.removeOnTransportsChangedListener(android.companion.CompanionDeviceManager.OnTransportsChangedListener)
+UnflaggedApi: android.companion.CompanionDeviceManager#sendMessage(int, byte[], int[]):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.sendMessage(int,byte[],int[])
+UnflaggedApi: android.companion.CompanionDeviceManager.OnMessageReceivedListener:
+    New API must be flagged with @FlaggedApi: class android.companion.CompanionDeviceManager.OnMessageReceivedListener
+UnflaggedApi: android.companion.CompanionDeviceManager.OnMessageReceivedListener#onMessageReceived(int, byte[]):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.OnMessageReceivedListener.onMessageReceived(int,byte[])
+UnflaggedApi: android.companion.CompanionDeviceManager.OnTransportsChangedListener:
+    New API must be flagged with @FlaggedApi: class android.companion.CompanionDeviceManager.OnTransportsChangedListener
+UnflaggedApi: android.companion.CompanionDeviceManager.OnTransportsChangedListener#onTransportsChanged(java.util.List<android.companion.AssociationInfo>):
+    New API must be flagged with @FlaggedApi: method android.companion.CompanionDeviceManager.OnTransportsChangedListener.onTransportsChanged(java.util.List<android.companion.AssociationInfo>)
+UnflaggedApi: android.content.Context#REMOTE_AUTH_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.content.Context.REMOTE_AUTH_SERVICE
+UnflaggedApi: android.content.ContextWrapper#createContextForSdkInSandbox(android.content.pm.ApplicationInfo, int):
+    New API must be flagged with @FlaggedApi: method android.content.ContextWrapper.createContextForSdkInSandbox(android.content.pm.ApplicationInfo,int)
+UnflaggedApi: android.media.session.MediaController.PlaybackInfo#PlaybackInfo(int, int, int, int, android.media.AudioAttributes, String):
+    New API must be flagged with @FlaggedApi: constructor android.media.session.MediaController.PlaybackInfo(int,int,int,int,android.media.AudioAttributes,String)
+UnflaggedApi: android.os.IpcDataCache#MODULE_TELEPHONY:
+    New API must be flagged with @FlaggedApi: field android.os.IpcDataCache.MODULE_TELEPHONY
+UnflaggedApi: android.provider.ContactsContract.RawContactsEntity#queryRawContactEntity(android.content.ContentResolver, long):
+    New API must be flagged with @FlaggedApi: method android.provider.ContactsContract.RawContactsEntity.queryRawContactEntity(android.content.ContentResolver,long)
+UnflaggedApi: android.provider.Settings.Config#getAllStrings():
+    New API must be flagged with @FlaggedApi: method android.provider.Settings.Config.getAllStrings()
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index ff44a1b..c9db763 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -3192,6 +3192,7 @@
 
   public static class VirtualDeviceManager.VirtualDevice implements java.lang.AutoCloseable {
     method public void addActivityListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.ActivityListener);
+    method @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY) @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void addActivityPolicyExemption(@NonNull android.content.ComponentName);
     method public void addSoundEffectListener(@NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.SoundEffectListener);
     method @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void close();
     method @NonNull public android.content.Context createContext();
@@ -3212,6 +3213,7 @@
     method public void launchPendingIntent(int, @NonNull android.app.PendingIntent, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer);
     method @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void registerIntentInterceptor(@NonNull android.content.IntentFilter, @NonNull java.util.concurrent.Executor, @NonNull android.companion.virtual.VirtualDeviceManager.IntentInterceptorCallback);
     method public void removeActivityListener(@NonNull android.companion.virtual.VirtualDeviceManager.ActivityListener);
+    method @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY) @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void removeActivityPolicyExemption(@NonNull android.content.ComponentName);
     method public void removeSoundEffectListener(@NonNull android.companion.virtual.VirtualDeviceManager.SoundEffectListener);
     method @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY) @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void setDevicePolicy(int, int);
     method @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE) public void setShowPointerIcon(boolean);
@@ -3243,6 +3245,7 @@
     field public static final int LOCK_STATE_DEFAULT = 0; // 0x0
     field public static final int NAVIGATION_POLICY_DEFAULT_ALLOWED = 0; // 0x0
     field public static final int NAVIGATION_POLICY_DEFAULT_BLOCKED = 1; // 0x1
+    field @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY) public static final int POLICY_TYPE_ACTIVITY = 3; // 0x3
     field public static final int POLICY_TYPE_AUDIO = 1; // 0x1
     field public static final int POLICY_TYPE_RECENTS = 2; // 0x2
     field public static final int POLICY_TYPE_SENSORS = 0; // 0x0
@@ -3795,13 +3798,6 @@
     field @RequiresPermission(android.Manifest.permission.ACCESS_SHORTCUTS) public static final int FLAG_GET_PERSONS_DATA = 2048; // 0x800
   }
 
-  public class PackageArchiver {
-    method @RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES, android.Manifest.permission.REQUEST_DELETE_PACKAGES}) public void requestArchive(@NonNull String, @NonNull android.content.IntentSender) throws android.content.pm.PackageManager.NameNotFoundException;
-    method @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public void requestUnarchive(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
-    field public static final String EXTRA_UNARCHIVE_ALL_USERS = "android.content.pm.extra.UNARCHIVE_ALL_USERS";
-    field public static final String EXTRA_UNARCHIVE_PACKAGE_NAME = "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
-  }
-
   public class PackageInfo implements android.os.Parcelable {
     field public boolean isArchived;
   }
@@ -3809,6 +3805,8 @@
   public class PackageInstaller {
     method @NonNull public android.content.pm.PackageInstaller.InstallInfo readInstallInfo(@NonNull java.io.File, int) throws android.content.pm.PackageInstaller.PackageParsingException;
     method @NonNull public android.content.pm.PackageInstaller.InstallInfo readInstallInfo(@NonNull android.os.ParcelFileDescriptor, @Nullable String, int) throws android.content.pm.PackageInstaller.PackageParsingException;
+    method @FlaggedApi(Flags.FLAG_ARCHIVING) @RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES, android.Manifest.permission.REQUEST_DELETE_PACKAGES}) public void requestArchive(@NonNull String, @NonNull android.content.IntentSender) throws android.content.pm.PackageManager.NameNotFoundException;
+    method @FlaggedApi(Flags.FLAG_ARCHIVING) @RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES, android.Manifest.permission.REQUEST_INSTALL_PACKAGES}) public void requestUnarchive(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException;
     method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean);
     field public static final String ACTION_CONFIRM_INSTALL = "android.content.pm.action.CONFIRM_INSTALL";
     field public static final String ACTION_CONFIRM_PRE_APPROVAL = "android.content.pm.action.CONFIRM_PRE_APPROVAL";
@@ -3819,6 +3817,8 @@
     field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE";
     field public static final String EXTRA_LEGACY_STATUS = "android.content.pm.extra.LEGACY_STATUS";
     field public static final String EXTRA_RESOLVED_BASE_PATH = "android.content.pm.extra.RESOLVED_BASE_PATH";
+    field @FlaggedApi(Flags.FLAG_ARCHIVING) public static final String EXTRA_UNARCHIVE_ALL_USERS = "android.content.pm.extra.UNARCHIVE_ALL_USERS";
+    field @FlaggedApi(Flags.FLAG_ARCHIVING) public static final String EXTRA_UNARCHIVE_PACKAGE_NAME = "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
     field public static final int LOCATION_DATA_APP = 0; // 0x0
     field public static final int LOCATION_MEDIA_DATA = 2; // 0x2
     field public static final int LOCATION_MEDIA_OBB = 1; // 0x1
@@ -3903,7 +3903,6 @@
     method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_INSTANT_APPS) public abstract java.util.List<android.content.pm.InstantAppInfo> getInstantApps();
     method @Deprecated @NonNull public abstract java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(@NonNull String);
     method @Deprecated @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public abstract int getIntentVerificationStatusAsUser(@NonNull String, int);
-    method @NonNull public android.content.pm.PackageArchiver getPackageArchiver();
     method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public int getPackageUidAsUser(@NonNull String, @NonNull android.content.pm.PackageManager.PackageInfoFlags, int) throws android.content.pm.PackageManager.NameNotFoundException;
     method @android.content.pm.PackageManager.PermissionFlags @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS, android.Manifest.permission.GET_RUNTIME_PERMISSIONS}) public abstract int getPermissionFlags(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
     method @NonNull @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] getUnsuspendablePackages(@NonNull String[]);
@@ -3929,6 +3928,7 @@
     method @RequiresPermission(android.Manifest.permission.SET_HARMFUL_APP_WARNINGS) public void setHarmfulAppWarning(@NonNull String, @Nullable CharSequence);
     method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable String);
     method @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo);
+    method @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED) @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo, int);
     method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, conditional=true) public void setSyntheticAppDetailsActivityEnabled(@NonNull String, boolean);
     method public void setSystemAppState(@NonNull String, int);
     method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public abstract void setUpdateAvailable(@NonNull String, boolean);
@@ -3979,6 +3979,7 @@
     field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED = 512; // 0x200
     field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED = 256; // 0x100
     field public static final int FLAG_PERMISSION_USER_SET = 1; // 0x1
+    field @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED) public static final int FLAG_SUSPEND_QUARANTINED = 1; // 0x1
     field public static final int INSTALL_FAILED_ALREADY_EXISTS = -1; // 0xffffffff
     field public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13; // 0xfffffff3
     field public static final int INSTALL_FAILED_CONTAINER_ERROR = -18; // 0xffffffee
@@ -12654,7 +12655,7 @@
     method @NonNull public android.service.voice.HotwordTrainingAudio build();
     method @NonNull public android.service.voice.HotwordTrainingAudio.Builder setAudioFormat(@NonNull android.media.AudioFormat);
     method @NonNull public android.service.voice.HotwordTrainingAudio.Builder setAudioType(@NonNull int);
-    method @NonNull public android.service.voice.HotwordTrainingAudio.Builder setHotwordAudio(@NonNull byte...);
+    method @NonNull public android.service.voice.HotwordTrainingAudio.Builder setHotwordAudio(@NonNull byte[]);
     method @NonNull public android.service.voice.HotwordTrainingAudio.Builder setHotwordOffsetMillis(int);
   }
 
@@ -16706,10 +16707,12 @@
     field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED = 3; // 0x3
     field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS = 2; // 0x2
     field public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN = -1; // 0xffffffff
+    field @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG) public static final int SATELLITE_MODEM_STATE_CONNECTED = 7; // 0x7
     field public static final int SATELLITE_MODEM_STATE_DATAGRAM_RETRYING = 3; // 0x3
     field public static final int SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING = 2; // 0x2
     field public static final int SATELLITE_MODEM_STATE_IDLE = 0; // 0x0
     field public static final int SATELLITE_MODEM_STATE_LISTENING = 1; // 0x1
+    field @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG) public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6; // 0x6
     field public static final int SATELLITE_MODEM_STATE_OFF = 4; // 0x4
     field public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5; // 0x5
     field public static final int SATELLITE_MODEM_STATE_UNKNOWN = -1; // 0xffffffff
diff --git a/core/api/system-lint-baseline.txt b/core/api/system-lint-baseline.txt
index e7c0a91..d62bea8 100644
--- a/core/api/system-lint-baseline.txt
+++ b/core/api/system-lint-baseline.txt
@@ -223,3 +223,3143 @@
     SAM-compatible parameters (such as parameter 1, "listener", in android.view.accessibility.AccessibilityManager.addTouchExplorationStateChangeListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
 SamShouldBeLast: android.webkit.WebChromeClient#onShowFileChooser(android.webkit.WebView, android.webkit.ValueCallback<android.net.Uri[]>, android.webkit.WebChromeClient.FileChooserParams):
     SAM-compatible parameters (such as parameter 2, "filePathCallback", in android.webkit.WebChromeClient.onShowFileChooser) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions
+
+
+UnflaggedApi: android.Manifest.permission#ACCESS_AMBIENT_CONTEXT_EVENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_AMBIENT_CONTEXT_EVENT
+UnflaggedApi: android.Manifest.permission#ACCESS_AMBIENT_LIGHT_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_AMBIENT_LIGHT_STATS
+UnflaggedApi: android.Manifest.permission#ACCESS_BROADCAST_RADIO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_BROADCAST_RADIO
+UnflaggedApi: android.Manifest.permission#ACCESS_BROADCAST_RESPONSE_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS
+UnflaggedApi: android.Manifest.permission#ACCESS_CACHE_FILESYSTEM:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_CACHE_FILESYSTEM
+UnflaggedApi: android.Manifest.permission#ACCESS_CONTEXT_HUB:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_CONTEXT_HUB
+UnflaggedApi: android.Manifest.permission#ACCESS_DRM_CERTIFICATES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_DRM_CERTIFICATES
+UnflaggedApi: android.Manifest.permission#ACCESS_FPS_COUNTER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_FPS_COUNTER
+UnflaggedApi: android.Manifest.permission#ACCESS_INSTANT_APPS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_INSTANT_APPS
+UnflaggedApi: android.Manifest.permission#ACCESS_LOCUS_ID_USAGE_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_LOCUS_ID_USAGE_STATS
+UnflaggedApi: android.Manifest.permission#ACCESS_MOCK_LOCATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_MOCK_LOCATION
+UnflaggedApi: android.Manifest.permission#ACCESS_MTP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_MTP
+UnflaggedApi: android.Manifest.permission#ACCESS_NETWORK_CONDITIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_NETWORK_CONDITIONS
+UnflaggedApi: android.Manifest.permission#ACCESS_NOTIFICATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_NOTIFICATIONS
+UnflaggedApi: android.Manifest.permission#ACCESS_PDB_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_PDB_STATE
+UnflaggedApi: android.Manifest.permission#ACCESS_RCS_USER_CAPABILITY_EXCHANGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE
+UnflaggedApi: android.Manifest.permission#ACCESS_SHARED_LIBRARIES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_SHARED_LIBRARIES
+UnflaggedApi: android.Manifest.permission#ACCESS_SHORTCUTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_SHORTCUTS
+UnflaggedApi: android.Manifest.permission#ACCESS_SMARTSPACE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_SMARTSPACE
+UnflaggedApi: android.Manifest.permission#ACCESS_SURFACE_FLINGER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_SURFACE_FLINGER
+UnflaggedApi: android.Manifest.permission#ACCESS_TUNED_INFO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_TUNED_INFO
+UnflaggedApi: android.Manifest.permission#ACCESS_TV_DESCRAMBLER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_TV_DESCRAMBLER
+UnflaggedApi: android.Manifest.permission#ACCESS_TV_SHARED_FILTER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_TV_SHARED_FILTER
+UnflaggedApi: android.Manifest.permission#ACCESS_TV_TUNER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_TV_TUNER
+UnflaggedApi: android.Manifest.permission#ACCESS_ULTRASOUND:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_ULTRASOUND
+UnflaggedApi: android.Manifest.permission#ACCESS_VIBRATOR_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACCESS_VIBRATOR_STATE
+UnflaggedApi: android.Manifest.permission#ACTIVITY_EMBEDDING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ACTIVITY_EMBEDDING
+UnflaggedApi: android.Manifest.permission#ADD_ALWAYS_UNLOCKED_DISPLAY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ADD_ALWAYS_UNLOCKED_DISPLAY
+UnflaggedApi: android.Manifest.permission#ADD_TRUSTED_DISPLAY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ADD_TRUSTED_DISPLAY
+UnflaggedApi: android.Manifest.permission#ADJUST_RUNTIME_PERMISSIONS_POLICY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY
+UnflaggedApi: android.Manifest.permission#ALLOCATE_AGGRESSIVE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ALLOCATE_AGGRESSIVE
+UnflaggedApi: android.Manifest.permission#ALLOW_ANY_CODEC_FOR_PLAYBACK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK
+UnflaggedApi: android.Manifest.permission#ALLOW_PLACE_IN_MULTI_PANE_SETTINGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ALLOW_PLACE_IN_MULTI_PANE_SETTINGS
+UnflaggedApi: android.Manifest.permission#ALLOW_SLIPPERY_TOUCHES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ALLOW_SLIPPERY_TOUCHES
+UnflaggedApi: android.Manifest.permission#ALWAYS_UPDATE_WALLPAPER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ALWAYS_UPDATE_WALLPAPER
+UnflaggedApi: android.Manifest.permission#AMBIENT_WALLPAPER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.AMBIENT_WALLPAPER
+UnflaggedApi: android.Manifest.permission#APPROVE_INCIDENT_REPORTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.APPROVE_INCIDENT_REPORTS
+UnflaggedApi: android.Manifest.permission#ASSOCIATE_COMPANION_DEVICES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ASSOCIATE_COMPANION_DEVICES
+UnflaggedApi: android.Manifest.permission#BACKGROUND_CAMERA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BACKGROUND_CAMERA
+UnflaggedApi: android.Manifest.permission#BACKUP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BACKUP
+UnflaggedApi: android.Manifest.permission#BATTERY_PREDICTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BATTERY_PREDICTION
+UnflaggedApi: android.Manifest.permission#BIND_AMBIENT_CONTEXT_DETECTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_AMBIENT_CONTEXT_DETECTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_ATTENTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_ATTENTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_AUGMENTED_AUTOFILL_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_AUGMENTED_AUTOFILL_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_CALL_DIAGNOSTIC_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_CALL_DIAGNOSTIC_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_CALL_STREAMING_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_CALL_STREAMING_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_CELL_BROADCAST_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_CELL_BROADCAST_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_CONTENT_CAPTURE_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_CONTENT_CAPTURE_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_CONTENT_SUGGESTIONS_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_CONTENT_SUGGESTIONS_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_DIRECTORY_SEARCH:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_DIRECTORY_SEARCH
+UnflaggedApi: android.Manifest.permission#BIND_DISPLAY_HASHING_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_DISPLAY_HASHING_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_DOMAIN_VERIFICATION_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_DOMAIN_VERIFICATION_AGENT
+UnflaggedApi: android.Manifest.permission#BIND_EUICC_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_EUICC_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_EXTERNAL_STORAGE_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_EXTERNAL_STORAGE_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_FIELD_CLASSIFICATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_FIELD_CLASSIFICATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_GBA_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_GBA_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_HOTWORD_DETECTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_HOTWORD_DETECTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_IMS_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_IMS_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_KEYGUARD_APPWIDGET:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_KEYGUARD_APPWIDGET
+UnflaggedApi: android.Manifest.permission#BIND_MUSIC_RECOGNITION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_MUSIC_RECOGNITION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_NETWORK_RECOMMENDATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_NETWORK_RECOMMENDATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_NOTIFICATION_ASSISTANT_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_PRINT_RECOMMENDATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_PRINT_RECOMMENDATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_REMOTE_LOCKSCREEN_VALIDATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_REMOTE_LOCKSCREEN_VALIDATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_RESOLVER_RANKER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_RESOLVER_RANKER_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_RESUME_ON_REBOOT_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_RESUME_ON_REBOOT_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_ROTATION_RESOLVER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_ROTATION_RESOLVER_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_SATELLITE_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_SATELLITE_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_SETTINGS_SUGGESTIONS_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_SETTINGS_SUGGESTIONS_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_SOUND_TRIGGER_DETECTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_SOUND_TRIGGER_DETECTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TELEPHONY_DATA_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TELEPHONY_DATA_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TELEPHONY_NETWORK_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TELEPHONY_NETWORK_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TEXTCLASSIFIER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TEXTCLASSIFIER_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TIME_ZONE_PROVIDER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TIME_ZONE_PROVIDER_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TRACE_REPORT_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TRACE_REPORT_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TRANSLATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TRANSLATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_TRUST_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TRUST_AGENT
+UnflaggedApi: android.Manifest.permission#BIND_TV_REMOTE_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_TV_REMOTE_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_VISUAL_QUERY_DETECTION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_VISUAL_QUERY_DETECTION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_WALLPAPER_EFFECTS_GENERATION_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_WALLPAPER_EFFECTS_GENERATION_SERVICE
+UnflaggedApi: android.Manifest.permission#BIND_WEARABLE_SENSING_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BIND_WEARABLE_SENSING_SERVICE
+UnflaggedApi: android.Manifest.permission#BLUETOOTH_MAP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BLUETOOTH_MAP
+UnflaggedApi: android.Manifest.permission#BRICK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BRICK
+UnflaggedApi: android.Manifest.permission#BRIGHTNESS_SLIDER_USAGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BRIGHTNESS_SLIDER_USAGE
+UnflaggedApi: android.Manifest.permission#BROADCAST_CLOSE_SYSTEM_DIALOGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS
+UnflaggedApi: android.Manifest.permission#BYPASS_ROLE_QUALIFICATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.BYPASS_ROLE_QUALIFICATION
+UnflaggedApi: android.Manifest.permission#CALL_AUDIO_INTERCEPTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CALL_AUDIO_INTERCEPTION
+UnflaggedApi: android.Manifest.permission#CAMERA_DISABLE_TRANSMIT_LED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAMERA_DISABLE_TRANSMIT_LED
+UnflaggedApi: android.Manifest.permission#CAMERA_OPEN_CLOSE_LISTENER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAMERA_OPEN_CLOSE_LISTENER
+UnflaggedApi: android.Manifest.permission#CAPTURE_AUDIO_HOTWORD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_AUDIO_HOTWORD
+UnflaggedApi: android.Manifest.permission#CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD
+UnflaggedApi: android.Manifest.permission#CAPTURE_MEDIA_OUTPUT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_MEDIA_OUTPUT
+UnflaggedApi: android.Manifest.permission#CAPTURE_TUNER_AUDIO_INPUT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_TUNER_AUDIO_INPUT
+UnflaggedApi: android.Manifest.permission#CAPTURE_TV_INPUT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_TV_INPUT
+UnflaggedApi: android.Manifest.permission#CAPTURE_VOICE_COMMUNICATION_OUTPUT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT
+UnflaggedApi: android.Manifest.permission#CHANGE_APP_IDLE_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CHANGE_APP_IDLE_STATE
+UnflaggedApi: android.Manifest.permission#CHANGE_APP_LAUNCH_TIME_ESTIMATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CHANGE_APP_LAUNCH_TIME_ESTIMATE
+UnflaggedApi: android.Manifest.permission#CHANGE_DEVICE_IDLE_TEMP_WHITELIST:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST
+UnflaggedApi: android.Manifest.permission#CHECK_REMOTE_LOCKSCREEN:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CHECK_REMOTE_LOCKSCREEN
+UnflaggedApi: android.Manifest.permission#CLEAR_APP_USER_DATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CLEAR_APP_USER_DATA
+UnflaggedApi: android.Manifest.permission#COMPANION_APPROVE_WIFI_CONNECTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.COMPANION_APPROVE_WIFI_CONNECTIONS
+UnflaggedApi: android.Manifest.permission#CONFIGURE_DISPLAY_BRIGHTNESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS
+UnflaggedApi: android.Manifest.permission#CONFIGURE_INTERACT_ACROSS_PROFILES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONFIGURE_INTERACT_ACROSS_PROFILES
+UnflaggedApi: android.Manifest.permission#CONNECTIVITY_USE_RESTRICTED_NETWORKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS
+UnflaggedApi: android.Manifest.permission#CONTROL_DEVICE_LIGHTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_DEVICE_LIGHTS
+UnflaggedApi: android.Manifest.permission#CONTROL_DISPLAY_COLOR_TRANSFORMS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS
+UnflaggedApi: android.Manifest.permission#CONTROL_DISPLAY_SATURATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_DISPLAY_SATURATION
+UnflaggedApi: android.Manifest.permission#CONTROL_INCALL_EXPERIENCE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_INCALL_EXPERIENCE
+UnflaggedApi: android.Manifest.permission#CONTROL_KEYGUARD_SECURE_NOTIFICATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS
+UnflaggedApi: android.Manifest.permission#CONTROL_OEM_PAID_NETWORK_PREFERENCE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_OEM_PAID_NETWORK_PREFERENCE
+UnflaggedApi: android.Manifest.permission#CONTROL_VPN:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CONTROL_VPN
+UnflaggedApi: android.Manifest.permission#CREATE_USERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CREATE_USERS
+UnflaggedApi: android.Manifest.permission#CREATE_VIRTUAL_DEVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CREATE_VIRTUAL_DEVICE
+UnflaggedApi: android.Manifest.permission#CRYPT_KEEPER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.CRYPT_KEEPER
+UnflaggedApi: android.Manifest.permission#DEVICE_POWER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.DEVICE_POWER
+UnflaggedApi: android.Manifest.permission#DISABLE_SYSTEM_SOUND_EFFECTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.DISABLE_SYSTEM_SOUND_EFFECTS
+UnflaggedApi: android.Manifest.permission#DISPATCH_PROVISIONING_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.DISPATCH_PROVISIONING_MESSAGE
+UnflaggedApi: android.Manifest.permission#DOMAIN_VERIFICATION_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.DOMAIN_VERIFICATION_AGENT
+UnflaggedApi: android.Manifest.permission#ENTER_CAR_MODE_PRIORITIZED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ENTER_CAR_MODE_PRIORITIZED
+UnflaggedApi: android.Manifest.permission#EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS
+UnflaggedApi: android.Manifest.permission#FORCE_BACK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.FORCE_BACK
+UnflaggedApi: android.Manifest.permission#FORCE_STOP_PACKAGES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.FORCE_STOP_PACKAGES
+UnflaggedApi: android.Manifest.permission#GET_APP_METADATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_APP_METADATA
+UnflaggedApi: android.Manifest.permission#GET_APP_OPS_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_APP_OPS_STATS
+UnflaggedApi: android.Manifest.permission#GET_HISTORICAL_APP_OPS_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_HISTORICAL_APP_OPS_STATS
+UnflaggedApi: android.Manifest.permission#GET_PROCESS_STATE_AND_OOM_SCORE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_PROCESS_STATE_AND_OOM_SCORE
+UnflaggedApi: android.Manifest.permission#GET_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#GET_TOP_ACTIVITY_INFO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GET_TOP_ACTIVITY_INFO
+UnflaggedApi: android.Manifest.permission#GRANT_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS
+UnflaggedApi: android.Manifest.permission#HANDLE_CAR_MODE_CHANGES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.HANDLE_CAR_MODE_CHANGES
+UnflaggedApi: android.Manifest.permission#HARDWARE_TEST:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.HARDWARE_TEST
+UnflaggedApi: android.Manifest.permission#HDMI_CEC:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.HDMI_CEC
+UnflaggedApi: android.Manifest.permission#INJECT_EVENTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INJECT_EVENTS
+UnflaggedApi: android.Manifest.permission#INSTALL_DPC_PACKAGES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_DPC_PACKAGES
+UnflaggedApi: android.Manifest.permission#INSTALL_DYNAMIC_SYSTEM:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_DYNAMIC_SYSTEM
+UnflaggedApi: android.Manifest.permission#INSTALL_EXISTING_PACKAGES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_EXISTING_PACKAGES
+UnflaggedApi: android.Manifest.permission#INSTALL_GRANT_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#INSTALL_LOCATION_TIME_ZONE_PROVIDER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER_SERVICE
+UnflaggedApi: android.Manifest.permission#INSTALL_PACKAGE_UPDATES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_PACKAGE_UPDATES
+UnflaggedApi: android.Manifest.permission#INSTALL_SELF_UPDATES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INSTALL_SELF_UPDATES
+UnflaggedApi: android.Manifest.permission#INTENT_FILTER_VERIFICATION_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INTENT_FILTER_VERIFICATION_AGENT
+UnflaggedApi: android.Manifest.permission#INTERACT_ACROSS_USERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INTERACT_ACROSS_USERS
+UnflaggedApi: android.Manifest.permission#INTERACT_ACROSS_USERS_FULL:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INTERACT_ACROSS_USERS_FULL
+UnflaggedApi: android.Manifest.permission#INTERNAL_SYSTEM_WINDOW:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INTERNAL_SYSTEM_WINDOW
+UnflaggedApi: android.Manifest.permission#INVOKE_CARRIER_SETUP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.INVOKE_CARRIER_SETUP
+UnflaggedApi: android.Manifest.permission#KILL_ALL_BACKGROUND_PROCESSES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.KILL_ALL_BACKGROUND_PROCESSES
+UnflaggedApi: android.Manifest.permission#KILL_UID:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.KILL_UID
+UnflaggedApi: android.Manifest.permission#LAUNCH_DEVICE_MANAGER_SETUP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LAUNCH_DEVICE_MANAGER_SETUP
+UnflaggedApi: android.Manifest.permission#LAUNCH_PERMISSION_SETTINGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LAUNCH_PERMISSION_SETTINGS
+UnflaggedApi: android.Manifest.permission#LOCAL_MAC_ADDRESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LOCAL_MAC_ADDRESS
+UnflaggedApi: android.Manifest.permission#LOCATION_BYPASS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LOCATION_BYPASS
+UnflaggedApi: android.Manifest.permission#LOCK_DEVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LOCK_DEVICE
+UnflaggedApi: android.Manifest.permission#LOG_FOREGROUND_RESOURCE_USE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LOG_FOREGROUND_RESOURCE_USE
+UnflaggedApi: android.Manifest.permission#LOOP_RADIO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.LOOP_RADIO
+UnflaggedApi: android.Manifest.permission#MANAGE_ACCESSIBILITY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ACCESSIBILITY
+UnflaggedApi: android.Manifest.permission#MANAGE_ACTIVITY_TASKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ACTIVITY_TASKS
+UnflaggedApi: android.Manifest.permission#MANAGE_APP_HIBERNATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_APP_HIBERNATION
+UnflaggedApi: android.Manifest.permission#MANAGE_APP_OPS_RESTRICTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_APP_OPS_RESTRICTIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_APP_PREDICTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_APP_PREDICTIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_APP_TOKENS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_APP_TOKENS
+UnflaggedApi: android.Manifest.permission#MANAGE_AUTO_FILL:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_AUTO_FILL
+UnflaggedApi: android.Manifest.permission#MANAGE_BLUETOOTH_WHEN_WIRELESS_CONSENT_REQUIRED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_BLUETOOTH_WHEN_WIRELESS_CONSENT_REQUIRED
+UnflaggedApi: android.Manifest.permission#MANAGE_CARRIER_OEM_UNLOCK_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE
+UnflaggedApi: android.Manifest.permission#MANAGE_CA_CERTIFICATES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CA_CERTIFICATES
+UnflaggedApi: android.Manifest.permission#MANAGE_CLIPBOARD_ACCESS_NOTIFICATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CLIPBOARD_ACCESS_NOTIFICATION
+UnflaggedApi: android.Manifest.permission#MANAGE_CLOUDSEARCH:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CLOUDSEARCH
+UnflaggedApi: android.Manifest.permission#MANAGE_CONTENT_CAPTURE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CONTENT_CAPTURE
+UnflaggedApi: android.Manifest.permission#MANAGE_CONTENT_SUGGESTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_CONTENT_SUGGESTIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_DEBUGGING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_DEBUGGING
+UnflaggedApi: android.Manifest.permission#MANAGE_DEFAULT_APPLICATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_DEFAULT_APPLICATIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_DEVICE_ADMINS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_DEVICE_ADMINS
+UnflaggedApi: android.Manifest.permission#MANAGE_DEVICE_POLICY_APP_EXEMPTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_DEVICE_POLICY_APP_EXEMPTIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_ETHERNET_NETWORKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ETHERNET_NETWORKS
+UnflaggedApi: android.Manifest.permission#MANAGE_FACTORY_RESET_PROTECTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_FACTORY_RESET_PROTECTION
+UnflaggedApi: android.Manifest.permission#MANAGE_GAME_ACTIVITY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_GAME_ACTIVITY
+UnflaggedApi: android.Manifest.permission#MANAGE_GAME_MODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_GAME_MODE
+UnflaggedApi: android.Manifest.permission#MANAGE_HOTWORD_DETECTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_HOTWORD_DETECTION
+UnflaggedApi: android.Manifest.permission#MANAGE_IPSEC_TUNNELS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_IPSEC_TUNNELS
+UnflaggedApi: android.Manifest.permission#MANAGE_LOW_POWER_STANDBY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_LOW_POWER_STANDBY
+UnflaggedApi: android.Manifest.permission#MANAGE_MUSIC_RECOGNITION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_MUSIC_RECOGNITION
+UnflaggedApi: android.Manifest.permission#MANAGE_NOTIFICATION_LISTENERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_NOTIFICATION_LISTENERS
+UnflaggedApi: android.Manifest.permission#MANAGE_ONE_TIME_PERMISSION_SESSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS
+UnflaggedApi: android.Manifest.permission#MANAGE_PROFILE_AND_DEVICE_OWNERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
+UnflaggedApi: android.Manifest.permission#MANAGE_ROLE_HOLDERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ROLE_HOLDERS
+UnflaggedApi: android.Manifest.permission#MANAGE_ROLLBACKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ROLLBACKS
+UnflaggedApi: android.Manifest.permission#MANAGE_ROTATION_RESOLVER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_ROTATION_RESOLVER
+UnflaggedApi: android.Manifest.permission#MANAGE_SAFETY_CENTER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SAFETY_CENTER
+UnflaggedApi: android.Manifest.permission#MANAGE_SEARCH_UI:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SEARCH_UI
+UnflaggedApi: android.Manifest.permission#MANAGE_SENSOR_PRIVACY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SENSOR_PRIVACY
+UnflaggedApi: android.Manifest.permission#MANAGE_SMARTSPACE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SMARTSPACE
+UnflaggedApi: android.Manifest.permission#MANAGE_SOUND_TRIGGER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SOUND_TRIGGER
+UnflaggedApi: android.Manifest.permission#MANAGE_SPEECH_RECOGNITION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SPEECH_RECOGNITION
+UnflaggedApi: android.Manifest.permission#MANAGE_SUBSCRIPTION_PLANS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS
+UnflaggedApi: android.Manifest.permission#MANAGE_SUBSCRIPTION_USER_ASSOCIATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_SUBSCRIPTION_USER_ASSOCIATION
+UnflaggedApi: android.Manifest.permission#MANAGE_TEST_NETWORKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_TEST_NETWORKS
+UnflaggedApi: android.Manifest.permission#MANAGE_TIME_AND_ZONE_DETECTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION
+UnflaggedApi: android.Manifest.permission#MANAGE_UI_TRANSLATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_UI_TRANSLATION
+UnflaggedApi: android.Manifest.permission#MANAGE_USB:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_USB
+UnflaggedApi: android.Manifest.permission#MANAGE_USERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_USERS
+UnflaggedApi: android.Manifest.permission#MANAGE_USER_OEM_UNLOCK_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_USER_OEM_UNLOCK_STATE
+UnflaggedApi: android.Manifest.permission#MANAGE_WALLPAPER_EFFECTS_GENERATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_WALLPAPER_EFFECTS_GENERATION
+UnflaggedApi: android.Manifest.permission#MANAGE_WEAK_ESCROW_TOKEN:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_WEAK_ESCROW_TOKEN
+UnflaggedApi: android.Manifest.permission#MANAGE_WEARABLE_SENSING_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_WEARABLE_SENSING_SERVICE
+UnflaggedApi: android.Manifest.permission#MANAGE_WIFI_COUNTRY_CODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MANAGE_WIFI_COUNTRY_CODE
+UnflaggedApi: android.Manifest.permission#MARK_DEVICE_ORGANIZATION_OWNED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MARK_DEVICE_ORGANIZATION_OWNED
+UnflaggedApi: android.Manifest.permission#MEDIA_RESOURCE_OVERRIDE_PID:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MEDIA_RESOURCE_OVERRIDE_PID
+UnflaggedApi: android.Manifest.permission#MIGRATE_HEALTH_CONNECT_DATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MIGRATE_HEALTH_CONNECT_DATA
+UnflaggedApi: android.Manifest.permission#MODIFY_APPWIDGET_BIND_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#MODIFY_AUDIO_ROUTING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_AUDIO_ROUTING
+UnflaggedApi: android.Manifest.permission#MODIFY_AUDIO_SETTINGS_PRIVILEGED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED
+UnflaggedApi: android.Manifest.permission#MODIFY_CELL_BROADCASTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_CELL_BROADCASTS
+UnflaggedApi: android.Manifest.permission#MODIFY_DAY_NIGHT_MODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_DAY_NIGHT_MODE
+UnflaggedApi: android.Manifest.permission#MODIFY_PARENTAL_CONTROLS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_PARENTAL_CONTROLS
+UnflaggedApi: android.Manifest.permission#MODIFY_QUIET_MODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_QUIET_MODE
+UnflaggedApi: android.Manifest.permission#MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE
+UnflaggedApi: android.Manifest.permission#MONITOR_DEVICE_CONFIG_ACCESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS
+UnflaggedApi: android.Manifest.permission#MOVE_PACKAGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.MOVE_PACKAGE
+UnflaggedApi: android.Manifest.permission#NETWORK_AIRPLANE_MODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_AIRPLANE_MODE
+UnflaggedApi: android.Manifest.permission#NETWORK_CARRIER_PROVISIONING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_CARRIER_PROVISIONING
+UnflaggedApi: android.Manifest.permission#NETWORK_FACTORY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_FACTORY
+UnflaggedApi: android.Manifest.permission#NETWORK_MANAGED_PROVISIONING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_MANAGED_PROVISIONING
+UnflaggedApi: android.Manifest.permission#NETWORK_SCAN:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_SCAN
+UnflaggedApi: android.Manifest.permission#NETWORK_SETTINGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_SETTINGS
+UnflaggedApi: android.Manifest.permission#NETWORK_SETUP_WIZARD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_SETUP_WIZARD
+UnflaggedApi: android.Manifest.permission#NETWORK_SIGNAL_STRENGTH_WAKEUP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP
+UnflaggedApi: android.Manifest.permission#NETWORK_STACK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_STACK
+UnflaggedApi: android.Manifest.permission#NETWORK_STATS_PROVIDER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NETWORK_STATS_PROVIDER
+UnflaggedApi: android.Manifest.permission#NFC_SET_CONTROLLER_ALWAYS_ON:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON
+UnflaggedApi: android.Manifest.permission#NOTIFICATION_DURING_SETUP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NOTIFICATION_DURING_SETUP
+UnflaggedApi: android.Manifest.permission#NOTIFY_TV_INPUTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.NOTIFY_TV_INPUTS
+UnflaggedApi: android.Manifest.permission#OBSERVE_APP_USAGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OBSERVE_APP_USAGE
+UnflaggedApi: android.Manifest.permission#OBSERVE_NETWORK_POLICY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OBSERVE_NETWORK_POLICY
+UnflaggedApi: android.Manifest.permission#OBSERVE_ROLE_HOLDERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OBSERVE_ROLE_HOLDERS
+UnflaggedApi: android.Manifest.permission#OBSERVE_SENSOR_PRIVACY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OBSERVE_SENSOR_PRIVACY
+UnflaggedApi: android.Manifest.permission#OPEN_ACCESSIBILITY_DETAILS_SETTINGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OPEN_ACCESSIBILITY_DETAILS_SETTINGS
+UnflaggedApi: android.Manifest.permission#OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.OVERRIDE_COMPAT_CHANGE_CONFIG_ON_RELEASE_BUILD
+UnflaggedApi: android.Manifest.permission#PACKAGE_VERIFICATION_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PACKAGE_VERIFICATION_AGENT
+UnflaggedApi: android.Manifest.permission#PACKET_KEEPALIVE_OFFLOAD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD
+UnflaggedApi: android.Manifest.permission#PEERS_MAC_ADDRESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PEERS_MAC_ADDRESS
+UnflaggedApi: android.Manifest.permission#PERFORM_CDMA_PROVISIONING:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PERFORM_CDMA_PROVISIONING
+UnflaggedApi: android.Manifest.permission#PERFORM_IMS_SINGLE_REGISTRATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PERFORM_IMS_SINGLE_REGISTRATION
+UnflaggedApi: android.Manifest.permission#PERFORM_SIM_ACTIVATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PERFORM_SIM_ACTIVATION
+UnflaggedApi: android.Manifest.permission#POWER_SAVER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.POWER_SAVER
+UnflaggedApi: android.Manifest.permission#PROVIDE_DEFAULT_ENABLED_CREDENTIAL_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PROVIDE_DEFAULT_ENABLED_CREDENTIAL_SERVICE
+UnflaggedApi: android.Manifest.permission#PROVIDE_RESOLVER_RANKER_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PROVIDE_RESOLVER_RANKER_SERVICE
+UnflaggedApi: android.Manifest.permission#PROVIDE_TRUST_AGENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PROVIDE_TRUST_AGENT
+UnflaggedApi: android.Manifest.permission#PROVISION_DEMO_DEVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.PROVISION_DEMO_DEVICE
+UnflaggedApi: android.Manifest.permission#QUERY_ADMIN_POLICY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.QUERY_ADMIN_POLICY
+UnflaggedApi: android.Manifest.permission#QUERY_CLONED_APPS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.QUERY_CLONED_APPS
+UnflaggedApi: android.Manifest.permission#QUERY_USERS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.QUERY_USERS
+UnflaggedApi: android.Manifest.permission#RADIO_SCAN_WITHOUT_LOCATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RADIO_SCAN_WITHOUT_LOCATION
+UnflaggedApi: android.Manifest.permission#READ_ACTIVE_EMERGENCY_SESSION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION
+UnflaggedApi: android.Manifest.permission#READ_APP_SPECIFIC_LOCALES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_APP_SPECIFIC_LOCALES
+UnflaggedApi: android.Manifest.permission#READ_CARRIER_APP_INFO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_CARRIER_APP_INFO
+UnflaggedApi: android.Manifest.permission#READ_CELL_BROADCASTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_CELL_BROADCASTS
+UnflaggedApi: android.Manifest.permission#READ_CLIPBOARD_IN_BACKGROUND:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_CLIPBOARD_IN_BACKGROUND
+UnflaggedApi: android.Manifest.permission#READ_CONTENT_RATING_SYSTEMS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_CONTENT_RATING_SYSTEMS
+UnflaggedApi: android.Manifest.permission#READ_DEVICE_CONFIG:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_DEVICE_CONFIG
+UnflaggedApi: android.Manifest.permission#READ_DREAM_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_DREAM_STATE
+UnflaggedApi: android.Manifest.permission#READ_GLOBAL_APP_SEARCH_DATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_GLOBAL_APP_SEARCH_DATA
+UnflaggedApi: android.Manifest.permission#READ_INSTALLED_SESSION_PATHS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_INSTALLED_SESSION_PATHS
+UnflaggedApi: android.Manifest.permission#READ_INSTALL_SESSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_INSTALL_SESSIONS
+UnflaggedApi: android.Manifest.permission#READ_NETWORK_USAGE_HISTORY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_NETWORK_USAGE_HISTORY
+UnflaggedApi: android.Manifest.permission#READ_OEM_UNLOCK_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_OEM_UNLOCK_STATE
+UnflaggedApi: android.Manifest.permission#READ_PEOPLE_DATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_PEOPLE_DATA
+UnflaggedApi: android.Manifest.permission#READ_PRINT_SERVICES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_PRINT_SERVICES
+UnflaggedApi: android.Manifest.permission#READ_PRINT_SERVICE_RECOMMENDATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_PRINT_SERVICE_RECOMMENDATIONS
+UnflaggedApi: android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
+UnflaggedApi: android.Manifest.permission#READ_PROJECTION_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_PROJECTION_STATE
+UnflaggedApi: android.Manifest.permission#READ_RESTRICTED_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_RESTRICTED_STATS
+UnflaggedApi: android.Manifest.permission#READ_RUNTIME_PROFILES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_RUNTIME_PROFILES
+UnflaggedApi: android.Manifest.permission#READ_SAFETY_CENTER_STATUS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_SAFETY_CENTER_STATUS
+UnflaggedApi: android.Manifest.permission#READ_SEARCH_INDEXABLES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_SEARCH_INDEXABLES
+UnflaggedApi: android.Manifest.permission#READ_SYSTEM_UPDATE_INFO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_SYSTEM_UPDATE_INFO
+UnflaggedApi: android.Manifest.permission#READ_WALLPAPER_INTERNAL:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_WALLPAPER_INTERNAL
+UnflaggedApi: android.Manifest.permission#READ_WIFI_CREDENTIAL:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_WIFI_CREDENTIAL
+UnflaggedApi: android.Manifest.permission#READ_WRITE_SYNC_DISABLED_MODE_CONFIG:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.READ_WRITE_SYNC_DISABLED_MODE_CONFIG
+UnflaggedApi: android.Manifest.permission#REAL_GET_TASKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REAL_GET_TASKS
+UnflaggedApi: android.Manifest.permission#RECEIVE_BLUETOOTH_MAP:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECEIVE_BLUETOOTH_MAP
+UnflaggedApi: android.Manifest.permission#RECEIVE_DATA_ACTIVITY_CHANGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECEIVE_DATA_ACTIVITY_CHANGE
+UnflaggedApi: android.Manifest.permission#RECEIVE_DEVICE_CUSTOMIZATION_READY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY
+UnflaggedApi: android.Manifest.permission#RECEIVE_EMERGENCY_BROADCAST:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST
+UnflaggedApi: android.Manifest.permission#RECEIVE_WIFI_CREDENTIAL_CHANGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE
+UnflaggedApi: android.Manifest.permission#RECORD_BACKGROUND_AUDIO:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECORD_BACKGROUND_AUDIO
+UnflaggedApi: android.Manifest.permission#RECOVERY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECOVERY
+UnflaggedApi: android.Manifest.permission#RECOVER_KEYSTORE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RECOVER_KEYSTORE
+UnflaggedApi: android.Manifest.permission#REGISTER_CALL_PROVIDER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REGISTER_CALL_PROVIDER
+UnflaggedApi: android.Manifest.permission#REGISTER_CONNECTION_MANAGER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REGISTER_CONNECTION_MANAGER
+UnflaggedApi: android.Manifest.permission#REGISTER_NSD_OFFLOAD_ENGINE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REGISTER_NSD_OFFLOAD_ENGINE
+UnflaggedApi: android.Manifest.permission#REGISTER_SIM_SUBSCRIPTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REGISTER_SIM_SUBSCRIPTION
+UnflaggedApi: android.Manifest.permission#REGISTER_STATS_PULL_ATOM:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REGISTER_STATS_PULL_ATOM
+UnflaggedApi: android.Manifest.permission#REMOTE_DISPLAY_PROVIDER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REMOTE_DISPLAY_PROVIDER
+UnflaggedApi: android.Manifest.permission#REMOVE_DRM_CERTIFICATES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REMOVE_DRM_CERTIFICATES
+UnflaggedApi: android.Manifest.permission#REMOVE_TASKS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REMOVE_TASKS
+UnflaggedApi: android.Manifest.permission#RENOUNCE_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RENOUNCE_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#REPORT_USAGE_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REPORT_USAGE_STATS
+UnflaggedApi: android.Manifest.permission#REQUEST_NOTIFICATION_ASSISTANT_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE
+UnflaggedApi: android.Manifest.permission#RESET_PASSWORD:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RESET_PASSWORD
+UnflaggedApi: android.Manifest.permission#RESTART_WIFI_SUBSYSTEM:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RESTART_WIFI_SUBSYSTEM
+UnflaggedApi: android.Manifest.permission#RESTORE_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RESTORE_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#RESTRICTED_VR_ACCESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RESTRICTED_VR_ACCESS
+UnflaggedApi: android.Manifest.permission#RETRIEVE_WINDOW_CONTENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.RETRIEVE_WINDOW_CONTENT
+UnflaggedApi: android.Manifest.permission#REVIEW_ACCESSIBILITY_SERVICES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REVIEW_ACCESSIBILITY_SERVICES
+UnflaggedApi: android.Manifest.permission#REVOKE_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#ROTATE_SURFACE_FLINGER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.ROTATE_SURFACE_FLINGER
+UnflaggedApi: android.Manifest.permission#SATELLITE_COMMUNICATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SATELLITE_COMMUNICATION
+UnflaggedApi: android.Manifest.permission#SCHEDULE_PRIORITIZED_ALARM:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SCHEDULE_PRIORITIZED_ALARM
+UnflaggedApi: android.Manifest.permission#SECURE_ELEMENT_PRIVILEGED_OPERATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION
+UnflaggedApi: android.Manifest.permission#SEND_CATEGORY_CAR_NOTIFICATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SEND_CATEGORY_CAR_NOTIFICATIONS
+UnflaggedApi: android.Manifest.permission#SEND_DEVICE_CUSTOMIZATION_READY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SEND_DEVICE_CUSTOMIZATION_READY
+UnflaggedApi: android.Manifest.permission#SEND_SAFETY_CENTER_UPDATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SEND_SAFETY_CENTER_UPDATE
+UnflaggedApi: android.Manifest.permission#SEND_SHOW_SUSPENDED_APP_DETAILS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SEND_SHOW_SUSPENDED_APP_DETAILS
+UnflaggedApi: android.Manifest.permission#SEND_SMS_NO_CONFIRMATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SEND_SMS_NO_CONFIRMATION
+UnflaggedApi: android.Manifest.permission#SERIAL_PORT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SERIAL_PORT
+UnflaggedApi: android.Manifest.permission#SET_ACTIVITY_WATCHER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_ACTIVITY_WATCHER
+UnflaggedApi: android.Manifest.permission#SET_CLIP_SOURCE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_CLIP_SOURCE
+UnflaggedApi: android.Manifest.permission#SET_DEFAULT_ACCOUNT_FOR_CONTACTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS
+UnflaggedApi: android.Manifest.permission#SET_HARMFUL_APP_WARNINGS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_HARMFUL_APP_WARNINGS
+UnflaggedApi: android.Manifest.permission#SET_LOW_POWER_STANDBY_PORTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_LOW_POWER_STANDBY_PORTS
+UnflaggedApi: android.Manifest.permission#SET_MEDIA_KEY_LISTENER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_MEDIA_KEY_LISTENER
+UnflaggedApi: android.Manifest.permission#SET_ORIENTATION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_ORIENTATION
+UnflaggedApi: android.Manifest.permission#SET_POINTER_SPEED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_POINTER_SPEED
+UnflaggedApi: android.Manifest.permission#SET_SCREEN_COMPATIBILITY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_SCREEN_COMPATIBILITY
+UnflaggedApi: android.Manifest.permission#SET_SYSTEM_AUDIO_CAPTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_SYSTEM_AUDIO_CAPTION
+UnflaggedApi: android.Manifest.permission#SET_UNRESTRICTED_KEEP_CLEAR_AREAS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_UNRESTRICTED_KEEP_CLEAR_AREAS
+UnflaggedApi: android.Manifest.permission#SET_VOLUME_KEY_LONG_PRESS_LISTENER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
+UnflaggedApi: android.Manifest.permission#SET_WALLPAPER_COMPONENT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_WALLPAPER_COMPONENT
+UnflaggedApi: android.Manifest.permission#SET_WALLPAPER_DIM_AMOUNT:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SET_WALLPAPER_DIM_AMOUNT
+UnflaggedApi: android.Manifest.permission#SHOW_KEYGUARD_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SHOW_KEYGUARD_MESSAGE
+UnflaggedApi: android.Manifest.permission#SHUTDOWN:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SHUTDOWN
+UnflaggedApi: android.Manifest.permission#SIGNAL_REBOOT_READINESS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SIGNAL_REBOOT_READINESS
+UnflaggedApi: android.Manifest.permission#SOUND_TRIGGER_RUN_IN_BATTERY_SAVER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SOUND_TRIGGER_RUN_IN_BATTERY_SAVER
+UnflaggedApi: android.Manifest.permission#STAGE_HEALTH_CONNECT_REMOTE_DATA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.STAGE_HEALTH_CONNECT_REMOTE_DATA
+UnflaggedApi: android.Manifest.permission#START_ACTIVITIES_FROM_BACKGROUND:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND
+UnflaggedApi: android.Manifest.permission#START_CROSS_PROFILE_ACTIVITIES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.START_CROSS_PROFILE_ACTIVITIES
+UnflaggedApi: android.Manifest.permission#START_REVIEW_PERMISSION_DECISIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.START_REVIEW_PERMISSION_DECISIONS
+UnflaggedApi: android.Manifest.permission#START_TASKS_FROM_RECENTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.START_TASKS_FROM_RECENTS
+UnflaggedApi: android.Manifest.permission#STATUS_BAR_SERVICE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.STATUS_BAR_SERVICE
+UnflaggedApi: android.Manifest.permission#STOP_APP_SWITCHES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.STOP_APP_SWITCHES
+UnflaggedApi: android.Manifest.permission#SUBSTITUTE_NOTIFICATION_APP_NAME:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SUBSTITUTE_NOTIFICATION_APP_NAME
+UnflaggedApi: android.Manifest.permission#SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON
+UnflaggedApi: android.Manifest.permission#SUGGEST_EXTERNAL_TIME:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SUGGEST_EXTERNAL_TIME
+UnflaggedApi: android.Manifest.permission#SUSPEND_APPS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SUSPEND_APPS
+UnflaggedApi: android.Manifest.permission#SYSTEM_APPLICATION_OVERLAY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SYSTEM_APPLICATION_OVERLAY
+UnflaggedApi: android.Manifest.permission#SYSTEM_CAMERA:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.SYSTEM_CAMERA
+UnflaggedApi: android.Manifest.permission#TETHER_PRIVILEGED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TETHER_PRIVILEGED
+UnflaggedApi: android.Manifest.permission#TIS_EXTENSION_INTERFACE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TIS_EXTENSION_INTERFACE
+UnflaggedApi: android.Manifest.permission#TOGGLE_AUTOMOTIVE_PROJECTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TOGGLE_AUTOMOTIVE_PROJECTION
+UnflaggedApi: android.Manifest.permission#TRIGGER_LOST_MODE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TRIGGER_LOST_MODE
+UnflaggedApi: android.Manifest.permission#TV_INPUT_HARDWARE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TV_INPUT_HARDWARE
+UnflaggedApi: android.Manifest.permission#TV_VIRTUAL_REMOTE_CONTROLLER:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.TV_VIRTUAL_REMOTE_CONTROLLER
+UnflaggedApi: android.Manifest.permission#UNLIMITED_SHORTCUTS_API_CALLS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UNLIMITED_SHORTCUTS_API_CALLS
+UnflaggedApi: android.Manifest.permission#UPDATE_APP_OPS_STATS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPDATE_APP_OPS_STATS
+UnflaggedApi: android.Manifest.permission#UPDATE_DEVICE_MANAGEMENT_RESOURCES:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPDATE_DEVICE_MANAGEMENT_RESOURCES
+UnflaggedApi: android.Manifest.permission#UPDATE_DOMAIN_VERIFICATION_USER_SELECTION:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPDATE_DOMAIN_VERIFICATION_USER_SELECTION
+UnflaggedApi: android.Manifest.permission#UPDATE_FONTS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPDATE_FONTS
+UnflaggedApi: android.Manifest.permission#UPDATE_LOCK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPDATE_LOCK
+UnflaggedApi: android.Manifest.permission#UPGRADE_RUNTIME_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UPGRADE_RUNTIME_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#USER_ACTIVITY:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.USER_ACTIVITY
+UnflaggedApi: android.Manifest.permission#USE_COLORIZED_NOTIFICATIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.USE_COLORIZED_NOTIFICATIONS
+UnflaggedApi: android.Manifest.permission#USE_RESERVED_DISK:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.USE_RESERVED_DISK
+UnflaggedApi: android.Manifest.permission#UWB_PRIVILEGED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.UWB_PRIVILEGED
+UnflaggedApi: android.Manifest.permission#WHITELIST_AUTO_REVOKE_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#WHITELIST_RESTRICTED_PERMISSIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WHITELIST_RESTRICTED_PERMISSIONS
+UnflaggedApi: android.Manifest.permission#WIFI_ACCESS_COEX_UNSAFE_CHANNELS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WIFI_ACCESS_COEX_UNSAFE_CHANNELS
+UnflaggedApi: android.Manifest.permission#WIFI_SET_DEVICE_MOBILITY_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE
+UnflaggedApi: android.Manifest.permission#WIFI_UPDATE_COEX_UNSAFE_CHANNELS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WIFI_UPDATE_COEX_UNSAFE_CHANNELS
+UnflaggedApi: android.Manifest.permission#WIFI_UPDATE_USABILITY_STATS_SCORE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE
+UnflaggedApi: android.Manifest.permission#WRITE_ALLOWLISTED_DEVICE_CONFIG:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_ALLOWLISTED_DEVICE_CONFIG
+UnflaggedApi: android.Manifest.permission#WRITE_DEVICE_CONFIG:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_DEVICE_CONFIG
+UnflaggedApi: android.Manifest.permission#WRITE_DREAM_STATE:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_DREAM_STATE
+UnflaggedApi: android.Manifest.permission#WRITE_EMBEDDED_SUBSCRIPTIONS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS
+UnflaggedApi: android.Manifest.permission#WRITE_OBB:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_OBB
+UnflaggedApi: android.Manifest.permission#WRITE_SECURITY_LOG:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_SECURITY_LOG
+UnflaggedApi: android.Manifest.permission#WRITE_SMS:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission.WRITE_SMS
+UnflaggedApi: android.Manifest.permission_group#UNDEFINED:
+    New API must be flagged with @FlaggedApi: field android.Manifest.permission_group.UNDEFINED
+UnflaggedApi: android.R.array#config_keySystemUuidMapping:
+    New API must be flagged with @FlaggedApi: field android.R.array.config_keySystemUuidMapping
+UnflaggedApi: android.R.array#config_optionalIpSecAlgorithms:
+    New API must be flagged with @FlaggedApi: field android.R.array.config_optionalIpSecAlgorithms
+UnflaggedApi: android.R.attr#allowClearUserDataOnFailedRestore:
+    New API must be flagged with @FlaggedApi: field android.R.attr.allowClearUserDataOnFailedRestore
+UnflaggedApi: android.R.attr#gameSessionService:
+    New API must be flagged with @FlaggedApi: field android.R.attr.gameSessionService
+UnflaggedApi: android.R.attr#hotwordDetectionService:
+    New API must be flagged with @FlaggedApi: field android.R.attr.hotwordDetectionService
+UnflaggedApi: android.R.attr#isVrOnly:
+    New API must be flagged with @FlaggedApi: field android.R.attr.isVrOnly
+UnflaggedApi: android.R.attr#minExtensionVersion:
+    New API must be flagged with @FlaggedApi: field android.R.attr.minExtensionVersion
+UnflaggedApi: android.R.attr#playHomeTransitionSound:
+    New API must be flagged with @FlaggedApi: field android.R.attr.playHomeTransitionSound
+UnflaggedApi: android.R.attr#requiredSystemPropertyName:
+    New API must be flagged with @FlaggedApi: field android.R.attr.requiredSystemPropertyName
+UnflaggedApi: android.R.attr#requiredSystemPropertyValue:
+    New API must be flagged with @FlaggedApi: field android.R.attr.requiredSystemPropertyValue
+UnflaggedApi: android.R.attr#sdkVersion:
+    New API must be flagged with @FlaggedApi: field android.R.attr.sdkVersion
+UnflaggedApi: android.R.attr#supportsAmbientMode:
+    New API must be flagged with @FlaggedApi: field android.R.attr.supportsAmbientMode
+UnflaggedApi: android.R.attr#userRestriction:
+    New API must be flagged with @FlaggedApi: field android.R.attr.userRestriction
+UnflaggedApi: android.R.attr#visualQueryDetectionService:
+    New API must be flagged with @FlaggedApi: field android.R.attr.visualQueryDetectionService
+UnflaggedApi: android.R.bool#config_enableDefaultNotes:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_enableDefaultNotes
+UnflaggedApi: android.R.bool#config_enableDefaultNotesForWorkProfile:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_enableDefaultNotesForWorkProfile
+UnflaggedApi: android.R.bool#config_enableQrCodeScannerOnLockScreen:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_enableQrCodeScannerOnLockScreen
+UnflaggedApi: android.R.bool#config_safetyProtectionEnabled:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_safetyProtectionEnabled
+UnflaggedApi: android.R.bool#config_sendPackageName:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_sendPackageName
+UnflaggedApi: android.R.bool#config_showDefaultAssistant:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_showDefaultAssistant
+UnflaggedApi: android.R.bool#config_showDefaultEmergency:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_showDefaultEmergency
+UnflaggedApi: android.R.bool#config_showDefaultHome:
+    New API must be flagged with @FlaggedApi: field android.R.bool.config_showDefaultHome
+UnflaggedApi: android.R.color#system_notification_accent_color:
+    New API must be flagged with @FlaggedApi: field android.R.color.system_notification_accent_color
+UnflaggedApi: android.R.dimen#config_restrictedIconSize:
+    New API must be flagged with @FlaggedApi: field android.R.dimen.config_restrictedIconSize
+UnflaggedApi: android.R.dimen#config_viewConfigurationHandwritingGestureLineMargin:
+    New API must be flagged with @FlaggedApi: field android.R.dimen.config_viewConfigurationHandwritingGestureLineMargin
+UnflaggedApi: android.R.drawable#ic_info:
+    New API must be flagged with @FlaggedApi: field android.R.drawable.ic_info
+UnflaggedApi: android.R.drawable#ic_safety_protection:
+    New API must be flagged with @FlaggedApi: field android.R.drawable.ic_safety_protection
+UnflaggedApi: android.R.raw#loaderror:
+    New API must be flagged with @FlaggedApi: field android.R.raw.loaderror
+UnflaggedApi: android.R.raw#nodomain:
+    New API must be flagged with @FlaggedApi: field android.R.raw.nodomain
+UnflaggedApi: android.R.string#config_customMediaKeyDispatcher:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_customMediaKeyDispatcher
+UnflaggedApi: android.R.string#config_customMediaSessionPolicyProvider:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_customMediaSessionPolicyProvider
+UnflaggedApi: android.R.string#config_defaultAssistant:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultAssistant
+UnflaggedApi: android.R.string#config_defaultAutomotiveNavigation:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultAutomotiveNavigation
+UnflaggedApi: android.R.string#config_defaultBrowser:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultBrowser
+UnflaggedApi: android.R.string#config_defaultCallRedirection:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultCallRedirection
+UnflaggedApi: android.R.string#config_defaultCallScreening:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultCallScreening
+UnflaggedApi: android.R.string#config_defaultDialer:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultDialer
+UnflaggedApi: android.R.string#config_defaultNotes:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultNotes
+UnflaggedApi: android.R.string#config_defaultRetailDemo:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultRetailDemo
+UnflaggedApi: android.R.string#config_defaultSms:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_defaultSms
+UnflaggedApi: android.R.string#config_devicePolicyManagement:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_devicePolicyManagement
+UnflaggedApi: android.R.string#config_feedbackIntentExtraKey:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_feedbackIntentExtraKey
+UnflaggedApi: android.R.string#config_feedbackIntentNameKey:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_feedbackIntentNameKey
+UnflaggedApi: android.R.string#config_helpIntentExtraKey:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_helpIntentExtraKey
+UnflaggedApi: android.R.string#config_helpIntentNameKey:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_helpIntentNameKey
+UnflaggedApi: android.R.string#config_helpPackageNameKey:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_helpPackageNameKey
+UnflaggedApi: android.R.string#config_helpPackageNameValue:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_helpPackageNameValue
+UnflaggedApi: android.R.string#config_systemActivityRecognizer:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemActivityRecognizer
+UnflaggedApi: android.R.string#config_systemAmbientAudioIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAmbientAudioIntelligence
+UnflaggedApi: android.R.string#config_systemAppProtectionService:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAppProtectionService
+UnflaggedApi: android.R.string#config_systemAudioIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAudioIntelligence
+UnflaggedApi: android.R.string#config_systemAutomotiveCalendarSyncManager:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAutomotiveCalendarSyncManager
+UnflaggedApi: android.R.string#config_systemAutomotiveCluster:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAutomotiveCluster
+UnflaggedApi: android.R.string#config_systemAutomotiveProjection:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemAutomotiveProjection
+UnflaggedApi: android.R.string#config_systemCallStreaming:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemCallStreaming
+UnflaggedApi: android.R.string#config_systemCompanionDeviceProvider:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemCompanionDeviceProvider
+UnflaggedApi: android.R.string#config_systemContacts:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemContacts
+UnflaggedApi: android.R.string#config_systemFinancedDeviceController:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemFinancedDeviceController
+UnflaggedApi: android.R.string#config_systemGallery:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemGallery
+UnflaggedApi: android.R.string#config_systemNotificationIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemNotificationIntelligence
+UnflaggedApi: android.R.string#config_systemSettingsIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemSettingsIntelligence
+UnflaggedApi: android.R.string#config_systemShell:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemShell
+UnflaggedApi: android.R.string#config_systemSpeechRecognizer:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemSpeechRecognizer
+UnflaggedApi: android.R.string#config_systemSupervision:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemSupervision
+UnflaggedApi: android.R.string#config_systemTelevisionNotificationHandler:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemTelevisionNotificationHandler
+UnflaggedApi: android.R.string#config_systemTextIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemTextIntelligence
+UnflaggedApi: android.R.string#config_systemUi:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemUi
+UnflaggedApi: android.R.string#config_systemUiIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemUiIntelligence
+UnflaggedApi: android.R.string#config_systemVisualIntelligence:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemVisualIntelligence
+UnflaggedApi: android.R.string#config_systemWearHealthService:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemWearHealthService
+UnflaggedApi: android.R.string#config_systemWellbeing:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemWellbeing
+UnflaggedApi: android.R.string#config_systemWifiCoexManager:
+    New API must be flagged with @FlaggedApi: field android.R.string.config_systemWifiCoexManager
+UnflaggedApi: android.R.string#safety_protection_display_text:
+    New API must be flagged with @FlaggedApi: field android.R.string.safety_protection_display_text
+UnflaggedApi: android.R.style#Theme_DeviceDefault_DocumentsUI:
+    New API must be flagged with @FlaggedApi: field android.R.style.Theme_DeviceDefault_DocumentsUI
+UnflaggedApi: android.R.style#Theme_Leanback_FormWizard:
+    New API must be flagged with @FlaggedApi: field android.R.style.Theme_Leanback_FormWizard
+UnflaggedApi: android.app.ActivityManager#getExternalHistoricalProcessStartReasons(String, int):
+    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.getExternalHistoricalProcessStartReasons(String,int)
+UnflaggedApi: android.app.AppOpsManager#OPSTR_RECEIVE_SANDBOX_TRIGGER_AUDIO:
+    New API must be flagged with @FlaggedApi: field android.app.AppOpsManager.OPSTR_RECEIVE_SANDBOX_TRIGGER_AUDIO
+UnflaggedApi: android.app.AppOpsManager.AttributedHistoricalOps#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.AttributedHistoricalOps.equals(Object)
+UnflaggedApi: android.app.AppOpsManager.AttributedHistoricalOps#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.AttributedHistoricalOps.hashCode()
+UnflaggedApi: android.app.AppOpsManager.HistoricalOp#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalOp.equals(Object)
+UnflaggedApi: android.app.AppOpsManager.HistoricalOp#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalOp.hashCode()
+UnflaggedApi: android.app.AppOpsManager.HistoricalOps#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalOps.equals(Object)
+UnflaggedApi: android.app.AppOpsManager.HistoricalOps#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalOps.hashCode()
+UnflaggedApi: android.app.AppOpsManager.HistoricalOps#toString():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalOps.toString()
+UnflaggedApi: android.app.AppOpsManager.HistoricalPackageOps#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalPackageOps.equals(Object)
+UnflaggedApi: android.app.AppOpsManager.HistoricalPackageOps#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalPackageOps.hashCode()
+UnflaggedApi: android.app.AppOpsManager.HistoricalUidOps#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalUidOps.equals(Object)
+UnflaggedApi: android.app.AppOpsManager.HistoricalUidOps#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.AppOpsManager.HistoricalUidOps.hashCode()
+UnflaggedApi: android.app.GameModeConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.GameModeConfiguration.equals(Object)
+UnflaggedApi: android.app.GameModeConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.GameModeConfiguration.hashCode()
+UnflaggedApi: android.app.StatusBarManager.DisableInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.app.StatusBarManager.DisableInfo.toString()
+UnflaggedApi: android.app.Vr2dDisplayProperties#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.Vr2dDisplayProperties.equals(Object)
+UnflaggedApi: android.app.Vr2dDisplayProperties#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.Vr2dDisplayProperties.hashCode()
+UnflaggedApi: android.app.Vr2dDisplayProperties#toString():
+    New API must be flagged with @FlaggedApi: method android.app.Vr2dDisplayProperties.toString()
+UnflaggedApi: android.app.admin.AccountTypePolicyKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.AccountTypePolicyKey.equals(Object)
+UnflaggedApi: android.app.admin.AccountTypePolicyKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.AccountTypePolicyKey.hashCode()
+UnflaggedApi: android.app.admin.AccountTypePolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.AccountTypePolicyKey.toString()
+UnflaggedApi: android.app.admin.Authority#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.Authority.equals(Object)
+UnflaggedApi: android.app.admin.Authority#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.Authority.hashCode()
+UnflaggedApi: android.app.admin.DeviceAdminAuthority#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.DeviceAdminAuthority.equals(Object)
+UnflaggedApi: android.app.admin.DeviceAdminAuthority#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DeviceAdminAuthority.hashCode()
+UnflaggedApi: android.app.admin.DeviceAdminAuthority#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DeviceAdminAuthority.toString()
+UnflaggedApi: android.app.admin.DevicePolicyDrawableResource#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyDrawableResource.equals(Object)
+UnflaggedApi: android.app.admin.DevicePolicyDrawableResource#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyDrawableResource.hashCode()
+UnflaggedApi: android.app.admin.DevicePolicyKeyguardService#onDestroy():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyKeyguardService.onDestroy()
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings:
+    New API must be flagged with @FlaggedApi: class android.app.admin.DevicePolicyResources.Strings
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings:
+    New API must be flagged with @FlaggedApi: class android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings#HOME_MISSING_WORK_PROFILE_SUPPORT_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings.HOME_MISSING_WORK_PROFILE_SUPPORT_MESSAGE
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings#WORK_PROFILE_DEFAULT_APPS_TITLE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.DefaultAppSettings.WORK_PROFILE_DEFAULT_APPS_TITLE
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.PermissionSettings:
+    New API must be flagged with @FlaggedApi: class android.app.admin.DevicePolicyResources.Strings.PermissionSettings
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.PermissionSettings#BACKGROUND_ACCESS_DISABLED_BY_ADMIN_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.PermissionSettings.BACKGROUND_ACCESS_DISABLED_BY_ADMIN_MESSAGE
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.PermissionSettings#BACKGROUND_ACCESS_ENABLED_BY_ADMIN_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.PermissionSettings.BACKGROUND_ACCESS_ENABLED_BY_ADMIN_MESSAGE
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.PermissionSettings#FOREGROUND_ACCESS_ENABLED_BY_ADMIN_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.PermissionSettings.FOREGROUND_ACCESS_ENABLED_BY_ADMIN_MESSAGE
+UnflaggedApi: android.app.admin.DevicePolicyResources.Strings.PermissionSettings#LOCATION_AUTO_GRANTED_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.app.admin.DevicePolicyResources.Strings.PermissionSettings.LOCATION_AUTO_GRANTED_MESSAGE
+UnflaggedApi: android.app.admin.DevicePolicyState#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyState.toString()
+UnflaggedApi: android.app.admin.DevicePolicyStringResource#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyStringResource.equals(Object)
+UnflaggedApi: android.app.admin.DevicePolicyStringResource#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DevicePolicyStringResource.hashCode()
+UnflaggedApi: android.app.admin.DpcAuthority#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.DpcAuthority.equals(Object)
+UnflaggedApi: android.app.admin.DpcAuthority#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DpcAuthority.hashCode()
+UnflaggedApi: android.app.admin.DpcAuthority#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.DpcAuthority.toString()
+UnflaggedApi: android.app.admin.EnforcingAdmin#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.EnforcingAdmin.equals(Object)
+UnflaggedApi: android.app.admin.EnforcingAdmin#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.EnforcingAdmin.hashCode()
+UnflaggedApi: android.app.admin.EnforcingAdmin#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.EnforcingAdmin.toString()
+UnflaggedApi: android.app.admin.IntentFilterPolicyKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.IntentFilterPolicyKey.equals(Object)
+UnflaggedApi: android.app.admin.IntentFilterPolicyKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.IntentFilterPolicyKey.hashCode()
+UnflaggedApi: android.app.admin.IntentFilterPolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.IntentFilterPolicyKey.toString()
+UnflaggedApi: android.app.admin.LockTaskPolicy#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.LockTaskPolicy.equals(Object)
+UnflaggedApi: android.app.admin.LockTaskPolicy#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.LockTaskPolicy.hashCode()
+UnflaggedApi: android.app.admin.LockTaskPolicy#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.LockTaskPolicy.toString()
+UnflaggedApi: android.app.admin.NoArgsPolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.NoArgsPolicyKey.toString()
+UnflaggedApi: android.app.admin.PackagePermissionPolicyKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePermissionPolicyKey.equals(Object)
+UnflaggedApi: android.app.admin.PackagePermissionPolicyKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePermissionPolicyKey.hashCode()
+UnflaggedApi: android.app.admin.PackagePermissionPolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePermissionPolicyKey.toString()
+UnflaggedApi: android.app.admin.PackagePolicyKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePolicyKey.equals(Object)
+UnflaggedApi: android.app.admin.PackagePolicyKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePolicyKey.hashCode()
+UnflaggedApi: android.app.admin.PackagePolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PackagePolicyKey.toString()
+UnflaggedApi: android.app.admin.PolicyKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.PolicyKey.equals(Object)
+UnflaggedApi: android.app.admin.PolicyKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PolicyKey.hashCode()
+UnflaggedApi: android.app.admin.PolicyState#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.PolicyState.toString()
+UnflaggedApi: android.app.admin.RoleAuthority#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.RoleAuthority.equals(Object)
+UnflaggedApi: android.app.admin.RoleAuthority#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.RoleAuthority.hashCode()
+UnflaggedApi: android.app.admin.RoleAuthority#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.RoleAuthority.toString()
+UnflaggedApi: android.app.admin.UnknownAuthority#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.admin.UnknownAuthority.equals(Object)
+UnflaggedApi: android.app.admin.UnknownAuthority#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.admin.UnknownAuthority.hashCode()
+UnflaggedApi: android.app.admin.UnknownAuthority#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.UnknownAuthority.toString()
+UnflaggedApi: android.app.admin.UserRestrictionPolicyKey#toString():
+    New API must be flagged with @FlaggedApi: method android.app.admin.UserRestrictionPolicyKey.toString()
+UnflaggedApi: android.app.ambientcontext.AmbientContextEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.app.ambientcontext.AmbientContextEvent.toString()
+UnflaggedApi: android.app.ambientcontext.AmbientContextEventRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.app.ambientcontext.AmbientContextEventRequest.toString()
+UnflaggedApi: android.app.assist.ActivityId#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.assist.ActivityId.equals(Object)
+UnflaggedApi: android.app.assist.ActivityId#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.assist.ActivityId.hashCode()
+UnflaggedApi: android.app.assist.ActivityId#toString():
+    New API must be flagged with @FlaggedApi: method android.app.assist.ActivityId.toString()
+UnflaggedApi: android.app.assist.AssistStructure.ViewNode#ViewNode():
+    New API must be flagged with @FlaggedApi: constructor android.app.assist.AssistStructure.ViewNode()
+UnflaggedApi: android.app.backup.RestoreDescription#toString():
+    New API must be flagged with @FlaggedApi: method android.app.backup.RestoreDescription.toString()
+UnflaggedApi: android.app.cloudsearch.SearchRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchRequest.equals(Object)
+UnflaggedApi: android.app.cloudsearch.SearchRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchRequest.hashCode()
+UnflaggedApi: android.app.cloudsearch.SearchRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchRequest.toString()
+UnflaggedApi: android.app.cloudsearch.SearchResponse#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchResponse.equals(Object)
+UnflaggedApi: android.app.cloudsearch.SearchResponse#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchResponse.hashCode()
+UnflaggedApi: android.app.cloudsearch.SearchResult#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchResult.equals(Object)
+UnflaggedApi: android.app.cloudsearch.SearchResult#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.cloudsearch.SearchResult.hashCode()
+UnflaggedApi: android.app.prediction.AppPredictionContext#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppPredictionContext.equals(Object)
+UnflaggedApi: android.app.prediction.AppPredictionSessionId#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppPredictionSessionId.equals(Object)
+UnflaggedApi: android.app.prediction.AppPredictionSessionId#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppPredictionSessionId.hashCode()
+UnflaggedApi: android.app.prediction.AppPredictionSessionId#toString():
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppPredictionSessionId.toString()
+UnflaggedApi: android.app.prediction.AppPredictor#finalize():
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppPredictor.finalize()
+UnflaggedApi: android.app.prediction.AppTarget#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppTarget.equals(Object)
+UnflaggedApi: android.app.prediction.AppTargetEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppTargetEvent.equals(Object)
+UnflaggedApi: android.app.prediction.AppTargetId#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppTargetId.equals(Object)
+UnflaggedApi: android.app.prediction.AppTargetId#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.prediction.AppTargetId.hashCode()
+UnflaggedApi: android.app.search.SearchAction#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchAction.equals(Object)
+UnflaggedApi: android.app.search.SearchAction#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchAction.hashCode()
+UnflaggedApi: android.app.search.SearchAction#toString():
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchAction.toString()
+UnflaggedApi: android.app.search.SearchSessionId#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchSessionId.equals(Object)
+UnflaggedApi: android.app.search.SearchSessionId#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchSessionId.hashCode()
+UnflaggedApi: android.app.search.SearchSessionId#toString():
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchSessionId.toString()
+UnflaggedApi: android.app.search.SearchTargetEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchTargetEvent.equals(Object)
+UnflaggedApi: android.app.search.SearchTargetEvent#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.search.SearchTargetEvent.hashCode()
+UnflaggedApi: android.app.smartspace.SmartspaceAction#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceAction.equals(Object)
+UnflaggedApi: android.app.smartspace.SmartspaceAction#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceAction.hashCode()
+UnflaggedApi: android.app.smartspace.SmartspaceAction#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceAction.toString()
+UnflaggedApi: android.app.smartspace.SmartspaceConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceConfig.equals(Object)
+UnflaggedApi: android.app.smartspace.SmartspaceConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceConfig.hashCode()
+UnflaggedApi: android.app.smartspace.SmartspaceSessionId#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceSessionId.equals(Object)
+UnflaggedApi: android.app.smartspace.SmartspaceSessionId#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceSessionId.hashCode()
+UnflaggedApi: android.app.smartspace.SmartspaceSessionId#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceSessionId.toString()
+UnflaggedApi: android.app.smartspace.SmartspaceTarget#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceTarget.equals(Object)
+UnflaggedApi: android.app.smartspace.SmartspaceTarget#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceTarget.hashCode()
+UnflaggedApi: android.app.smartspace.SmartspaceTarget#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceTarget.toString()
+UnflaggedApi: android.app.smartspace.SmartspaceTargetEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.SmartspaceTargetEvent.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemInfo.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.BaseTemplateData.SubItemLoggingInfo.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CarouselTemplateData.CarouselItem.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CombinedCardsTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CombinedCardsTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.CombinedCardsTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CombinedCardsTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.CombinedCardsTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.CombinedCardsTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.HeadToHeadTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.HeadToHeadTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.HeadToHeadTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.HeadToHeadTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.HeadToHeadTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.HeadToHeadTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.Icon#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Icon.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.Icon#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Icon.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.Icon#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Icon.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubCardTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubCardTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubCardTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubCardTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubCardTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubCardTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubImageTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubImageTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubImageTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubImageTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubImageTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubImageTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubListTemplateData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubListTemplateData.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubListTemplateData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubListTemplateData.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.SubListTemplateData#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.SubListTemplateData.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.TapAction#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.TapAction.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.TapAction#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.TapAction.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.TapAction#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.TapAction.toString()
+UnflaggedApi: android.app.smartspace.uitemplatedata.Text#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Text.equals(Object)
+UnflaggedApi: android.app.smartspace.uitemplatedata.Text#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Text.hashCode()
+UnflaggedApi: android.app.smartspace.uitemplatedata.Text#toString():
+    New API must be flagged with @FlaggedApi: method android.app.smartspace.uitemplatedata.Text.toString()
+UnflaggedApi: android.app.time.ExternalTimeSuggestion#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.ExternalTimeSuggestion.equals(Object)
+UnflaggedApi: android.app.time.ExternalTimeSuggestion#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.ExternalTimeSuggestion.hashCode()
+UnflaggedApi: android.app.time.ExternalTimeSuggestion#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.ExternalTimeSuggestion.toString()
+UnflaggedApi: android.app.time.TimeCapabilities#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilities.equals(Object)
+UnflaggedApi: android.app.time.TimeCapabilities#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilities.hashCode()
+UnflaggedApi: android.app.time.TimeCapabilities#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilities.toString()
+UnflaggedApi: android.app.time.TimeCapabilitiesAndConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilitiesAndConfig.equals(Object)
+UnflaggedApi: android.app.time.TimeCapabilitiesAndConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilitiesAndConfig.hashCode()
+UnflaggedApi: android.app.time.TimeCapabilitiesAndConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeCapabilitiesAndConfig.toString()
+UnflaggedApi: android.app.time.TimeConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeConfiguration.equals(Object)
+UnflaggedApi: android.app.time.TimeConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeConfiguration.hashCode()
+UnflaggedApi: android.app.time.TimeConfiguration#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeConfiguration.toString()
+UnflaggedApi: android.app.time.TimeState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeState.equals(Object)
+UnflaggedApi: android.app.time.TimeState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeState.hashCode()
+UnflaggedApi: android.app.time.TimeState#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeState.toString()
+UnflaggedApi: android.app.time.TimeZoneCapabilities#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilities.equals(Object)
+UnflaggedApi: android.app.time.TimeZoneCapabilities#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilities.hashCode()
+UnflaggedApi: android.app.time.TimeZoneCapabilities#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilities.toString()
+UnflaggedApi: android.app.time.TimeZoneCapabilitiesAndConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilitiesAndConfig.equals(Object)
+UnflaggedApi: android.app.time.TimeZoneCapabilitiesAndConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilitiesAndConfig.hashCode()
+UnflaggedApi: android.app.time.TimeZoneCapabilitiesAndConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneCapabilitiesAndConfig.toString()
+UnflaggedApi: android.app.time.TimeZoneConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneConfiguration.equals(Object)
+UnflaggedApi: android.app.time.TimeZoneConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneConfiguration.hashCode()
+UnflaggedApi: android.app.time.TimeZoneConfiguration#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneConfiguration.toString()
+UnflaggedApi: android.app.time.TimeZoneState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneState.equals(Object)
+UnflaggedApi: android.app.time.TimeZoneState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneState.hashCode()
+UnflaggedApi: android.app.time.TimeZoneState#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.TimeZoneState.toString()
+UnflaggedApi: android.app.time.UnixEpochTime#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.time.UnixEpochTime.equals(Object)
+UnflaggedApi: android.app.time.UnixEpochTime#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.time.UnixEpochTime.hashCode()
+UnflaggedApi: android.app.time.UnixEpochTime#toString():
+    New API must be flagged with @FlaggedApi: method android.app.time.UnixEpochTime.toString()
+UnflaggedApi: android.app.usage.BroadcastResponseStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.usage.BroadcastResponseStats.equals(Object)
+UnflaggedApi: android.app.usage.BroadcastResponseStats#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.usage.BroadcastResponseStats.hashCode()
+UnflaggedApi: android.app.usage.BroadcastResponseStats#toString():
+    New API must be flagged with @FlaggedApi: method android.app.usage.BroadcastResponseStats.toString()
+UnflaggedApi: android.app.usage.CacheQuotaHint#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.usage.CacheQuotaHint.equals(Object)
+UnflaggedApi: android.app.usage.CacheQuotaHint#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.usage.CacheQuotaHint.hashCode()
+UnflaggedApi: android.app.usage.CacheQuotaService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.app.usage.CacheQuotaService.onCreate()
+UnflaggedApi: android.app.usage.UsageEvents.Event#NOTIFICATION_INTERRUPTION:
+    New API must be flagged with @FlaggedApi: field android.app.usage.UsageEvents.Event.NOTIFICATION_INTERRUPTION
+UnflaggedApi: android.app.usage.UsageEvents.Event#NOTIFICATION_SEEN:
+    New API must be flagged with @FlaggedApi: field android.app.usage.UsageEvents.Event.NOTIFICATION_SEEN
+UnflaggedApi: android.app.usage.UsageEvents.Event#SLICE_PINNED:
+    New API must be flagged with @FlaggedApi: field android.app.usage.UsageEvents.Event.SLICE_PINNED
+UnflaggedApi: android.app.usage.UsageEvents.Event#SLICE_PINNED_PRIV:
+    New API must be flagged with @FlaggedApi: field android.app.usage.UsageEvents.Event.SLICE_PINNED_PRIV
+UnflaggedApi: android.app.usage.UsageEvents.Event#SYSTEM_INTERACTION:
+    New API must be flagged with @FlaggedApi: field android.app.usage.UsageEvents.Event.SYSTEM_INTERACTION
+UnflaggedApi: android.app.usage.UsageEvents.Event#getInstanceId():
+    New API must be flagged with @FlaggedApi: method android.app.usage.UsageEvents.Event.getInstanceId()
+UnflaggedApi: android.app.usage.UsageEvents.Event#getNotificationChannelId():
+    New API must be flagged with @FlaggedApi: method android.app.usage.UsageEvents.Event.getNotificationChannelId()
+UnflaggedApi: android.app.usage.UsageEvents.Event#getTaskRootClassName():
+    New API must be flagged with @FlaggedApi: method android.app.usage.UsageEvents.Event.getTaskRootClassName()
+UnflaggedApi: android.app.usage.UsageEvents.Event#getTaskRootPackageName():
+    New API must be flagged with @FlaggedApi: method android.app.usage.UsageEvents.Event.getTaskRootPackageName()
+UnflaggedApi: android.app.usage.UsageEvents.Event#isInstantApp():
+    New API must be flagged with @FlaggedApi: method android.app.usage.UsageEvents.Event.isInstantApp()
+UnflaggedApi: android.app.wallpapereffectsgeneration.CinematicEffectRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.wallpapereffectsgeneration.CinematicEffectRequest.equals(Object)
+UnflaggedApi: android.app.wallpapereffectsgeneration.CinematicEffectRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.wallpapereffectsgeneration.CinematicEffectRequest.hashCode()
+UnflaggedApi: android.app.wallpapereffectsgeneration.CinematicEffectResponse#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.app.wallpapereffectsgeneration.CinematicEffectResponse.equals(Object)
+UnflaggedApi: android.app.wallpapereffectsgeneration.CinematicEffectResponse#hashCode():
+    New API must be flagged with @FlaggedApi: method android.app.wallpapereffectsgeneration.CinematicEffectResponse.hashCode()
+UnflaggedApi: android.companion.virtual.VirtualDeviceManager.VirtualDevice#getPersistentDeviceId():
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceManager.VirtualDevice.getPersistentDeviceId()
+UnflaggedApi: android.companion.virtual.VirtualDeviceParams#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceParams.equals(Object)
+UnflaggedApi: android.companion.virtual.VirtualDeviceParams#hashCode():
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceParams.hashCode()
+UnflaggedApi: android.companion.virtual.VirtualDeviceParams#toString():
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceParams.toString()
+UnflaggedApi: android.companion.virtual.sensor.VirtualSensorConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.companion.virtual.sensor.VirtualSensorConfig.toString()
+UnflaggedApi: android.content.Intent#ACTION_UNARCHIVE_PACKAGE:
+    New API must be flagged with @FlaggedApi: field android.content.Intent.ACTION_UNARCHIVE_PACKAGE
+UnflaggedApi: android.content.integrity.Rule#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.content.integrity.Rule.equals(Object)
+UnflaggedApi: android.content.integrity.Rule#hashCode():
+    New API must be flagged with @FlaggedApi: method android.content.integrity.Rule.hashCode()
+UnflaggedApi: android.content.integrity.Rule#toString():
+    New API must be flagged with @FlaggedApi: method android.content.integrity.Rule.toString()
+UnflaggedApi: android.content.pm.PackageArchiver:
+    New API must be flagged with @FlaggedApi: class android.content.pm.PackageArchiver
+UnflaggedApi: android.content.pm.PackageArchiver#EXTRA_UNARCHIVE_ALL_USERS:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageArchiver.EXTRA_UNARCHIVE_ALL_USERS
+UnflaggedApi: android.content.pm.PackageArchiver#EXTRA_UNARCHIVE_PACKAGE_NAME:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageArchiver.EXTRA_UNARCHIVE_PACKAGE_NAME
+UnflaggedApi: android.content.pm.PackageArchiver#requestArchive(String, android.content.IntentSender):
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageArchiver.requestArchive(String,android.content.IntentSender)
+UnflaggedApi: android.content.pm.PackageArchiver#requestUnarchive(String):
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageArchiver.requestUnarchive(String)
+UnflaggedApi: android.content.pm.PackageInfo#isArchived:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageInfo.isArchived
+UnflaggedApi: android.content.pm.PackageInstaller#readInstallInfo(android.os.ParcelFileDescriptor, String, int):
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageInstaller.readInstallInfo(android.os.ParcelFileDescriptor,String,int)
+UnflaggedApi: android.content.pm.PackageInstaller.InstallInfo#calculateInstalledSize(android.content.pm.PackageInstaller.SessionParams, android.os.ParcelFileDescriptor):
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageInstaller.InstallInfo.calculateInstalledSize(android.content.pm.PackageInstaller.SessionParams,android.os.ParcelFileDescriptor)
+UnflaggedApi: android.content.pm.PackageInstaller.SessionInfo#getResolvedBaseApkPath():
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageInstaller.SessionInfo.getResolvedBaseApkPath()
+UnflaggedApi: android.content.pm.PackageManager#EXTRA_REQUEST_PERMISSIONS_DEVICE_ID:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageManager.EXTRA_REQUEST_PERMISSIONS_DEVICE_ID
+UnflaggedApi: android.content.pm.PackageManager#MATCH_ARCHIVED_PACKAGES:
+    New API must be flagged with @FlaggedApi: field android.content.pm.PackageManager.MATCH_ARCHIVED_PACKAGES
+UnflaggedApi: android.content.pm.PackageManager#getPackageArchiver():
+    New API must be flagged with @FlaggedApi: method android.content.pm.PackageManager.getPackageArchiver()
+UnflaggedApi: android.content.pm.SuspendDialogInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.content.pm.SuspendDialogInfo.equals(Object)
+UnflaggedApi: android.content.pm.SuspendDialogInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.content.pm.SuspendDialogInfo.hashCode()
+UnflaggedApi: android.content.pm.SuspendDialogInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.content.pm.SuspendDialogInfo.toString()
+UnflaggedApi: android.content.pm.UserProperties#toString():
+    New API must be flagged with @FlaggedApi: method android.content.pm.UserProperties.toString()
+UnflaggedApi: android.content.pm.verify.domain.DomainOwner#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainOwner.equals(Object)
+UnflaggedApi: android.content.pm.verify.domain.DomainOwner#hashCode():
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainOwner.hashCode()
+UnflaggedApi: android.content.pm.verify.domain.DomainOwner#toString():
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainOwner.toString()
+UnflaggedApi: android.content.pm.verify.domain.DomainVerificationInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainVerificationInfo.equals(Object)
+UnflaggedApi: android.content.pm.verify.domain.DomainVerificationInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainVerificationInfo.hashCode()
+UnflaggedApi: android.content.pm.verify.domain.DomainVerificationInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainVerificationInfo.toString()
+UnflaggedApi: android.content.pm.verify.domain.DomainVerificationRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainVerificationRequest.equals(Object)
+UnflaggedApi: android.content.pm.verify.domain.DomainVerificationRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.content.pm.verify.domain.DomainVerificationRequest.hashCode()
+UnflaggedApi: android.hardware.biometrics.BiometricManager.Authenticators#BIOMETRIC_CONVENIENCE:
+    New API must be flagged with @FlaggedApi: field android.hardware.biometrics.BiometricManager.Authenticators.BIOMETRIC_CONVENIENCE
+UnflaggedApi: android.hardware.biometrics.BiometricManager.Authenticators#EMPTY_SET:
+    New API must be flagged with @FlaggedApi: field android.hardware.biometrics.BiometricManager.Authenticators.EMPTY_SET
+UnflaggedApi: android.hardware.display.AmbientBrightnessDayStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.display.AmbientBrightnessDayStats.equals(Object)
+UnflaggedApi: android.hardware.display.AmbientBrightnessDayStats#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.AmbientBrightnessDayStats.hashCode()
+UnflaggedApi: android.hardware.display.AmbientBrightnessDayStats#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.AmbientBrightnessDayStats.toString()
+UnflaggedApi: android.hardware.display.BrightnessChangeEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessChangeEvent.toString()
+UnflaggedApi: android.hardware.display.BrightnessConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessConfiguration.equals(Object)
+UnflaggedApi: android.hardware.display.BrightnessConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessConfiguration.hashCode()
+UnflaggedApi: android.hardware.display.BrightnessConfiguration#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessConfiguration.toString()
+UnflaggedApi: android.hardware.display.BrightnessCorrection#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessCorrection.equals(Object)
+UnflaggedApi: android.hardware.display.BrightnessCorrection#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessCorrection.hashCode()
+UnflaggedApi: android.hardware.display.BrightnessCorrection#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.display.BrightnessCorrection.toString()
+UnflaggedApi: android.hardware.hdmi.HdmiDeviceInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiDeviceInfo.equals(Object)
+UnflaggedApi: android.hardware.hdmi.HdmiDeviceInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiDeviceInfo.hashCode()
+UnflaggedApi: android.hardware.hdmi.HdmiDeviceInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiDeviceInfo.toString()
+UnflaggedApi: android.hardware.hdmi.HdmiPortInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiPortInfo.equals(Object)
+UnflaggedApi: android.hardware.hdmi.HdmiPortInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiPortInfo.hashCode()
+UnflaggedApi: android.hardware.hdmi.HdmiPortInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.hdmi.HdmiPortInfo.toString()
+UnflaggedApi: android.hardware.location.ContextHubClient#finalize():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubClient.finalize()
+UnflaggedApi: android.hardware.location.ContextHubInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubInfo.equals(Object)
+UnflaggedApi: android.hardware.location.ContextHubInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubInfo.toString()
+UnflaggedApi: android.hardware.location.ContextHubIntentEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubIntentEvent.equals(Object)
+UnflaggedApi: android.hardware.location.ContextHubIntentEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubIntentEvent.toString()
+UnflaggedApi: android.hardware.location.ContextHubMessage#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.ContextHubMessage.toString()
+UnflaggedApi: android.hardware.location.GeofenceHardwareMonitorEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.GeofenceHardwareMonitorEvent.toString()
+UnflaggedApi: android.hardware.location.MemoryRegion#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.location.MemoryRegion.equals(Object)
+UnflaggedApi: android.hardware.location.MemoryRegion#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.MemoryRegion.toString()
+UnflaggedApi: android.hardware.location.NanoApp#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoApp.toString()
+UnflaggedApi: android.hardware.location.NanoAppFilter#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppFilter.toString()
+UnflaggedApi: android.hardware.location.NanoAppInstanceInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppInstanceInfo.toString()
+UnflaggedApi: android.hardware.location.NanoAppMessage#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppMessage.equals(Object)
+UnflaggedApi: android.hardware.location.NanoAppMessage#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppMessage.toString()
+UnflaggedApi: android.hardware.location.NanoAppRpcService#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppRpcService.equals(Object)
+UnflaggedApi: android.hardware.location.NanoAppRpcService#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppRpcService.hashCode()
+UnflaggedApi: android.hardware.location.NanoAppRpcService#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.location.NanoAppRpcService.toString()
+UnflaggedApi: android.hardware.radio.ProgramList.Filter#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramList.Filter.equals(Object)
+UnflaggedApi: android.hardware.radio.ProgramList.Filter#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramList.Filter.hashCode()
+UnflaggedApi: android.hardware.radio.ProgramList.Filter#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramList.Filter.toString()
+UnflaggedApi: android.hardware.radio.ProgramSelector#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.equals(Object)
+UnflaggedApi: android.hardware.radio.ProgramSelector#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.hashCode()
+UnflaggedApi: android.hardware.radio.ProgramSelector#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.toString()
+UnflaggedApi: android.hardware.radio.ProgramSelector.Identifier#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.Identifier.equals(Object)
+UnflaggedApi: android.hardware.radio.ProgramSelector.Identifier#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.Identifier.hashCode()
+UnflaggedApi: android.hardware.radio.ProgramSelector.Identifier#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.ProgramSelector.Identifier.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandConfig.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandConfig.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandConfig.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandDescriptor#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandDescriptor.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandDescriptor#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandDescriptor.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.AmBandDescriptor#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.AmBandDescriptor.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.BandConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandConfig.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.BandConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandConfig.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.BandConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandConfig.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.BandDescriptor#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandDescriptor.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.BandDescriptor#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandDescriptor.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.BandDescriptor#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.BandDescriptor.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandConfig.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandConfig.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandConfig.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandDescriptor#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandDescriptor.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandDescriptor#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandDescriptor.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.FmBandDescriptor#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.FmBandDescriptor.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.ModuleProperties#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ModuleProperties.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.ModuleProperties#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ModuleProperties.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.ModuleProperties#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ModuleProperties.toString()
+UnflaggedApi: android.hardware.radio.RadioManager.ProgramInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ProgramInfo.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioManager.ProgramInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ProgramInfo.hashCode()
+UnflaggedApi: android.hardware.radio.RadioManager.ProgramInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioManager.ProgramInfo.toString()
+UnflaggedApi: android.hardware.radio.RadioMetadata#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioMetadata.equals(Object)
+UnflaggedApi: android.hardware.radio.RadioMetadata#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioMetadata.hashCode()
+UnflaggedApi: android.hardware.radio.RadioMetadata#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.radio.RadioMetadata.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.Keyphrase#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.Keyphrase.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.Keyphrase#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.Keyphrase.hashCode()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.Keyphrase#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.Keyphrase.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra.hashCode()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionExtra.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel.hashCode()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.ModelParamRange#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.ModelParamRange.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.ModelParamRange#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.ModelParamRange.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.ModuleProperties#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.ModuleProperties.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.ModuleProperties#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.ModuleProperties.hashCode()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.ModuleProperties#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.ModuleProperties.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.RecognitionEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.RecognitionEvent.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.RecognitionEvent#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.RecognitionEvent.hashCode()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.RecognitionEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.RecognitionEvent.toString()
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.SoundModel#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.SoundModel.equals(Object)
+UnflaggedApi: android.hardware.soundtrigger.SoundTrigger.SoundModel#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.soundtrigger.SoundTrigger.SoundModel.hashCode()
+UnflaggedApi: android.hardware.usb.DisplayPortAltModeInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.hardware.usb.DisplayPortAltModeInfo.equals(Object)
+UnflaggedApi: android.hardware.usb.DisplayPortAltModeInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.hardware.usb.DisplayPortAltModeInfo.hashCode()
+UnflaggedApi: android.hardware.usb.DisplayPortAltModeInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.usb.DisplayPortAltModeInfo.toString()
+UnflaggedApi: android.hardware.usb.UsbPort#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.usb.UsbPort.toString()
+UnflaggedApi: android.hardware.usb.UsbPortStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.hardware.usb.UsbPortStatus.toString()
+UnflaggedApi: android.location.CorrelationVector#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.CorrelationVector.equals(Object)
+UnflaggedApi: android.location.CorrelationVector#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.CorrelationVector.hashCode()
+UnflaggedApi: android.location.CorrelationVector#toString():
+    New API must be flagged with @FlaggedApi: method android.location.CorrelationVector.toString()
+UnflaggedApi: android.location.Country#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.Country.equals(Object)
+UnflaggedApi: android.location.Country#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.Country.hashCode()
+UnflaggedApi: android.location.Country#toString():
+    New API must be flagged with @FlaggedApi: method android.location.Country.toString()
+UnflaggedApi: android.location.GnssExcessPathInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.GnssExcessPathInfo.equals(Object)
+UnflaggedApi: android.location.GnssExcessPathInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.GnssExcessPathInfo.hashCode()
+UnflaggedApi: android.location.GnssExcessPathInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GnssExcessPathInfo.toString()
+UnflaggedApi: android.location.GnssMeasurementCorrections#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GnssMeasurementCorrections.toString()
+UnflaggedApi: android.location.GnssMeasurementRequest#getWorkSource():
+    New API must be flagged with @FlaggedApi: method android.location.GnssMeasurementRequest.getWorkSource()
+UnflaggedApi: android.location.GnssMeasurementRequest.Builder#setWorkSource(android.os.WorkSource):
+    New API must be flagged with @FlaggedApi: method android.location.GnssMeasurementRequest.Builder.setWorkSource(android.os.WorkSource)
+UnflaggedApi: android.location.GnssReflectingPlane#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.GnssReflectingPlane.equals(Object)
+UnflaggedApi: android.location.GnssReflectingPlane#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.GnssReflectingPlane.hashCode()
+UnflaggedApi: android.location.GnssReflectingPlane#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GnssReflectingPlane.toString()
+UnflaggedApi: android.location.GnssRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.GnssRequest.equals(Object)
+UnflaggedApi: android.location.GnssRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.GnssRequest.hashCode()
+UnflaggedApi: android.location.GnssRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GnssRequest.toString()
+UnflaggedApi: android.location.GnssSingleSatCorrection#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.GnssSingleSatCorrection.equals(Object)
+UnflaggedApi: android.location.GnssSingleSatCorrection#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.GnssSingleSatCorrection.hashCode()
+UnflaggedApi: android.location.GnssSingleSatCorrection#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GnssSingleSatCorrection.toString()
+UnflaggedApi: android.location.GpsClock#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GpsClock.toString()
+UnflaggedApi: android.location.GpsMeasurement#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GpsMeasurement.toString()
+UnflaggedApi: android.location.GpsMeasurementsEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GpsMeasurementsEvent.toString()
+UnflaggedApi: android.location.GpsNavigationMessage#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GpsNavigationMessage.toString()
+UnflaggedApi: android.location.GpsNavigationMessageEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.location.GpsNavigationMessageEvent.toString()
+UnflaggedApi: android.location.LastLocationRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.LastLocationRequest.equals(Object)
+UnflaggedApi: android.location.LastLocationRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.LastLocationRequest.hashCode()
+UnflaggedApi: android.location.LastLocationRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.location.LastLocationRequest.toString()
+UnflaggedApi: android.location.SatellitePvt#toString():
+    New API must be flagged with @FlaggedApi: method android.location.SatellitePvt.toString()
+UnflaggedApi: android.location.SatellitePvt.ClockInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.location.SatellitePvt.ClockInfo.toString()
+UnflaggedApi: android.location.SatellitePvt.PositionEcef#toString():
+    New API must be flagged with @FlaggedApi: method android.location.SatellitePvt.PositionEcef.toString()
+UnflaggedApi: android.location.SatellitePvt.VelocityEcef#toString():
+    New API must be flagged with @FlaggedApi: method android.location.SatellitePvt.VelocityEcef.toString()
+UnflaggedApi: android.location.provider.ProviderRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.location.provider.ProviderRequest.equals(Object)
+UnflaggedApi: android.location.provider.ProviderRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.location.provider.ProviderRequest.hashCode()
+UnflaggedApi: android.location.provider.ProviderRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.location.provider.ProviderRequest.toString()
+UnflaggedApi: android.media.AudioDeviceAttributes#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.AudioDeviceAttributes.equals(Object)
+UnflaggedApi: android.media.AudioDeviceAttributes#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.AudioDeviceAttributes.hashCode()
+UnflaggedApi: android.media.AudioDeviceAttributes#toString():
+    New API must be flagged with @FlaggedApi: method android.media.AudioDeviceAttributes.toString()
+UnflaggedApi: android.media.AudioFocusInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.AudioFocusInfo.equals(Object)
+UnflaggedApi: android.media.AudioFocusInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.AudioFocusInfo.hashCode()
+UnflaggedApi: android.media.MediaRecorder.AudioSource#ECHO_REFERENCE:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRecorder.AudioSource.ECHO_REFERENCE
+UnflaggedApi: android.media.MediaRecorder.AudioSource#HOTWORD:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRecorder.AudioSource.HOTWORD
+UnflaggedApi: android.media.MediaRecorder.AudioSource#RADIO_TUNER:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRecorder.AudioSource.RADIO_TUNER
+UnflaggedApi: android.media.MediaRecorder.AudioSource#ULTRASOUND:
+    New API must be flagged with @FlaggedApi: field android.media.MediaRecorder.AudioSource.ULTRASOUND
+UnflaggedApi: android.media.NearbyDevice#toString():
+    New API must be flagged with @FlaggedApi: method android.media.NearbyDevice.toString()
+UnflaggedApi: android.media.VolumeInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.VolumeInfo.equals(Object)
+UnflaggedApi: android.media.VolumeInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.VolumeInfo.hashCode()
+UnflaggedApi: android.media.VolumeInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.media.VolumeInfo.toString()
+UnflaggedApi: android.media.audiopolicy.AudioMix#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.media.audiopolicy.AudioMix.CREATOR
+UnflaggedApi: android.media.audiopolicy.AudioMix#describeContents():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioMix.describeContents()
+UnflaggedApi: android.media.audiopolicy.AudioMix#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioMix.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.media.audiopolicy.AudioMixingRule#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.media.audiopolicy.AudioMixingRule.CREATOR
+UnflaggedApi: android.media.audiopolicy.AudioMixingRule#describeContents():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioMixingRule.describeContents()
+UnflaggedApi: android.media.audiopolicy.AudioMixingRule#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioMixingRule.hashCode()
+UnflaggedApi: android.media.audiopolicy.AudioMixingRule#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioMixingRule.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.media.audiopolicy.AudioPolicy#updateMixingRules(java.util.List<android.util.Pair<android.media.audiopolicy.AudioMix,android.media.audiopolicy.AudioMixingRule>>):
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioPolicy.updateMixingRules(java.util.List<android.util.Pair<android.media.audiopolicy.AudioMix,android.media.audiopolicy.AudioMixingRule>>)
+UnflaggedApi: android.media.audiopolicy.AudioProductStrategy#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioProductStrategy.equals(Object)
+UnflaggedApi: android.media.audiopolicy.AudioProductStrategy#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioProductStrategy.hashCode()
+UnflaggedApi: android.media.audiopolicy.AudioProductStrategy#toString():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioProductStrategy.toString()
+UnflaggedApi: android.media.audiopolicy.AudioVolumeGroup#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioVolumeGroup.equals(Object)
+UnflaggedApi: android.media.audiopolicy.AudioVolumeGroup#toString():
+    New API must be flagged with @FlaggedApi: method android.media.audiopolicy.AudioVolumeGroup.toString()
+UnflaggedApi: android.media.musicrecognition.MusicRecognitionService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.media.musicrecognition.MusicRecognitionService.onCreate()
+UnflaggedApi: android.media.soundtrigger.SoundTriggerDetectionService#onUnbind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.media.soundtrigger.SoundTriggerDetectionService.onUnbind(android.content.Intent)
+UnflaggedApi: android.media.tv.TunedInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.tv.TunedInfo.equals(Object)
+UnflaggedApi: android.media.tv.TunedInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.media.tv.TunedInfo.hashCode()
+UnflaggedApi: android.media.tv.TunedInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.media.tv.TunedInfo.toString()
+UnflaggedApi: android.media.tv.TvInputHardwareInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.media.tv.TvInputHardwareInfo.toString()
+UnflaggedApi: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle):
+    New API must be flagged with @FlaggedApi: method android.media.tv.TvRecordingClient.RecordingCallback.onEvent(String,String,android.os.Bundle)
+UnflaggedApi: android.media.tv.TvStreamConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.media.tv.TvStreamConfig.equals(Object)
+UnflaggedApi: android.media.tv.TvStreamConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.media.tv.TvStreamConfig.toString()
+UnflaggedApi: android.net.MatchAllNetworkSpecifier#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.MatchAllNetworkSpecifier.equals(Object)
+UnflaggedApi: android.net.MatchAllNetworkSpecifier#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.MatchAllNetworkSpecifier.hashCode()
+UnflaggedApi: android.net.NetworkKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.NetworkKey.equals(Object)
+UnflaggedApi: android.net.NetworkKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.NetworkKey.hashCode()
+UnflaggedApi: android.net.NetworkKey#toString():
+    New API must be flagged with @FlaggedApi: method android.net.NetworkKey.toString()
+UnflaggedApi: android.net.RssiCurve#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.RssiCurve.equals(Object)
+UnflaggedApi: android.net.RssiCurve#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.RssiCurve.hashCode()
+UnflaggedApi: android.net.RssiCurve#toString():
+    New API must be flagged with @FlaggedApi: method android.net.RssiCurve.toString()
+UnflaggedApi: android.net.ScoredNetwork#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.ScoredNetwork.equals(Object)
+UnflaggedApi: android.net.ScoredNetwork#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.ScoredNetwork.hashCode()
+UnflaggedApi: android.net.ScoredNetwork#toString():
+    New API must be flagged with @FlaggedApi: method android.net.ScoredNetwork.toString()
+UnflaggedApi: android.net.WebAddress#toString():
+    New API must be flagged with @FlaggedApi: method android.net.WebAddress.toString()
+UnflaggedApi: android.net.WifiKey#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.WifiKey.equals(Object)
+UnflaggedApi: android.net.WifiKey#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.WifiKey.hashCode()
+UnflaggedApi: android.net.WifiKey#toString():
+    New API must be flagged with @FlaggedApi: method android.net.WifiKey.toString()
+UnflaggedApi: android.net.metrics.ApfProgramEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ApfProgramEvent.equals(Object)
+UnflaggedApi: android.net.metrics.ApfProgramEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ApfProgramEvent.toString()
+UnflaggedApi: android.net.metrics.ApfStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ApfStats.equals(Object)
+UnflaggedApi: android.net.metrics.ApfStats#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ApfStats.toString()
+UnflaggedApi: android.net.metrics.DhcpClientEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.DhcpClientEvent.equals(Object)
+UnflaggedApi: android.net.metrics.DhcpClientEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.DhcpClientEvent.toString()
+UnflaggedApi: android.net.metrics.DhcpErrorEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.DhcpErrorEvent.toString()
+UnflaggedApi: android.net.metrics.IpManagerEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.IpManagerEvent.equals(Object)
+UnflaggedApi: android.net.metrics.IpManagerEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.IpManagerEvent.toString()
+UnflaggedApi: android.net.metrics.IpReachabilityEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.IpReachabilityEvent.equals(Object)
+UnflaggedApi: android.net.metrics.IpReachabilityEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.IpReachabilityEvent.toString()
+UnflaggedApi: android.net.metrics.NetworkEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.NetworkEvent.equals(Object)
+UnflaggedApi: android.net.metrics.NetworkEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.NetworkEvent.toString()
+UnflaggedApi: android.net.metrics.RaEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.RaEvent.equals(Object)
+UnflaggedApi: android.net.metrics.RaEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.RaEvent.toString()
+UnflaggedApi: android.net.metrics.ValidationProbeEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ValidationProbeEvent.equals(Object)
+UnflaggedApi: android.net.metrics.ValidationProbeEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.net.metrics.ValidationProbeEvent.toString()
+UnflaggedApi: android.net.vcn.VcnNetworkPolicyResult#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.vcn.VcnNetworkPolicyResult.equals(Object)
+UnflaggedApi: android.net.vcn.VcnNetworkPolicyResult#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.vcn.VcnNetworkPolicyResult.hashCode()
+UnflaggedApi: android.net.vcn.VcnNetworkPolicyResult#toString():
+    New API must be flagged with @FlaggedApi: method android.net.vcn.VcnNetworkPolicyResult.toString()
+UnflaggedApi: android.net.wifi.nl80211.DeviceWiphyCapabilities#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.DeviceWiphyCapabilities.equals(Object)
+UnflaggedApi: android.net.wifi.nl80211.DeviceWiphyCapabilities#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.DeviceWiphyCapabilities.hashCode()
+UnflaggedApi: android.net.wifi.nl80211.DeviceWiphyCapabilities#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.DeviceWiphyCapabilities.toString()
+UnflaggedApi: android.net.wifi.nl80211.NativeWifiClient#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.NativeWifiClient.equals(Object)
+UnflaggedApi: android.net.wifi.nl80211.NativeWifiClient#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.NativeWifiClient.hashCode()
+UnflaggedApi: android.net.wifi.nl80211.PnoNetwork#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.PnoNetwork.equals(Object)
+UnflaggedApi: android.net.wifi.nl80211.PnoNetwork#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.PnoNetwork.hashCode()
+UnflaggedApi: android.net.wifi.nl80211.PnoSettings#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.PnoSettings.equals(Object)
+UnflaggedApi: android.net.wifi.nl80211.PnoSettings#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.PnoSettings.hashCode()
+UnflaggedApi: android.net.wifi.nl80211.RadioChainInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.RadioChainInfo.equals(Object)
+UnflaggedApi: android.net.wifi.nl80211.RadioChainInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.nl80211.RadioChainInfo.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetwork#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetwork.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetwork#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetwork.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetwork#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetwork.toString()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.HotspotNetworkConnectionStatus.toString()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetwork#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetwork.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetwork#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetwork.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetwork#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetwork.toString()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.KnownNetworkConnectionStatus.toString()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.NetworkProviderInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.NetworkProviderInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.NetworkProviderInfo#isBatteryCharging():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.isBatteryCharging()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.NetworkProviderInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.toString()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.Builder#setBatteryCharging(boolean):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.NetworkProviderInfo.Builder.setBatteryCharging(boolean)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState.equals(Object)
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState.hashCode()
+UnflaggedApi: android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState#toString():
+    New API must be flagged with @FlaggedApi: method android.net.wifi.sharedconnectivity.app.SharedConnectivitySettingsState.toString()
+UnflaggedApi: android.os.BatterySaverPolicyConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.os.BatterySaverPolicyConfig.toString()
+UnflaggedApi: android.os.BugreportParams#BUGREPORT_MODE_ONBOARDING:
+    New API must be flagged with @FlaggedApi: field android.os.BugreportParams.BUGREPORT_MODE_ONBOARDING
+UnflaggedApi: android.os.Build.VERSION#KNOWN_CODENAMES:
+    New API must be flagged with @FlaggedApi: field android.os.Build.VERSION.KNOWN_CODENAMES
+UnflaggedApi: android.os.Build.VERSION#PREVIEW_SDK_FINGERPRINT:
+    New API must be flagged with @FlaggedApi: field android.os.Build.VERSION.PREVIEW_SDK_FINGERPRINT
+UnflaggedApi: android.os.IncidentManager.PendingReport#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.IncidentManager.PendingReport.equals(Object)
+UnflaggedApi: android.os.IncidentManager.PendingReport#toString():
+    New API must be flagged with @FlaggedApi: method android.os.IncidentManager.PendingReport.toString()
+UnflaggedApi: android.os.IncidentReportArgs#toString():
+    New API must be flagged with @FlaggedApi: method android.os.IncidentReportArgs.toString()
+UnflaggedApi: android.os.NewUserRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.os.NewUserRequest.toString()
+UnflaggedApi: android.os.NewUserResponse#toString():
+    New API must be flagged with @FlaggedApi: method android.os.NewUserResponse.toString()
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPolicy#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPolicy.equals(Object)
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPolicy#hashCode():
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPolicy.hashCode()
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPolicy#toString():
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPolicy.toString()
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPortDescription#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPortDescription.equals(Object)
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPortDescription#hashCode():
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPortDescription.hashCode()
+UnflaggedApi: android.os.PowerManager.LowPowerStandbyPortDescription#toString():
+    New API must be flagged with @FlaggedApi: method android.os.PowerManager.LowPowerStandbyPortDescription.toString()
+UnflaggedApi: android.os.ServiceSpecificException#toString():
+    New API must be flagged with @FlaggedApi: method android.os.ServiceSpecificException.toString()
+UnflaggedApi: android.os.WorkSource.WorkChain#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.WorkSource.WorkChain.equals(Object)
+UnflaggedApi: android.os.WorkSource.WorkChain#hashCode():
+    New API must be flagged with @FlaggedApi: method android.os.WorkSource.WorkChain.hashCode()
+UnflaggedApi: android.os.WorkSource.WorkChain#toString():
+    New API must be flagged with @FlaggedApi: method android.os.WorkSource.WorkChain.toString()
+UnflaggedApi: android.os.connectivity.CellularBatteryStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.connectivity.CellularBatteryStats.equals(Object)
+UnflaggedApi: android.os.connectivity.CellularBatteryStats#hashCode():
+    New API must be flagged with @FlaggedApi: method android.os.connectivity.CellularBatteryStats.hashCode()
+UnflaggedApi: android.os.connectivity.WifiActivityEnergyInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.os.connectivity.WifiActivityEnergyInfo.toString()
+UnflaggedApi: android.os.connectivity.WifiBatteryStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.os.connectivity.WifiBatteryStats.equals(Object)
+UnflaggedApi: android.os.connectivity.WifiBatteryStats#hashCode():
+    New API must be flagged with @FlaggedApi: method android.os.connectivity.WifiBatteryStats.hashCode()
+UnflaggedApi: android.permission.AdminPermissionControlParams#toString():
+    New API must be flagged with @FlaggedApi: method android.permission.AdminPermissionControlParams.toString()
+UnflaggedApi: android.permission.PermissionGroupUsage#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.permission.PermissionGroupUsage.equals(Object)
+UnflaggedApi: android.permission.PermissionGroupUsage#hashCode():
+    New API must be flagged with @FlaggedApi: method android.permission.PermissionGroupUsage.hashCode()
+UnflaggedApi: android.permission.PermissionGroupUsage#toString():
+    New API must be flagged with @FlaggedApi: method android.permission.PermissionGroupUsage.toString()
+UnflaggedApi: android.permission.PermissionManager.SplitPermissionInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.permission.PermissionManager.SplitPermissionInfo.equals(Object)
+UnflaggedApi: android.permission.PermissionManager.SplitPermissionInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.permission.PermissionManager.SplitPermissionInfo.hashCode()
+UnflaggedApi: android.printservice.PrintServiceInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.printservice.PrintServiceInfo.equals(Object)
+UnflaggedApi: android.printservice.PrintServiceInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.printservice.PrintServiceInfo.hashCode()
+UnflaggedApi: android.printservice.PrintServiceInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.printservice.PrintServiceInfo.toString()
+UnflaggedApi: android.printservice.recommendation.RecommendationService#attachBaseContext(android.content.Context):
+    New API must be flagged with @FlaggedApi: method android.printservice.recommendation.RecommendationService.attachBaseContext(android.content.Context)
+UnflaggedApi: android.provider.CallLog.CallComposerLoggingException#toString():
+    New API must be flagged with @FlaggedApi: method android.provider.CallLog.CallComposerLoggingException.toString()
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#CONTENT_ITEM_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync.CONTENT_ITEM_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#CONTENT_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync.CONTENT_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#CONTENT_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync.CONTENT_URI
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#METADATA_AUTHORITY:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync.METADATA_AUTHORITY
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#METADATA_AUTHORITY_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync.METADATA_AUTHORITY_URI
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#_COUNT:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync._COUNT
+UnflaggedApi: android.provider.ContactsContract.MetadataSync#_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSync._ID
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#ACCOUNT_NAME:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.ACCOUNT_NAME
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#ACCOUNT_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.ACCOUNT_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#DATA:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.DATA
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#DATA_SET:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.DATA_SET
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#DELETED:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.DELETED
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncColumns#RAW_CONTACT_BACKUP_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncColumns.RAW_CONTACT_BACKUP_ID
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncState#CONTENT_ITEM_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncState.CONTENT_ITEM_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncState#CONTENT_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncState.CONTENT_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncState#CONTENT_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncState.CONTENT_URI
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncState#_COUNT:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncState._COUNT
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncState#_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncState._ID
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncStateColumns#ACCOUNT_NAME:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncStateColumns.ACCOUNT_NAME
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncStateColumns#ACCOUNT_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncStateColumns.ACCOUNT_TYPE
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncStateColumns#DATA_SET:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncStateColumns.DATA_SET
+UnflaggedApi: android.provider.ContactsContract.MetadataSyncStateColumns#STATE:
+    New API must be flagged with @FlaggedApi: field android.provider.ContactsContract.MetadataSyncStateColumns.STATE
+UnflaggedApi: android.provider.ContactsContract.Settings#setDefaultAccount(android.content.ContentResolver, android.accounts.Account):
+    New API must be flagged with @FlaggedApi: method android.provider.ContactsContract.Settings.setDefaultAccount(android.content.ContentResolver,android.accounts.Account)
+UnflaggedApi: android.provider.ContactsContract.SimContacts#addSimAccount(android.content.ContentResolver, String, String, int, int):
+    New API must be flagged with @FlaggedApi: method android.provider.ContactsContract.SimContacts.addSimAccount(android.content.ContentResolver,String,String,int,int)
+UnflaggedApi: android.provider.ContactsContract.SimContacts#removeSimAccounts(android.content.ContentResolver, int):
+    New API must be flagged with @FlaggedApi: method android.provider.ContactsContract.SimContacts.removeSimAccounts(android.content.ContentResolver,int)
+UnflaggedApi: android.provider.SearchIndexableData#toString():
+    New API must be flagged with @FlaggedApi: method android.provider.SearchIndexableData.toString()
+UnflaggedApi: android.provider.SearchIndexableResource#toString():
+    New API must be flagged with @FlaggedApi: method android.provider.SearchIndexableResource.toString()
+UnflaggedApi: android.provider.SearchIndexablesProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo):
+    New API must be flagged with @FlaggedApi: method android.provider.SearchIndexablesProvider.attachInfo(android.content.Context,android.content.pm.ProviderInfo)
+UnflaggedApi: android.provider.Settings#ACTION_APP_PERMISSIONS_SETTINGS:
+    New API must be flagged with @FlaggedApi: field android.provider.Settings.ACTION_APP_PERMISSIONS_SETTINGS
+UnflaggedApi: android.provider.Settings.System#putString(android.content.ContentResolver, String, String, boolean, boolean):
+    New API must be flagged with @FlaggedApi: method android.provider.Settings.System.putString(android.content.ContentResolver,String,String,boolean,boolean)
+UnflaggedApi: android.provider.Settings.System#resetToDefaults(android.content.ContentResolver, String):
+    New API must be flagged with @FlaggedApi: method android.provider.Settings.System.resetToDefaults(android.content.ContentResolver,String)
+UnflaggedApi: android.provider.SimPhonebookContract.SimRecords#QUERY_ARG_PIN2:
+    New API must be flagged with @FlaggedApi: field android.provider.SimPhonebookContract.SimRecords.QUERY_ARG_PIN2
+UnflaggedApi: android.provider.Telephony.Carriers#APN_SET_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.APN_SET_ID
+UnflaggedApi: android.provider.Telephony.Carriers#CARRIER_EDITED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.CARRIER_EDITED
+UnflaggedApi: android.provider.Telephony.Carriers#EDITED_STATUS:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.EDITED_STATUS
+UnflaggedApi: android.provider.Telephony.Carriers#MATCH_ALL_APN_SET_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.MATCH_ALL_APN_SET_ID
+UnflaggedApi: android.provider.Telephony.Carriers#MAX_CONNECTIONS:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.MAX_CONNECTIONS
+UnflaggedApi: android.provider.Telephony.Carriers#MODEM_PERSIST:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.MODEM_PERSIST
+UnflaggedApi: android.provider.Telephony.Carriers#MTU_V4:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.MTU_V4
+UnflaggedApi: android.provider.Telephony.Carriers#MTU_V6:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.MTU_V6
+UnflaggedApi: android.provider.Telephony.Carriers#NO_APN_SET_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.NO_APN_SET_ID
+UnflaggedApi: android.provider.Telephony.Carriers#TIME_LIMIT_FOR_MAX_CONNECTIONS:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.TIME_LIMIT_FOR_MAX_CONNECTIONS
+UnflaggedApi: android.provider.Telephony.Carriers#UNEDITED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.UNEDITED
+UnflaggedApi: android.provider.Telephony.Carriers#USER_DELETED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.USER_DELETED
+UnflaggedApi: android.provider.Telephony.Carriers#USER_EDITABLE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.USER_EDITABLE
+UnflaggedApi: android.provider.Telephony.Carriers#USER_EDITED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.USER_EDITED
+UnflaggedApi: android.provider.Telephony.Carriers#USER_VISIBLE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.USER_VISIBLE
+UnflaggedApi: android.provider.Telephony.Carriers#WAIT_TIME_RETRY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Carriers.WAIT_TIME_RETRY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts:
+    New API must be flagged with @FlaggedApi: class android.provider.Telephony.CellBroadcasts
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#AUTHORITY_LEGACY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.AUTHORITY_LEGACY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#AUTHORITY_LEGACY_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.AUTHORITY_LEGACY_URI
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CALL_METHOD_GET_PREFERENCE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CALL_METHOD_GET_PREFERENCE
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CID
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_CATEGORY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_CATEGORY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_CERTAINTY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_CERTAINTY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_MESSAGE_CLASS:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_MESSAGE_CLASS
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_RESPONSE_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_RESPONSE_TYPE
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_SEVERITY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_SEVERITY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CMAS_URGENCY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CMAS_URGENCY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#CONTENT_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.CONTENT_URI
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#DATA_CODING_SCHEME:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.DATA_CODING_SCHEME
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#DEFAULT_SORT_ORDER:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.DEFAULT_SORT_ORDER
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#DELIVERY_TIME:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.DELIVERY_TIME
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#ETWS_IS_PRIMARY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.ETWS_IS_PRIMARY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#ETWS_WARNING_TYPE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.ETWS_WARNING_TYPE
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#GEOGRAPHICAL_SCOPE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.GEOGRAPHICAL_SCOPE
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#GEOMETRIES:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.GEOMETRIES
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#LAC:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.LAC
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#LANGUAGE_CODE:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.LANGUAGE_CODE
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#LOCATION_CHECK_TIME:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.LOCATION_CHECK_TIME
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MAXIMUM_WAIT_TIME:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MAXIMUM_WAIT_TIME
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_BODY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_BODY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_BROADCASTED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_BROADCASTED
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_DISPLAYED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_DISPLAYED
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_FORMAT:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_FORMAT
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_HISTORY_URI:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_HISTORY_URI
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_PRIORITY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_PRIORITY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#MESSAGE_READ:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.MESSAGE_READ
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#PLMN:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.PLMN
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#RECEIVED_TIME:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.RECEIVED_TIME
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#SERIAL_NUMBER:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.SERIAL_NUMBER
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#SERVICE_CATEGORY:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.SERVICE_CATEGORY
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#SLOT_INDEX:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.SLOT_INDEX
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#SUBSCRIPTION_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.SUBSCRIPTION_ID
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#_COUNT:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts._COUNT
+UnflaggedApi: android.provider.Telephony.CellBroadcasts#_ID:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts._ID
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference:
+    New API must be flagged with @FlaggedApi: class android.provider.Telephony.CellBroadcasts.Preference
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_ALERT_VIBRATION_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_ALERT_VIBRATION_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_AREA_UPDATE_INFO_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_AREA_UPDATE_INFO_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_CMAS_AMBER_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_CMAS_AMBER_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_CMAS_EXTREME_THREAT_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_CMAS_EXTREME_THREAT_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_CMAS_IN_SECOND_LANGUAGE_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_CMAS_IN_SECOND_LANGUAGE_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_CMAS_PRESIDENTIAL_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_CMAS_PRESIDENTIAL_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_CMAS_SEVERE_THREAT_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_CMAS_SEVERE_THREAT_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_EMERGENCY_PERF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_EMERGENCY_PERF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_PUBLIC_SAFETY_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_PUBLIC_SAFETY_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_STATE_LOCAL_TEST_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_STATE_LOCAL_TEST_PREF
+UnflaggedApi: android.provider.Telephony.CellBroadcasts.Preference#ENABLE_TEST_ALERT_PREF:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.CellBroadcasts.Preference.ENABLE_TEST_ALERT_PREF
+UnflaggedApi: android.provider.Telephony.Sms.Intents#ACTION_SMS_EMERGENCY_CB_RECEIVED:
+    New API must be flagged with @FlaggedApi: field android.provider.Telephony.Sms.Intents.ACTION_SMS_EMERGENCY_CB_RECEIVED
+UnflaggedApi: android.service.ambientcontext.AmbientContextDetectionResult#toString():
+    New API must be flagged with @FlaggedApi: method android.service.ambientcontext.AmbientContextDetectionResult.toString()
+UnflaggedApi: android.service.ambientcontext.AmbientContextDetectionServiceStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.service.ambientcontext.AmbientContextDetectionServiceStatus.toString()
+UnflaggedApi: android.service.appprediction.AppPredictionService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.appprediction.AppPredictionService.onCreate()
+UnflaggedApi: android.service.assist.classification.FieldClassificationRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.service.assist.classification.FieldClassificationRequest.toString()
+UnflaggedApi: android.service.assist.classification.FieldClassificationResponse#toString():
+    New API must be flagged with @FlaggedApi: method android.service.assist.classification.FieldClassificationResponse.toString()
+UnflaggedApi: android.service.assist.classification.FieldClassificationService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.assist.classification.FieldClassificationService.onCreate()
+UnflaggedApi: android.service.autofill.AutofillFieldClassificationService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.autofill.AutofillFieldClassificationService.onCreate()
+UnflaggedApi: android.service.autofill.Dataset.Builder#setContent(android.view.autofill.AutofillId, android.content.ClipData):
+    New API must be flagged with @FlaggedApi: method android.service.autofill.Dataset.Builder.setContent(android.view.autofill.AutofillId,android.content.ClipData)
+UnflaggedApi: android.service.autofill.augmented.AugmentedAutofillService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.autofill.augmented.AugmentedAutofillService.onCreate()
+UnflaggedApi: android.service.autofill.augmented.AugmentedAutofillService#onUnbind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.service.autofill.augmented.AugmentedAutofillService.onUnbind(android.content.Intent)
+UnflaggedApi: android.service.autofill.augmented.FillRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.service.autofill.augmented.FillRequest.toString()
+UnflaggedApi: android.service.autofill.augmented.FillWindow#finalize():
+    New API must be flagged with @FlaggedApi: method android.service.autofill.augmented.FillWindow.finalize()
+UnflaggedApi: android.service.autofill.augmented.PresentationParams.Area#toString():
+    New API must be flagged with @FlaggedApi: method android.service.autofill.augmented.PresentationParams.Area.toString()
+UnflaggedApi: android.service.cloudsearch.CloudSearchService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.cloudsearch.CloudSearchService.onCreate()
+UnflaggedApi: android.service.contentcapture.ActivityEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.service.contentcapture.ActivityEvent.toString()
+UnflaggedApi: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]):
+    New API must be flagged with @FlaggedApi: method android.service.contentcapture.ContentCaptureService.dump(java.io.FileDescriptor,java.io.PrintWriter,String[])
+UnflaggedApi: android.service.contentcapture.ContentCaptureService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.contentcapture.ContentCaptureService.onCreate()
+UnflaggedApi: android.service.contentsuggestions.ContentSuggestionsService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.contentsuggestions.ContentSuggestionsService.onCreate()
+UnflaggedApi: android.service.displayhash.DisplayHashParams#toString():
+    New API must be flagged with @FlaggedApi: method android.service.displayhash.DisplayHashParams.toString()
+UnflaggedApi: android.service.displayhash.DisplayHashingService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.displayhash.DisplayHashingService.onCreate()
+UnflaggedApi: android.service.euicc.EuiccProfileInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.euicc.EuiccProfileInfo.equals(Object)
+UnflaggedApi: android.service.euicc.EuiccProfileInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.euicc.EuiccProfileInfo.hashCode()
+UnflaggedApi: android.service.euicc.EuiccProfileInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.service.euicc.EuiccProfileInfo.toString()
+UnflaggedApi: android.service.euicc.EuiccService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.euicc.EuiccService.onCreate()
+UnflaggedApi: android.service.euicc.EuiccService#onDestroy():
+    New API must be flagged with @FlaggedApi: method android.service.euicc.EuiccService.onDestroy()
+UnflaggedApi: android.service.games.CreateGameSessionRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.games.CreateGameSessionRequest.equals(Object)
+UnflaggedApi: android.service.games.CreateGameSessionRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.games.CreateGameSessionRequest.hashCode()
+UnflaggedApi: android.service.games.CreateGameSessionRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.service.games.CreateGameSessionRequest.toString()
+UnflaggedApi: android.service.games.GameSessionService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.games.GameSessionService.onCreate()
+UnflaggedApi: android.service.games.GameStartedEvent#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.games.GameStartedEvent.equals(Object)
+UnflaggedApi: android.service.games.GameStartedEvent#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.games.GameStartedEvent.hashCode()
+UnflaggedApi: android.service.games.GameStartedEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.service.games.GameStartedEvent.toString()
+UnflaggedApi: android.service.notification.Adjustment#toString():
+    New API must be flagged with @FlaggedApi: method android.service.notification.Adjustment.toString()
+UnflaggedApi: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context):
+    New API must be flagged with @FlaggedApi: method android.service.notification.NotificationAssistantService.attachBaseContext(android.content.Context)
+UnflaggedApi: android.service.notification.NotificationStats#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.notification.NotificationStats.equals(Object)
+UnflaggedApi: android.service.notification.NotificationStats#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.notification.NotificationStats.hashCode()
+UnflaggedApi: android.service.notification.NotificationStats#toString():
+    New API must be flagged with @FlaggedApi: method android.service.notification.NotificationStats.toString()
+UnflaggedApi: android.service.notification.SnoozeCriterion#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.notification.SnoozeCriterion.equals(Object)
+UnflaggedApi: android.service.notification.SnoozeCriterion#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.notification.SnoozeCriterion.hashCode()
+UnflaggedApi: android.service.resolver.ResolverRankerService#onDestroy():
+    New API must be flagged with @FlaggedApi: method android.service.resolver.ResolverRankerService.onDestroy()
+UnflaggedApi: android.service.resolver.ResolverTarget#toString():
+    New API must be flagged with @FlaggedApi: method android.service.resolver.ResolverTarget.toString()
+UnflaggedApi: android.service.rotationresolver.RotationResolutionRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.service.rotationresolver.RotationResolutionRequest.toString()
+UnflaggedApi: android.service.search.SearchUiService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.search.SearchUiService.onCreate()
+UnflaggedApi: android.service.smartspace.SmartspaceService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.smartspace.SmartspaceService.onCreate()
+UnflaggedApi: android.service.textclassifier.TextClassifierService#onUnbind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.service.textclassifier.TextClassifierService.onUnbind(android.content.Intent)
+UnflaggedApi: android.service.timezone.TimeZoneProviderStatus#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderStatus.equals(Object)
+UnflaggedApi: android.service.timezone.TimeZoneProviderStatus#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderStatus.hashCode()
+UnflaggedApi: android.service.timezone.TimeZoneProviderStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderStatus.toString()
+UnflaggedApi: android.service.timezone.TimeZoneProviderSuggestion#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderSuggestion.equals(Object)
+UnflaggedApi: android.service.timezone.TimeZoneProviderSuggestion#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderSuggestion.hashCode()
+UnflaggedApi: android.service.timezone.TimeZoneProviderSuggestion#toString():
+    New API must be flagged with @FlaggedApi: method android.service.timezone.TimeZoneProviderSuggestion.toString()
+UnflaggedApi: android.service.translation.TranslationService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.translation.TranslationService.onCreate()
+UnflaggedApi: android.service.trust.TrustAgentService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.trust.TrustAgentService.onCreate()
+UnflaggedApi: android.service.voice.AlwaysOnHotwordDetector#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.AlwaysOnHotwordDetector.equals(Object)
+UnflaggedApi: android.service.voice.AlwaysOnHotwordDetector#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.AlwaysOnHotwordDetector.hashCode()
+UnflaggedApi: android.service.voice.AlwaysOnHotwordDetector.ModelParamRange#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.AlwaysOnHotwordDetector.ModelParamRange.equals(Object)
+UnflaggedApi: android.service.voice.AlwaysOnHotwordDetector.ModelParamRange#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.AlwaysOnHotwordDetector.ModelParamRange.hashCode()
+UnflaggedApi: android.service.voice.AlwaysOnHotwordDetector.ModelParamRange#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.AlwaysOnHotwordDetector.ModelParamRange.toString()
+UnflaggedApi: android.service.voice.HotwordAudioStream#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordAudioStream.equals(Object)
+UnflaggedApi: android.service.voice.HotwordAudioStream#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordAudioStream.hashCode()
+UnflaggedApi: android.service.voice.HotwordAudioStream#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordAudioStream.toString()
+UnflaggedApi: android.service.voice.HotwordDetectedResult#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordDetectedResult.equals(Object)
+UnflaggedApi: android.service.voice.HotwordDetectedResult#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordDetectedResult.hashCode()
+UnflaggedApi: android.service.voice.HotwordDetectedResult#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordDetectedResult.toString()
+UnflaggedApi: android.service.voice.HotwordDetectionService#getSystemService(String):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordDetectionService.getSystemService(String)
+UnflaggedApi: android.service.voice.HotwordDetectionServiceFailure#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordDetectionServiceFailure.toString()
+UnflaggedApi: android.service.voice.HotwordRejectedResult#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordRejectedResult.equals(Object)
+UnflaggedApi: android.service.voice.HotwordRejectedResult#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordRejectedResult.hashCode()
+UnflaggedApi: android.service.voice.HotwordRejectedResult#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordRejectedResult.toString()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio:
+    New API must be flagged with @FlaggedApi: class android.service.voice.HotwordTrainingAudio
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingAudio.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingAudio.CREATOR
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#HOTWORD_OFFSET_UNSET:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingAudio.HOTWORD_OFFSET_UNSET
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingAudio.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#describeContents():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.describeContents()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.equals(Object)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#getAudioFormat():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.getAudioFormat()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#getAudioType():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.getAudioType()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#getHotwordAudio():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.getHotwordAudio()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#getHotwordOffsetMillis():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.getHotwordOffsetMillis()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.hashCode()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.toString()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder:
+    New API must be flagged with @FlaggedApi: class android.service.voice.HotwordTrainingAudio.Builder
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#Builder(byte[], android.media.AudioFormat):
+    New API must be flagged with @FlaggedApi: constructor android.service.voice.HotwordTrainingAudio.Builder(byte[],android.media.AudioFormat)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#build():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.Builder.build()
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#setAudioFormat(android.media.AudioFormat):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.Builder.setAudioFormat(android.media.AudioFormat)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#setAudioType(int):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.Builder.setAudioType(int)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#setHotwordAudio(byte...):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.Builder.setHotwordAudio(byte...)
+UnflaggedApi: android.service.voice.HotwordTrainingAudio.Builder#setHotwordOffsetMillis(int):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingAudio.Builder.setHotwordOffsetMillis(int)
+UnflaggedApi: android.service.voice.HotwordTrainingData:
+    New API must be flagged with @FlaggedApi: class android.service.voice.HotwordTrainingData
+UnflaggedApi: android.service.voice.HotwordTrainingData#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.service.voice.HotwordTrainingData#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.CREATOR
+UnflaggedApi: android.service.voice.HotwordTrainingData#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.service.voice.HotwordTrainingData#TIMEOUT_STAGE_EARLY:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.TIMEOUT_STAGE_EARLY
+UnflaggedApi: android.service.voice.HotwordTrainingData#TIMEOUT_STAGE_LATE:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.TIMEOUT_STAGE_LATE
+UnflaggedApi: android.service.voice.HotwordTrainingData#TIMEOUT_STAGE_MIDDLE:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.TIMEOUT_STAGE_MIDDLE
+UnflaggedApi: android.service.voice.HotwordTrainingData#TIMEOUT_STAGE_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.TIMEOUT_STAGE_UNKNOWN
+UnflaggedApi: android.service.voice.HotwordTrainingData#TIMEOUT_STAGE_VERY_EARLY:
+    New API must be flagged with @FlaggedApi: field android.service.voice.HotwordTrainingData.TIMEOUT_STAGE_VERY_EARLY
+UnflaggedApi: android.service.voice.HotwordTrainingData#describeContents():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.describeContents()
+UnflaggedApi: android.service.voice.HotwordTrainingData#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.equals(Object)
+UnflaggedApi: android.service.voice.HotwordTrainingData#getMaxTrainingDataSize():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.getMaxTrainingDataSize()
+UnflaggedApi: android.service.voice.HotwordTrainingData#getTimeoutStage():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.getTimeoutStage()
+UnflaggedApi: android.service.voice.HotwordTrainingData#getTrainingAudios():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.getTrainingAudios()
+UnflaggedApi: android.service.voice.HotwordTrainingData#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.hashCode()
+UnflaggedApi: android.service.voice.HotwordTrainingData#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.toString()
+UnflaggedApi: android.service.voice.HotwordTrainingData#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder:
+    New API must be flagged with @FlaggedApi: class android.service.voice.HotwordTrainingData.Builder
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder#Builder():
+    New API must be flagged with @FlaggedApi: constructor android.service.voice.HotwordTrainingData.Builder()
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder#addTrainingAudio(android.service.voice.HotwordTrainingAudio):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.Builder.addTrainingAudio(android.service.voice.HotwordTrainingAudio)
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder#build():
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.Builder.build()
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder#setTimeoutStage(int):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.Builder.setTimeoutStage(int)
+UnflaggedApi: android.service.voice.HotwordTrainingData.Builder#setTrainingAudios(java.util.List<android.service.voice.HotwordTrainingAudio>):
+    New API must be flagged with @FlaggedApi: method android.service.voice.HotwordTrainingData.Builder.setTrainingAudios(java.util.List<android.service.voice.HotwordTrainingAudio>)
+UnflaggedApi: android.service.voice.SoundTriggerFailure#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.SoundTriggerFailure.toString()
+UnflaggedApi: android.service.voice.VisualQueryDetectionService#getSystemService(String):
+    New API must be flagged with @FlaggedApi: method android.service.voice.VisualQueryDetectionService.getSystemService(String)
+UnflaggedApi: android.service.voice.VisualQueryDetectionService#openFileInput(String):
+    New API must be flagged with @FlaggedApi: method android.service.voice.VisualQueryDetectionService.openFileInput(String)
+UnflaggedApi: android.service.voice.VisualQueryDetectionServiceFailure#toString():
+    New API must be flagged with @FlaggedApi: method android.service.voice.VisualQueryDetectionServiceFailure.toString()
+UnflaggedApi: android.service.wallpaper.WallpaperService.Engine#isInAmbientMode():
+    New API must be flagged with @FlaggedApi: method android.service.wallpaper.WallpaperService.Engine.isInAmbientMode()
+UnflaggedApi: android.service.wallpaper.WallpaperService.Engine#onAmbientModeChanged(boolean, long):
+    New API must be flagged with @FlaggedApi: method android.service.wallpaper.WallpaperService.Engine.onAmbientModeChanged(boolean,long)
+UnflaggedApi: android.service.wallpapereffectsgeneration.WallpaperEffectsGenerationService#onCreate():
+    New API must be flagged with @FlaggedApi: method android.service.wallpapereffectsgeneration.WallpaperEffectsGenerationService.onCreate()
+UnflaggedApi: android.service.watchdog.ExplicitHealthCheckService.PackageConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.service.watchdog.ExplicitHealthCheckService.PackageConfig.equals(Object)
+UnflaggedApi: android.service.watchdog.ExplicitHealthCheckService.PackageConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.service.watchdog.ExplicitHealthCheckService.PackageConfig.hashCode()
+UnflaggedApi: android.service.watchdog.ExplicitHealthCheckService.PackageConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.service.watchdog.ExplicitHealthCheckService.PackageConfig.toString()
+UnflaggedApi: android.telecom.AudioState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telecom.AudioState.equals(Object)
+UnflaggedApi: android.telecom.AudioState#toString():
+    New API must be flagged with @FlaggedApi: method android.telecom.AudioState.toString()
+UnflaggedApi: android.telecom.BluetoothCallQualityReport#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telecom.BluetoothCallQualityReport.equals(Object)
+UnflaggedApi: android.telecom.BluetoothCallQualityReport#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telecom.BluetoothCallQualityReport.hashCode()
+UnflaggedApi: android.telecom.CallScreeningService.CallResponse.Builder#setShouldScreenCallViaAudioProcessing(boolean):
+    New API must be flagged with @FlaggedApi: method android.telecom.CallScreeningService.CallResponse.Builder.setShouldScreenCallViaAudioProcessing(boolean)
+UnflaggedApi: android.telecom.Connection.CallFilteringCompletionInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telecom.Connection.CallFilteringCompletionInfo.toString()
+UnflaggedApi: android.telecom.StreamingCall#EXTRA_CALL_ID:
+    New API must be flagged with @FlaggedApi: field android.telecom.StreamingCall.EXTRA_CALL_ID
+UnflaggedApi: android.telephony.CallAttributes#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.CallAttributes.equals(Object)
+UnflaggedApi: android.telephony.CallAttributes#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallAttributes.hashCode()
+UnflaggedApi: android.telephony.CallAttributes#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallAttributes.toString()
+UnflaggedApi: android.telephony.CallQuality#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.CallQuality.equals(Object)
+UnflaggedApi: android.telephony.CallQuality#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallQuality.hashCode()
+UnflaggedApi: android.telephony.CallQuality#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallQuality.toString()
+UnflaggedApi: android.telephony.CallState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.CallState.equals(Object)
+UnflaggedApi: android.telephony.CallState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallState.hashCode()
+UnflaggedApi: android.telephony.CallState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CallState.toString()
+UnflaggedApi: android.telephony.CarrierRestrictionRules#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CarrierRestrictionRules.toString()
+UnflaggedApi: android.telephony.CbGeoUtils.Circle#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CbGeoUtils.Circle.toString()
+UnflaggedApi: android.telephony.CbGeoUtils.LatLng#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CbGeoUtils.LatLng.toString()
+UnflaggedApi: android.telephony.CbGeoUtils.Polygon#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CbGeoUtils.Polygon.toString()
+UnflaggedApi: android.telephony.CellBroadcastIdRange#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.CellBroadcastIdRange.equals(Object)
+UnflaggedApi: android.telephony.CellBroadcastIdRange#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.CellBroadcastIdRange.hashCode()
+UnflaggedApi: android.telephony.CellBroadcastIdRange#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.CellBroadcastIdRange.toString()
+UnflaggedApi: android.telephony.DataSpecificRegistrationInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.DataSpecificRegistrationInfo.equals(Object)
+UnflaggedApi: android.telephony.DataSpecificRegistrationInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.DataSpecificRegistrationInfo.hashCode()
+UnflaggedApi: android.telephony.DataSpecificRegistrationInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.DataSpecificRegistrationInfo.toString()
+UnflaggedApi: android.telephony.DataThrottlingRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.DataThrottlingRequest.toString()
+UnflaggedApi: android.telephony.ImsiEncryptionInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ImsiEncryptionInfo.toString()
+UnflaggedApi: android.telephony.LinkCapacityEstimate#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.LinkCapacityEstimate.equals(Object)
+UnflaggedApi: android.telephony.LinkCapacityEstimate#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.LinkCapacityEstimate.hashCode()
+UnflaggedApi: android.telephony.LinkCapacityEstimate#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.LinkCapacityEstimate.toString()
+UnflaggedApi: android.telephony.LteVopsSupportInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.LteVopsSupportInfo.toString()
+UnflaggedApi: android.telephony.ModemActivityInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ModemActivityInfo.equals(Object)
+UnflaggedApi: android.telephony.ModemActivityInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ModemActivityInfo.hashCode()
+UnflaggedApi: android.telephony.ModemActivityInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ModemActivityInfo.toString()
+UnflaggedApi: android.telephony.NetworkRegistrationInfo.Builder#setIsNonTerrestrialNetwork(boolean):
+    New API must be flagged with @FlaggedApi: method android.telephony.NetworkRegistrationInfo.Builder.setIsNonTerrestrialNetwork(boolean)
+UnflaggedApi: android.telephony.NetworkService#onUnbind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.telephony.NetworkService.onUnbind(android.content.Intent)
+UnflaggedApi: android.telephony.NrVopsSupportInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.NrVopsSupportInfo.toString()
+UnflaggedApi: android.telephony.PhoneCapability#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneCapability.equals(Object)
+UnflaggedApi: android.telephony.PhoneCapability#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneCapability.hashCode()
+UnflaggedApi: android.telephony.PhoneCapability#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneCapability.toString()
+UnflaggedApi: android.telephony.PhoneNumberRange#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneNumberRange.equals(Object)
+UnflaggedApi: android.telephony.PhoneNumberRange#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneNumberRange.hashCode()
+UnflaggedApi: android.telephony.PhoneNumberRange#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.PhoneNumberRange.toString()
+UnflaggedApi: android.telephony.PinResult#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.PinResult.equals(Object)
+UnflaggedApi: android.telephony.PinResult#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.PinResult.hashCode()
+UnflaggedApi: android.telephony.PinResult#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.PinResult.toString()
+UnflaggedApi: android.telephony.PreciseCallState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.PreciseCallState.equals(Object)
+UnflaggedApi: android.telephony.PreciseCallState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.PreciseCallState.hashCode()
+UnflaggedApi: android.telephony.PreciseCallState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.PreciseCallState.toString()
+UnflaggedApi: android.telephony.SmsCbCmasInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbCmasInfo.toString()
+UnflaggedApi: android.telephony.SmsCbEtwsInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbEtwsInfo.toString()
+UnflaggedApi: android.telephony.SmsCbLocation#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbLocation.equals(Object)
+UnflaggedApi: android.telephony.SmsCbLocation#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbLocation.hashCode()
+UnflaggedApi: android.telephony.SmsCbLocation#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbLocation.toString()
+UnflaggedApi: android.telephony.SmsCbMessage#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.SmsCbMessage.toString()
+UnflaggedApi: android.telephony.TelephonyHistogram#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.TelephonyHistogram.toString()
+UnflaggedApi: android.telephony.TelephonyManager.ModemActivityInfoException#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.TelephonyManager.ModemActivityInfoException.toString()
+UnflaggedApi: android.telephony.ThermalMitigationRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ThermalMitigationRequest.toString()
+UnflaggedApi: android.telephony.UiccAccessRule#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccAccessRule.equals(Object)
+UnflaggedApi: android.telephony.UiccAccessRule#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccAccessRule.hashCode()
+UnflaggedApi: android.telephony.UiccAccessRule#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccAccessRule.toString()
+UnflaggedApi: android.telephony.UiccSlotInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotInfo.equals(Object)
+UnflaggedApi: android.telephony.UiccSlotInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotInfo.hashCode()
+UnflaggedApi: android.telephony.UiccSlotInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotInfo.toString()
+UnflaggedApi: android.telephony.UiccSlotMapping#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotMapping.equals(Object)
+UnflaggedApi: android.telephony.UiccSlotMapping#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotMapping.hashCode()
+UnflaggedApi: android.telephony.UiccSlotMapping#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.UiccSlotMapping.toString()
+UnflaggedApi: android.telephony.VopsSupportInfo#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.VopsSupportInfo.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.cdma.CdmaSmsCbProgramData#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.cdma.CdmaSmsCbProgramData.toString()
+UnflaggedApi: android.telephony.data.DataCallResponse#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataCallResponse.equals(Object)
+UnflaggedApi: android.telephony.data.DataCallResponse#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataCallResponse.hashCode()
+UnflaggedApi: android.telephony.data.DataCallResponse#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataCallResponse.toString()
+UnflaggedApi: android.telephony.data.DataProfile#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataProfile.equals(Object)
+UnflaggedApi: android.telephony.data.DataProfile#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataProfile.hashCode()
+UnflaggedApi: android.telephony.data.DataProfile#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataProfile.toString()
+UnflaggedApi: android.telephony.data.DataService#onDestroy():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataService.onDestroy()
+UnflaggedApi: android.telephony.data.DataService#onUnbind(android.content.Intent):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.DataService.onUnbind(android.content.Intent)
+UnflaggedApi: android.telephony.data.EpsBearerQosSessionAttributes#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.EpsBearerQosSessionAttributes.equals(Object)
+UnflaggedApi: android.telephony.data.EpsBearerQosSessionAttributes#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.EpsBearerQosSessionAttributes.hashCode()
+UnflaggedApi: android.telephony.data.NrQosSessionAttributes#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.NrQosSessionAttributes.equals(Object)
+UnflaggedApi: android.telephony.data.NrQosSessionAttributes#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.NrQosSessionAttributes.hashCode()
+UnflaggedApi: android.telephony.data.ThrottleStatus#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.data.ThrottleStatus.equals(Object)
+UnflaggedApi: android.telephony.data.ThrottleStatus#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.ThrottleStatus.hashCode()
+UnflaggedApi: android.telephony.data.ThrottleStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.data.ThrottleStatus.toString()
+UnflaggedApi: android.telephony.euicc.EuiccNotification#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.euicc.EuiccNotification.equals(Object)
+UnflaggedApi: android.telephony.euicc.EuiccNotification#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.euicc.EuiccNotification.hashCode()
+UnflaggedApi: android.telephony.euicc.EuiccNotification#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.euicc.EuiccNotification.toString()
+UnflaggedApi: android.telephony.euicc.EuiccRulesAuthTable#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.euicc.EuiccRulesAuthTable.equals(Object)
+UnflaggedApi: android.telephony.gba.UaSecurityProtocolIdentifier#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.gba.UaSecurityProtocolIdentifier.equals(Object)
+UnflaggedApi: android.telephony.gba.UaSecurityProtocolIdentifier#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.gba.UaSecurityProtocolIdentifier.hashCode()
+UnflaggedApi: android.telephony.gba.UaSecurityProtocolIdentifier#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.gba.UaSecurityProtocolIdentifier.toString()
+UnflaggedApi: android.telephony.ims.AudioCodecAttributes#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.AudioCodecAttributes.toString()
+UnflaggedApi: android.telephony.ims.DelegateRegistrationState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRegistrationState.equals(Object)
+UnflaggedApi: android.telephony.ims.DelegateRegistrationState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRegistrationState.hashCode()
+UnflaggedApi: android.telephony.ims.DelegateRegistrationState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRegistrationState.toString()
+UnflaggedApi: android.telephony.ims.DelegateRequest#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRequest.equals(Object)
+UnflaggedApi: android.telephony.ims.DelegateRequest#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRequest.hashCode()
+UnflaggedApi: android.telephony.ims.DelegateRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.DelegateRequest.toString()
+UnflaggedApi: android.telephony.ims.FeatureTagState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.FeatureTagState.equals(Object)
+UnflaggedApi: android.telephony.ims.FeatureTagState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.FeatureTagState.hashCode()
+UnflaggedApi: android.telephony.ims.FeatureTagState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.FeatureTagState.toString()
+UnflaggedApi: android.telephony.ims.ImsCallForwardInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsCallForwardInfo.toString()
+UnflaggedApi: android.telephony.ims.ImsCallProfile#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsCallProfile.toString()
+UnflaggedApi: android.telephony.ims.ImsConferenceState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsConferenceState.toString()
+UnflaggedApi: android.telephony.ims.ImsExternalCallState#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsExternalCallState.toString()
+UnflaggedApi: android.telephony.ims.ImsMmTelManager.RegistrationCallback#onTechnologyChangeFailed(int, android.telephony.ims.ImsReasonInfo):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsMmTelManager.RegistrationCallback.onTechnologyChangeFailed(int,android.telephony.ims.ImsReasonInfo)
+UnflaggedApi: android.telephony.ims.ImsMmTelManager.RegistrationCallback#onUnregistered(android.telephony.ims.ImsReasonInfo):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsMmTelManager.RegistrationCallback.onUnregistered(android.telephony.ims.ImsReasonInfo)
+UnflaggedApi: android.telephony.ims.ImsSsData#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsSsData.toString()
+UnflaggedApi: android.telephony.ims.ImsSsInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsSsInfo.toString()
+UnflaggedApi: android.telephony.ims.ImsStreamMediaProfile#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsStreamMediaProfile.toString()
+UnflaggedApi: android.telephony.ims.ImsSuppServiceNotification#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.ImsSuppServiceNotification.toString()
+UnflaggedApi: android.telephony.ims.MediaQualityStatus#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaQualityStatus.equals(Object)
+UnflaggedApi: android.telephony.ims.MediaQualityStatus#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaQualityStatus.hashCode()
+UnflaggedApi: android.telephony.ims.MediaQualityStatus#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaQualityStatus.toString()
+UnflaggedApi: android.telephony.ims.MediaThreshold#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaThreshold.equals(Object)
+UnflaggedApi: android.telephony.ims.MediaThreshold#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaThreshold.hashCode()
+UnflaggedApi: android.telephony.ims.MediaThreshold#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.MediaThreshold.toString()
+UnflaggedApi: android.telephony.ims.PublishAttributes#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.PublishAttributes.equals(Object)
+UnflaggedApi: android.telephony.ims.PublishAttributes#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.PublishAttributes.hashCode()
+UnflaggedApi: android.telephony.ims.PublishAttributes#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.PublishAttributes.toString()
+UnflaggedApi: android.telephony.ims.RcsClientConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RcsClientConfiguration.equals(Object)
+UnflaggedApi: android.telephony.ims.RcsClientConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RcsClientConfiguration.hashCode()
+UnflaggedApi: android.telephony.ims.RcsContactPresenceTuple#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RcsContactPresenceTuple.toString()
+UnflaggedApi: android.telephony.ims.RcsContactPresenceTuple.ServiceCapabilities#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RcsContactPresenceTuple.ServiceCapabilities.toString()
+UnflaggedApi: android.telephony.ims.RcsContactUceCapability#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RcsContactUceCapability.toString()
+UnflaggedApi: android.telephony.ims.RtpHeaderExtension#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtension.equals(Object)
+UnflaggedApi: android.telephony.ims.RtpHeaderExtension#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtension.hashCode()
+UnflaggedApi: android.telephony.ims.RtpHeaderExtension#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtension.toString()
+UnflaggedApi: android.telephony.ims.RtpHeaderExtensionType#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtensionType.equals(Object)
+UnflaggedApi: android.telephony.ims.RtpHeaderExtensionType#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtensionType.hashCode()
+UnflaggedApi: android.telephony.ims.RtpHeaderExtensionType#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.RtpHeaderExtensionType.toString()
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.equals(Object)
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.hashCode()
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.toString()
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration.equals(Object)
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration.hashCode()
+UnflaggedApi: android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDelegateConfiguration.IpSecConfiguration.toString()
+UnflaggedApi: android.telephony.ims.SipDialogState#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDialogState.equals(Object)
+UnflaggedApi: android.telephony.ims.SipDialogState#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipDialogState.hashCode()
+UnflaggedApi: android.telephony.ims.SipMessage#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipMessage.equals(Object)
+UnflaggedApi: android.telephony.ims.SipMessage#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipMessage.hashCode()
+UnflaggedApi: android.telephony.ims.SipMessage#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SipMessage.toString()
+UnflaggedApi: android.telephony.ims.SrvccCall#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SrvccCall.equals(Object)
+UnflaggedApi: android.telephony.ims.SrvccCall#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SrvccCall.hashCode()
+UnflaggedApi: android.telephony.ims.SrvccCall#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.SrvccCall.toString()
+UnflaggedApi: android.telephony.ims.feature.CapabilityChangeRequest#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.feature.CapabilityChangeRequest.toString()
+UnflaggedApi: android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair.toString()
+UnflaggedApi: android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair.equals(Object)
+UnflaggedApi: android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair.hashCode()
+UnflaggedApi: android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair.toString()
+UnflaggedApi: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String):
+    New API must be flagged with @FlaggedApi: method android.telephony.mbms.DownloadRequest.Builder.setServiceId(String)
+UnflaggedApi: android.telephony.mbms.vendor.MbmsDownloadServiceBase#DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.mbms.vendor.MbmsDownloadServiceBase.DESCRIPTOR
+UnflaggedApi: android.telephony.mbms.vendor.MbmsStreamingServiceBase#DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.mbms.vendor.MbmsStreamingServiceBase.DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.AntennaDirection:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.AntennaDirection
+UnflaggedApi: android.telephony.satellite.AntennaDirection#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaDirection.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.AntennaDirection#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaDirection.CREATOR
+UnflaggedApi: android.telephony.satellite.AntennaDirection#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaDirection.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.telephony.satellite.AntennaDirection#describeContents():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.describeContents()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.equals(Object)
+UnflaggedApi: android.telephony.satellite.AntennaDirection#getX():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.getX()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#getY():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.getY()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#getZ():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.getZ()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.hashCode()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.toString()
+UnflaggedApi: android.telephony.satellite.AntennaDirection#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaDirection.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.satellite.AntennaPosition:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.AntennaPosition
+UnflaggedApi: android.telephony.satellite.AntennaPosition#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaPosition.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.AntennaPosition#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaPosition.CREATOR
+UnflaggedApi: android.telephony.satellite.AntennaPosition#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.AntennaPosition.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.telephony.satellite.AntennaPosition#describeContents():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.describeContents()
+UnflaggedApi: android.telephony.satellite.AntennaPosition#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.equals(Object)
+UnflaggedApi: android.telephony.satellite.AntennaPosition#getAntennaDirection():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.getAntennaDirection()
+UnflaggedApi: android.telephony.satellite.AntennaPosition#getSuggestedHoldPosition():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.getSuggestedHoldPosition()
+UnflaggedApi: android.telephony.satellite.AntennaPosition#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.hashCode()
+UnflaggedApi: android.telephony.satellite.AntennaPosition#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.toString()
+UnflaggedApi: android.telephony.satellite.AntennaPosition#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.AntennaPosition.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.satellite.PointingInfo:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.PointingInfo
+UnflaggedApi: android.telephony.satellite.PointingInfo#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.PointingInfo.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.PointingInfo#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.PointingInfo.CREATOR
+UnflaggedApi: android.telephony.satellite.PointingInfo#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.PointingInfo.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.telephony.satellite.PointingInfo#describeContents():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.describeContents()
+UnflaggedApi: android.telephony.satellite.PointingInfo#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.equals(Object)
+UnflaggedApi: android.telephony.satellite.PointingInfo#getSatelliteAzimuthDegrees():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.getSatelliteAzimuthDegrees()
+UnflaggedApi: android.telephony.satellite.PointingInfo#getSatelliteElevationDegrees():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.getSatelliteElevationDegrees()
+UnflaggedApi: android.telephony.satellite.PointingInfo#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.hashCode()
+UnflaggedApi: android.telephony.satellite.PointingInfo#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.toString()
+UnflaggedApi: android.telephony.satellite.PointingInfo#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.PointingInfo.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteCapabilities
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteCapabilities.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteCapabilities.CREATOR
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteCapabilities.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#describeContents():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.describeContents()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.equals(Object)
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#getAntennaPositionMap():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.getAntennaPositionMap()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#getMaxBytesPerOutgoingDatagram():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.getMaxBytesPerOutgoingDatagram()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#getSupportedRadioTechnologies():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.getSupportedRadioTechnologies()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#hashCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.hashCode()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#isPointingRequired():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.isPointingRequired()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#toString():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.toString()
+UnflaggedApi: android.telephony.satellite.SatelliteCapabilities#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteCapabilities.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteDatagram
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#CONTENTS_FILE_DESCRIPTOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteDatagram.CONTENTS_FILE_DESCRIPTOR
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#CREATOR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteDatagram.CREATOR
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#PARCELABLE_WRITE_RETURN_VALUE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteDatagram.PARCELABLE_WRITE_RETURN_VALUE
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#describeContents():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteDatagram.describeContents()
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#getSatelliteDatagram():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteDatagram.getSatelliteDatagram()
+UnflaggedApi: android.telephony.satellite.SatelliteDatagram#writeToParcel(android.os.Parcel, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteDatagram.writeToParcel(android.os.Parcel,int)
+UnflaggedApi: android.telephony.satellite.SatelliteDatagramCallback:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteDatagramCallback
+UnflaggedApi: android.telephony.satellite.SatelliteDatagramCallback#onSatelliteDatagramReceived(long, android.telephony.satellite.SatelliteDatagram, int, java.util.function.Consumer<java.lang.Void>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteDatagramCallback.onSatelliteDatagramReceived(long,android.telephony.satellite.SatelliteDatagram,int,java.util.function.Consumer<java.lang.Void>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteManager
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DATAGRAM_TYPE_LOCATION_SHARING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DATAGRAM_TYPE_LOCATION_SHARING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DATAGRAM_TYPE_SOS_MESSAGE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DATAGRAM_TYPE_SOS_MESSAGE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DATAGRAM_TYPE_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DATAGRAM_TYPE_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DEVICE_HOLD_POSITION_LANDSCAPE_LEFT:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DEVICE_HOLD_POSITION_LANDSCAPE_LEFT
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DEVICE_HOLD_POSITION_LANDSCAPE_RIGHT:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DEVICE_HOLD_POSITION_LANDSCAPE_RIGHT
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DEVICE_HOLD_POSITION_PORTRAIT:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DEVICE_HOLD_POSITION_PORTRAIT
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DEVICE_HOLD_POSITION_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DEVICE_HOLD_POSITION_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DISPLAY_MODE_CLOSED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DISPLAY_MODE_CLOSED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DISPLAY_MODE_FIXED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DISPLAY_MODE_FIXED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DISPLAY_MODE_OPENED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DISPLAY_MODE_OPENED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#DISPLAY_MODE_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.DISPLAY_MODE_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#NT_RADIO_TECHNOLOGY_EMTC_NTN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.NT_RADIO_TECHNOLOGY_EMTC_NTN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#NT_RADIO_TECHNOLOGY_NB_IOT_NTN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.NT_RADIO_TECHNOLOGY_NB_IOT_NTN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#NT_RADIO_TECHNOLOGY_NR_NTN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.NT_RADIO_TECHNOLOGY_NR_NTN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#NT_RADIO_TECHNOLOGY_PROPRIETARY:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.NT_RADIO_TECHNOLOGY_PROPRIETARY
+UnflaggedApi: android.telephony.satellite.SatelliteManager#NT_RADIO_TECHNOLOGY_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.NT_RADIO_TECHNOLOGY_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_ACCESS_BARRED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_ACCESS_BARRED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_NONE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_SUCCESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_SUCCESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_FAILED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_SEND_SUCCESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_ERROR_NONE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_ERROR_NONE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_INVALID_ARGUMENTS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_INVALID_ARGUMENTS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_INVALID_MODEM_STATE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_INVALID_MODEM_STATE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_INVALID_TELEPHONY_STATE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_INVALID_TELEPHONY_STATE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_BUSY:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_BUSY
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_DATAGRAM_RETRYING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_DATAGRAM_RETRYING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_IDLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_IDLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_LISTENING:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_LISTENING
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_OFF:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_OFF
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_UNAVAILABLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_UNAVAILABLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_MODEM_STATE_UNKNOWN:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_MODEM_STATE_UNKNOWN
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NETWORK_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NETWORK_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NETWORK_TIMEOUT:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NETWORK_TIMEOUT
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NOT_AUTHORIZED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NOT_AUTHORIZED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NOT_REACHABLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NOT_REACHABLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NOT_SUPPORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NOT_SUPPORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_NO_RESOURCES:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_NO_RESOURCES
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RADIO_NOT_AVAILABLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RADIO_NOT_AVAILABLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_REQUEST_ABORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_REQUEST_ABORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_REQUEST_FAILED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_REQUEST_FAILED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_REQUEST_IN_PROGRESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_REQUEST_IN_PROGRESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_REQUEST_NOT_SUPPORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_REQUEST_NOT_SUPPORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_ACCESS_BARRED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_ACCESS_BARRED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_INVALID_ARGUMENTS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_INVALID_ARGUMENTS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_INVALID_MODEM_STATE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_INVALID_MODEM_STATE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_INVALID_TELEPHONY_STATE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_INVALID_TELEPHONY_STATE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_MODEM_BUSY:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_MODEM_BUSY
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_MODEM_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_MODEM_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NETWORK_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NETWORK_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NETWORK_TIMEOUT:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NETWORK_TIMEOUT
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NOT_AUTHORIZED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NOT_AUTHORIZED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NOT_REACHABLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NOT_REACHABLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NOT_SUPPORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NOT_SUPPORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_NO_RESOURCES:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_NO_RESOURCES
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_RADIO_NOT_AVAILABLE:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_RADIO_NOT_AVAILABLE
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_REQUEST_ABORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_REQUEST_ABORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_REQUEST_FAILED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_REQUEST_FAILED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_REQUEST_IN_PROGRESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_REQUEST_IN_PROGRESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_REQUEST_NOT_SUPPORTED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_SERVER_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SERVER_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_SERVICE_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SERVICE_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_SERVICE_NOT_PROVISIONED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SERVICE_NOT_PROVISIONED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SERVICE_PROVISION_IN_PROGRESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_RESULT_SUCCESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_RESULT_SUCCESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_SERVER_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_SERVER_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_SERVICE_ERROR:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_SERVICE_ERROR
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_SERVICE_NOT_PROVISIONED:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_SERVICE_NOT_PROVISIONED
+UnflaggedApi: android.telephony.satellite.SatelliteManager#SATELLITE_SERVICE_PROVISION_IN_PROGRESS:
+    New API must be flagged with @FlaggedApi: field android.telephony.satellite.SatelliteManager.SATELLITE_SERVICE_PROVISION_IN_PROGRESS
+UnflaggedApi: android.telephony.satellite.SatelliteManager#deprovisionSatelliteService(String, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.deprovisionSatelliteService(String,java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#pollPendingSatelliteDatagrams(java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.pollPendingSatelliteDatagrams(java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#provisionSatelliteService(String, byte[], android.os.CancellationSignal, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.provisionSatelliteService(String,byte[],android.os.CancellationSignal,java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#registerForSatelliteDatagram(java.util.concurrent.Executor, android.telephony.satellite.SatelliteDatagramCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.registerForSatelliteDatagram(java.util.concurrent.Executor,android.telephony.satellite.SatelliteDatagramCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#registerForSatelliteModemStateChanged(java.util.concurrent.Executor, android.telephony.satellite.SatelliteStateCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.registerForSatelliteModemStateChanged(java.util.concurrent.Executor,android.telephony.satellite.SatelliteStateCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#registerForSatelliteProvisionStateChanged(java.util.concurrent.Executor, android.telephony.satellite.SatelliteProvisionStateCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.registerForSatelliteProvisionStateChanged(java.util.concurrent.Executor,android.telephony.satellite.SatelliteProvisionStateCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestIsDemoModeEnabled(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestIsDemoModeEnabled(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestIsSatelliteCommunicationAllowedForCurrentLocation(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestIsSatelliteCommunicationAllowedForCurrentLocation(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestIsSatelliteEnabled(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestIsSatelliteEnabled(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestIsSatelliteProvisioned(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestIsSatelliteProvisioned(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestIsSatelliteSupported(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestIsSatelliteSupported(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.lang.Boolean,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestSatelliteCapabilities(java.util.concurrent.Executor, android.os.OutcomeReceiver<android.telephony.satellite.SatelliteCapabilities,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestSatelliteCapabilities(java.util.concurrent.Executor,android.os.OutcomeReceiver<android.telephony.satellite.SatelliteCapabilities,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestSatelliteEnabled(boolean, boolean, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestSatelliteEnabled(boolean,boolean,java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#requestTimeForNextSatelliteVisibility(java.util.concurrent.Executor, android.os.OutcomeReceiver<java.time.Duration,android.telephony.satellite.SatelliteManager.SatelliteException>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.requestTimeForNextSatelliteVisibility(java.util.concurrent.Executor,android.os.OutcomeReceiver<java.time.Duration,android.telephony.satellite.SatelliteManager.SatelliteException>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#sendSatelliteDatagram(int, android.telephony.satellite.SatelliteDatagram, boolean, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.sendSatelliteDatagram(int,android.telephony.satellite.SatelliteDatagram,boolean,java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#setDeviceAlignedWithSatellite(boolean):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.setDeviceAlignedWithSatellite(boolean)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#startSatelliteTransmissionUpdates(java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>, android.telephony.satellite.SatelliteTransmissionUpdateCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.startSatelliteTransmissionUpdates(java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>,android.telephony.satellite.SatelliteTransmissionUpdateCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#stopSatelliteTransmissionUpdates(android.telephony.satellite.SatelliteTransmissionUpdateCallback, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.stopSatelliteTransmissionUpdates(android.telephony.satellite.SatelliteTransmissionUpdateCallback,java.util.concurrent.Executor,java.util.function.Consumer<java.lang.Integer>)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#unregisterForSatelliteDatagram(android.telephony.satellite.SatelliteDatagramCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.unregisterForSatelliteDatagram(android.telephony.satellite.SatelliteDatagramCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#unregisterForSatelliteModemStateChanged(android.telephony.satellite.SatelliteStateCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.unregisterForSatelliteModemStateChanged(android.telephony.satellite.SatelliteStateCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager#unregisterForSatelliteProvisionStateChanged(android.telephony.satellite.SatelliteProvisionStateCallback):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.unregisterForSatelliteProvisionStateChanged(android.telephony.satellite.SatelliteProvisionStateCallback)
+UnflaggedApi: android.telephony.satellite.SatelliteManager.SatelliteException:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteManager.SatelliteException
+UnflaggedApi: android.telephony.satellite.SatelliteManager.SatelliteException#SatelliteException(int):
+    New API must be flagged with @FlaggedApi: constructor android.telephony.satellite.SatelliteManager.SatelliteException(int)
+UnflaggedApi: android.telephony.satellite.SatelliteManager.SatelliteException#getErrorCode():
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteManager.SatelliteException.getErrorCode()
+UnflaggedApi: android.telephony.satellite.SatelliteProvisionStateCallback:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteProvisionStateCallback
+UnflaggedApi: android.telephony.satellite.SatelliteProvisionStateCallback#onSatelliteProvisionStateChanged(boolean):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteProvisionStateCallback.onSatelliteProvisionStateChanged(boolean)
+UnflaggedApi: android.telephony.satellite.SatelliteStateCallback:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteStateCallback
+UnflaggedApi: android.telephony.satellite.SatelliteStateCallback#onSatelliteModemStateChanged(int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteStateCallback.onSatelliteModemStateChanged(int)
+UnflaggedApi: android.telephony.satellite.SatelliteTransmissionUpdateCallback:
+    New API must be flagged with @FlaggedApi: class android.telephony.satellite.SatelliteTransmissionUpdateCallback
+UnflaggedApi: android.telephony.satellite.SatelliteTransmissionUpdateCallback#onReceiveDatagramStateChanged(int, int, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteTransmissionUpdateCallback.onReceiveDatagramStateChanged(int,int,int)
+UnflaggedApi: android.telephony.satellite.SatelliteTransmissionUpdateCallback#onSatellitePositionChanged(android.telephony.satellite.PointingInfo):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteTransmissionUpdateCallback.onSatellitePositionChanged(android.telephony.satellite.PointingInfo)
+UnflaggedApi: android.telephony.satellite.SatelliteTransmissionUpdateCallback#onSendDatagramStateChanged(int, int, int):
+    New API must be flagged with @FlaggedApi: method android.telephony.satellite.SatelliteTransmissionUpdateCallback.onSendDatagramStateChanged(int,int,int)
+UnflaggedApi: android.text.FontConfig#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.equals(Object)
+UnflaggedApi: android.text.FontConfig#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.hashCode()
+UnflaggedApi: android.text.FontConfig#toString():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.toString()
+UnflaggedApi: android.text.FontConfig.Alias#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Alias.equals(Object)
+UnflaggedApi: android.text.FontConfig.Alias#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Alias.hashCode()
+UnflaggedApi: android.text.FontConfig.Alias#toString():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Alias.toString()
+UnflaggedApi: android.text.FontConfig.Font#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Font.equals(Object)
+UnflaggedApi: android.text.FontConfig.Font#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Font.hashCode()
+UnflaggedApi: android.text.FontConfig.Font#toString():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.Font.toString()
+UnflaggedApi: android.text.FontConfig.FontFamily#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.FontFamily.equals(Object)
+UnflaggedApi: android.text.FontConfig.FontFamily#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.FontFamily.hashCode()
+UnflaggedApi: android.text.FontConfig.FontFamily#toString():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.FontFamily.toString()
+UnflaggedApi: android.text.FontConfig.NamedFamilyList#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.NamedFamilyList.equals(Object)
+UnflaggedApi: android.text.FontConfig.NamedFamilyList#hashCode():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.NamedFamilyList.hashCode()
+UnflaggedApi: android.text.FontConfig.NamedFamilyList#toString():
+    New API must be flagged with @FlaggedApi: method android.text.FontConfig.NamedFamilyList.toString()
+UnflaggedApi: android.view.contentcapture.ContentCaptureEvent#toString():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ContentCaptureEvent.toString()
+UnflaggedApi: android.view.contentcapture.ViewNode#getAutofillHints():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getAutofillHints()
+UnflaggedApi: android.view.contentcapture.ViewNode#getAutofillId():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getAutofillId()
+UnflaggedApi: android.view.contentcapture.ViewNode#getAutofillOptions():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getAutofillOptions()
+UnflaggedApi: android.view.contentcapture.ViewNode#getAutofillType():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getAutofillType()
+UnflaggedApi: android.view.contentcapture.ViewNode#getAutofillValue():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getAutofillValue()
+UnflaggedApi: android.view.contentcapture.ViewNode#getClassName():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getClassName()
+UnflaggedApi: android.view.contentcapture.ViewNode#getContentDescription():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getContentDescription()
+UnflaggedApi: android.view.contentcapture.ViewNode#getExtras():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getExtras()
+UnflaggedApi: android.view.contentcapture.ViewNode#getHeight():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getHeight()
+UnflaggedApi: android.view.contentcapture.ViewNode#getHint():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getHint()
+UnflaggedApi: android.view.contentcapture.ViewNode#getHintIdEntry():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getHintIdEntry()
+UnflaggedApi: android.view.contentcapture.ViewNode#getId():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getId()
+UnflaggedApi: android.view.contentcapture.ViewNode#getIdEntry():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getIdEntry()
+UnflaggedApi: android.view.contentcapture.ViewNode#getIdPackage():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getIdPackage()
+UnflaggedApi: android.view.contentcapture.ViewNode#getIdType():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getIdType()
+UnflaggedApi: android.view.contentcapture.ViewNode#getInputType():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getInputType()
+UnflaggedApi: android.view.contentcapture.ViewNode#getLeft():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getLeft()
+UnflaggedApi: android.view.contentcapture.ViewNode#getLocaleList():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getLocaleList()
+UnflaggedApi: android.view.contentcapture.ViewNode#getMaxTextEms():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getMaxTextEms()
+UnflaggedApi: android.view.contentcapture.ViewNode#getMaxTextLength():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getMaxTextLength()
+UnflaggedApi: android.view.contentcapture.ViewNode#getMinTextEms():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getMinTextEms()
+UnflaggedApi: android.view.contentcapture.ViewNode#getReceiveContentMimeTypes():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getReceiveContentMimeTypes()
+UnflaggedApi: android.view.contentcapture.ViewNode#getScrollX():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getScrollX()
+UnflaggedApi: android.view.contentcapture.ViewNode#getScrollY():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getScrollY()
+UnflaggedApi: android.view.contentcapture.ViewNode#getText():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getText()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextBackgroundColor():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextBackgroundColor()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextColor():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextColor()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextIdEntry():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextIdEntry()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextLineBaselines():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextLineBaselines()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextLineCharOffsets():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextLineCharOffsets()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextSelectionEnd():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextSelectionEnd()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextSelectionStart():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextSelectionStart()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextSize():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextSize()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTextStyle():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTextStyle()
+UnflaggedApi: android.view.contentcapture.ViewNode#getTop():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getTop()
+UnflaggedApi: android.view.contentcapture.ViewNode#getVisibility():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getVisibility()
+UnflaggedApi: android.view.contentcapture.ViewNode#getWidth():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.getWidth()
+UnflaggedApi: android.view.contentcapture.ViewNode#isAccessibilityFocused():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isAccessibilityFocused()
+UnflaggedApi: android.view.contentcapture.ViewNode#isActivated():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isActivated()
+UnflaggedApi: android.view.contentcapture.ViewNode#isAssistBlocked():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isAssistBlocked()
+UnflaggedApi: android.view.contentcapture.ViewNode#isCheckable():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isCheckable()
+UnflaggedApi: android.view.contentcapture.ViewNode#isChecked():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isChecked()
+UnflaggedApi: android.view.contentcapture.ViewNode#isClickable():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isClickable()
+UnflaggedApi: android.view.contentcapture.ViewNode#isContextClickable():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isContextClickable()
+UnflaggedApi: android.view.contentcapture.ViewNode#isEnabled():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isEnabled()
+UnflaggedApi: android.view.contentcapture.ViewNode#isFocusable():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isFocusable()
+UnflaggedApi: android.view.contentcapture.ViewNode#isFocused():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isFocused()
+UnflaggedApi: android.view.contentcapture.ViewNode#isLongClickable():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isLongClickable()
+UnflaggedApi: android.view.contentcapture.ViewNode#isOpaque():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isOpaque()
+UnflaggedApi: android.view.contentcapture.ViewNode#isSelected():
+    New API must be flagged with @FlaggedApi: method android.view.contentcapture.ViewNode.isSelected()
+UnflaggedApi: android.view.translation.UiTranslationSpec#equals(Object):
+    New API must be flagged with @FlaggedApi: method android.view.translation.UiTranslationSpec.equals(Object)
+UnflaggedApi: android.view.translation.UiTranslationSpec#hashCode():
+    New API must be flagged with @FlaggedApi: method android.view.translation.UiTranslationSpec.hashCode()
+UnflaggedApi: android.view.translation.UiTranslationSpec#toString():
+    New API must be flagged with @FlaggedApi: method android.view.translation.UiTranslationSpec.toString()
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index fd59470..a8a6eb9 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -2115,6 +2115,7 @@
 
   public class SharedConnectivityManager {
     method @Nullable public static android.net.wifi.sharedconnectivity.app.SharedConnectivityManager create(@NonNull android.content.Context, @NonNull String, @NonNull String);
+    method @NonNull public android.content.BroadcastReceiver getBroadcastReceiver();
     method @Nullable public android.content.ServiceConnection getServiceConnection();
     method public void setService(@Nullable android.os.IInterface);
   }
diff --git a/core/java/Android.bp b/core/java/Android.bp
index 70cb597..13a1bd6 100644
--- a/core/java/Android.bp
+++ b/core/java/Android.bp
@@ -9,6 +9,11 @@
     default_applicable_licenses: ["frameworks_base_license"],
 }
 
+aidl_library {
+    name: "HardwareBuffer_aidl",
+    hdrs: ["android/hardware/HardwareBuffer.aidl"],
+}
+
 filegroup {
     name: "framework-core-sources",
     srcs: [
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index a366464..7bc6f9bf 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -23,7 +23,7 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
 import static android.app.WindowConfiguration.inMultiWindowMode;
 import static android.os.Process.myUid;
-
+import static com.android.sdksandbox.flags.Flags.sandboxActivitySdkBasedContext;
 import static java.lang.Character.MIN_VALUE;
 
 import android.annotation.AnimRes;
@@ -8631,6 +8631,12 @@
             Configuration config, String referrer, IVoiceInteractor voiceInteractor,
             Window window, ActivityConfigCallback activityConfigCallback, IBinder assistToken,
             IBinder shareableActivityToken) {
+        if (sandboxActivitySdkBasedContext()) {
+            // Sandbox activities extract a token from the intent's extra to identify the related
+            // SDK as part of overriding attachBaseContext, then it wraps the passed context in an
+            // SDK ContextWrapper, so mIntent has to be set before calling attachBaseContext.
+            mIntent = intent;
+        }
         attachBaseContext(context);
 
         mFragments.attachHost(null /*parent*/);
@@ -8656,6 +8662,7 @@
         mShareableActivityToken = shareableActivityToken;
         mIdent = ident;
         mApplication = application;
+        //TODO(b/300059435): do not set the mIntent again as part of the flag clean up.
         mIntent = intent;
         mReferrer = referrer;
         mComponent = intent.getComponent();
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 2ae7216..895dde7 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -1507,8 +1507,9 @@
     }
 
     /** @hide */
-    public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
+    public ActivityOptions setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
         mRemoteTransition = remoteTransition;
+        return this;
     }
 
     /** @hide */
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 39589fa..00e546a 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -36,9 +36,9 @@
 import static android.window.ConfigurationHelper.freeTextLayoutCachesIfNeeded;
 import static android.window.ConfigurationHelper.isDifferentDisplay;
 import static android.window.ConfigurationHelper.shouldUpdateResources;
-
 import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
 import static com.android.internal.os.SafeZipPathValidatorCallback.VALIDATE_ZIP_PATH_FOR_PATH_TRAVERSAL;
+import static com.android.sdksandbox.flags.Flags.sandboxActivitySdkBasedContext;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -54,6 +54,8 @@
 import android.app.backup.BackupAnnotations.BackupDestination;
 import android.app.backup.BackupAnnotations.OperationType;
 import android.app.compat.CompatChanges;
+import android.app.sdksandbox.sandboxactivity.ActivityContextInfo;
+import android.app.sdksandbox.sandboxactivity.ActivityContextInfoProvider;
 import android.app.servertransaction.ActivityLifecycleItem;
 import android.app.servertransaction.ActivityLifecycleItem.LifecycleState;
 import android.app.servertransaction.ActivityRelaunchItem;
@@ -1286,8 +1288,13 @@
         }
 
         private void updateCompatOverrideScale(CompatibilityInfo info) {
-            CompatibilityInfo.setOverrideInvertedScale(
-                    info.hasOverrideScaling() ? info.applicationInvertedScale : 1f);
+            if (info.hasOverrideScaling()) {
+                CompatibilityInfo.setOverrideInvertedScale(info.applicationInvertedScale,
+                        info.applicationDensityInvertedScale);
+            } else {
+                CompatibilityInfo.setOverrideInvertedScale(/* invertScale */ 1f,
+                        /* densityInvertScale */1f);
+            }
         }
 
         public final void runIsolatedEntryPoint(String entryPoint, String[] entryPointArgs) {
@@ -3651,15 +3658,16 @@
     }
 
     @UnsupportedAppUsage
-    public final void sendActivityResult(
-            IBinder token, String id, int requestCode,
+    public void sendActivityResult(
+            IBinder activityToken, String id, int requestCode,
             int resultCode, Intent data) {
         if (DEBUG_RESULTS) Slog.v(TAG, "sendActivityResult: id=" + id
                 + " req=" + requestCode + " res=" + resultCode + " data=" + data);
         ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
         list.add(new ResultInfo(id, requestCode, resultCode, data));
-        final ClientTransaction clientTransaction = ClientTransaction.obtain(mAppThread, token);
-        clientTransaction.addCallback(ActivityResultItem.obtain(list));
+        final ClientTransaction clientTransaction = ClientTransaction.obtain(mAppThread,
+                activityToken);
+        clientTransaction.addCallback(ActivityResultItem.obtain(activityToken, list));
         try {
             mAppThread.scheduleTransaction(clientTransaction);
         } catch (RemoteException e) {
@@ -3729,16 +3737,38 @@
                     r.activityInfo.targetActivity);
         }
 
-        ContextImpl appContext = createBaseContextForActivity(r);
+        boolean isSandboxActivityContext = sandboxActivitySdkBasedContext()
+                && r.intent.isSandboxActivity(mSystemContext);
+        boolean isSandboxedSdkContextUsed = false;
+        ContextImpl activityBaseContext;
+        if (isSandboxActivityContext) {
+            activityBaseContext = createBaseContextForSandboxActivity(r);
+            if (activityBaseContext == null) {
+                // Failed to retrieve the SDK based sandbox activity context, falling back to the
+                // app based context.
+                activityBaseContext = createBaseContextForActivity(r);
+            } else {
+                isSandboxedSdkContextUsed = true;
+            }
+        } else {
+            activityBaseContext = createBaseContextForActivity(r);
+        }
         Activity activity = null;
         try {
-            java.lang.ClassLoader cl = appContext.getClassLoader();
+            java.lang.ClassLoader cl;
+            if (isSandboxedSdkContextUsed) {
+                // In case of sandbox activity, the context refers to the an SDK with no visibility
+                // on the SandboxedActivity java class, the App context should be used instead.
+                cl = activityBaseContext.getApplicationContext().getClassLoader();
+            } else {
+                cl = activityBaseContext.getClassLoader();
+            }
             activity = mInstrumentation.newActivity(
                     cl, component.getClassName(), r.intent);
             StrictMode.incrementExpectedActivityCount(activity.getClass());
             r.intent.setExtrasClassLoader(cl);
             r.intent.prepareToEnterProcess(isProtectedComponent(r.activityInfo),
-                    appContext.getAttributionSource());
+                    activityBaseContext.getAttributionSource());
             if (r.state != null) {
                 r.state.setClassLoader(cl);
             }
@@ -3769,7 +3799,8 @@
             }
 
             if (activity != null) {
-                CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
+                CharSequence title =
+                        r.activityInfo.loadLabel(activityBaseContext.getPackageManager());
                 Configuration config =
                         new Configuration(mConfigurationController.getCompatConfiguration());
                 if (r.overrideConfig != null) {
@@ -3786,11 +3817,11 @@
 
                 // Activity resources must be initialized with the same loaders as the
                 // application context.
-                appContext.getResources().addLoaders(
+                activityBaseContext.getResources().addLoaders(
                         app.getResources().getLoaders().toArray(new ResourcesLoader[0]));
 
-                appContext.setOuterContext(activity);
-                activity.attach(appContext, this, getInstrumentation(), r.token,
+                activityBaseContext.setOuterContext(activity);
+                activity.attach(activityBaseContext, this, getInstrumentation(), r.token,
                         r.ident, app, r.intent, r.activityInfo, title, r.parent,
                         r.embeddedID, r.lastNonConfigurationInstances, config,
                         r.referrer, r.voiceInteractor, window, r.activityConfigCallback,
@@ -3947,6 +3978,44 @@
     }
 
     /**
+     * Creates the base context for the sandbox activity based on its corresponding SDK {@link
+     * ApplicationInfo} and flags.
+     */
+    @Nullable
+    private ContextImpl createBaseContextForSandboxActivity(@NonNull ActivityClientRecord r) {
+        ActivityContextInfoProvider contextInfoProvider = ActivityContextInfoProvider.getInstance();
+
+        ActivityContextInfo contextInfo;
+        try {
+            contextInfo = contextInfoProvider.getActivityContextInfo(r.intent);
+        } catch (IllegalArgumentException e) {
+            Log.e(TAG, "Passed intent does not match an expected sandbox activity", e);
+            return null;
+        } catch (IllegalStateException e) {
+            Log.e(TAG, "SDK customized context flag is disabled", e);
+            return null;
+        } catch (Exception e) { // generic catch to unexpected exceptions
+            Log.e(TAG, "Failed to create context for sandbox activity", e);
+            return null;
+        }
+
+        final int displayId = ActivityClient.getInstance().getDisplayId(r.token);
+        final LoadedApk sdkApk = getPackageInfo(
+                contextInfo.getSdkApplicationInfo(),
+                r.packageInfo.getCompatibilityInfo(),
+                ActivityContextInfo.CONTEXT_FLAGS);
+
+        final ContextImpl activityContext = ContextImpl.createActivityContext(
+                this, sdkApk, r.activityInfo, r.token, displayId, r.overrideConfig);
+
+        // Set sandbox app's context as the application context for sdk context
+        activityContext.mPackageInfo.makeApplicationInner(
+                /*forceDefaultAppClass=*/false, mInstrumentation);
+
+        return activityContext;
+    }
+
+    /**
      * Extended implementation of activity launch. Used when server requests a launch or relaunch.
      */
     @Override
@@ -4361,16 +4430,16 @@
 
     private void schedulePauseWithUserLeavingHint(ActivityClientRecord r) {
         final ClientTransaction transaction = ClientTransaction.obtain(this.mAppThread, r.token);
-        transaction.setLifecycleStateRequest(PauseActivityItem.obtain(r.activity.isFinishing(),
-                /* userLeaving */ true, r.activity.mConfigChangeFlags, /* dontReport */ false,
-                /* autoEnteringPip */ false));
+        transaction.setLifecycleStateRequest(PauseActivityItem.obtain(r.token,
+                r.activity.isFinishing(), /* userLeaving */ true, r.activity.mConfigChangeFlags,
+                /* dontReport */ false, /* autoEnteringPip */ false));
         executeTransaction(transaction);
     }
 
     private void scheduleResume(ActivityClientRecord r) {
         final ClientTransaction transaction = ClientTransaction.obtain(this.mAppThread, r.token);
-        transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(/* isForward */ false,
-                /* shouldSendCompatFakeFocus */ false));
+        transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(r.token,
+                /* isForward */ false, /* shouldSendCompatFakeFocus */ false));
         executeTransaction(transaction);
     }
 
@@ -5954,8 +6023,8 @@
                         ? r.createdConfig : mConfigurationController.getConfiguration(),
                 r.overrideConfig);
         final ActivityRelaunchItem activityRelaunchItem = ActivityRelaunchItem.obtain(
-                null /* pendingResults */, null /* pendingIntents */, 0 /* configChanges */,
-                mergedConfiguration, r.mPreserveWindow);
+                r.token, null /* pendingResults */, null /* pendingIntents */,
+                0 /* configChanges */, mergedConfiguration, r.mPreserveWindow);
         // Make sure to match the existing lifecycle state in the end of the transaction.
         final ActivityLifecycleItem lifecycleRequest =
                 TransactionExecutorHelper.getLifecycleRequestForCurrentState(r);
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index fcd13b8..0255860 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -64,7 +64,6 @@
 import android.content.pm.IntentFilterVerificationInfo;
 import android.content.pm.KeySet;
 import android.content.pm.ModuleInfo;
-import android.content.pm.PackageArchiver;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageInstaller;
 import android.content.pm.PackageItemInfo;
@@ -173,7 +172,6 @@
     private volatile UserManager mUserManager;
     private volatile PermissionManager mPermissionManager;
     private volatile PackageInstaller mInstaller;
-    private volatile PackageArchiver mPackageArchiver;
     private volatile ArtManager mArtManager;
     private volatile DevicePolicyManager mDevicePolicyManager;
     private volatile String mPermissionsControllerPackageName;
@@ -3284,18 +3282,6 @@
     }
 
     @Override
-    public PackageArchiver getPackageArchiver() {
-        if (mPackageArchiver == null) {
-            try {
-                mPackageArchiver = new PackageArchiver(mContext, mPM.getPackageArchiverService());
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-        return mPackageArchiver;
-    }
-
-    @Override
     public boolean isPackageAvailable(String packageName) {
         try {
             return mPM.isPackageAvailable(packageName, getUserId());
diff --git a/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java b/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
index e409254..c2c5427 100644
--- a/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
+++ b/core/java/android/app/servertransaction/ActivityConfigurationChangeItem.java
@@ -45,7 +45,7 @@
         CompatibilityInfo.applyOverrideScaleIfNeeded(mConfiguration);
         // Notify the client of an upcoming change in the token configuration. This ensures that
         // batches of config change items only process the newest configuration.
-        client.updatePendingActivityConfiguration(token, mConfiguration);
+        client.updatePendingActivityConfiguration(getActivityToken(), mConfiguration);
     }
 
     @Override
@@ -61,8 +61,7 @@
     @Override
     public Context getContextToUpdate(@NonNull ClientTransactionHandler client,
             @Nullable IBinder token) {
-        // TODO(b/260873529): Update ClientTransaction to bundle multiple activity config updates.
-        return client.getActivity(token);
+        return client.getActivity(getActivityToken());
     }
 
     // ObjectPoolItem implementation
@@ -70,7 +69,9 @@
     private ActivityConfigurationChangeItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static ActivityConfigurationChangeItem obtain(@NonNull Configuration config) {
+    @NonNull
+    public static ActivityConfigurationChangeItem obtain(@NonNull IBinder activityToken,
+            @NonNull Configuration config) {
         if (config == null) {
             throw new IllegalArgumentException("Config must not be null.");
         }
@@ -80,6 +81,7 @@
         if (instance == null) {
             instance = new ActivityConfigurationChangeItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mConfiguration = config;
 
         return instance;
@@ -87,6 +89,7 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mConfiguration = Configuration.EMPTY;
         ObjectPool.recycle(this);
     }
@@ -96,32 +99,34 @@
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeTypedObject(mConfiguration, flags);
     }
 
     /** Read from Parcel. */
-    private ActivityConfigurationChangeItem(Parcel in) {
+    private ActivityConfigurationChangeItem(@NonNull Parcel in) {
+        super(in);
         mConfiguration = in.readTypedObject(Configuration.CREATOR);
     }
 
     public static final @NonNull Creator<ActivityConfigurationChangeItem> CREATOR =
-            new Creator<ActivityConfigurationChangeItem>() {
-        public ActivityConfigurationChangeItem createFromParcel(Parcel in) {
-            return new ActivityConfigurationChangeItem(in);
-        }
+            new Creator<>() {
+                public ActivityConfigurationChangeItem createFromParcel(@NonNull Parcel in) {
+                    return new ActivityConfigurationChangeItem(in);
+                }
 
-        public ActivityConfigurationChangeItem[] newArray(int size) {
-            return new ActivityConfigurationChangeItem[size];
-        }
-    };
+                public ActivityConfigurationChangeItem[] newArray(int size) {
+                    return new ActivityConfigurationChangeItem[size];
+                }
+            };
 
     @Override
     public boolean equals(@Nullable Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final ActivityConfigurationChangeItem other = (ActivityConfigurationChangeItem) o;
@@ -130,11 +135,15 @@
 
     @Override
     public int hashCode() {
-        return mConfiguration.hashCode();
+        int result = 17;
+        result = 31 * result + super.hashCode();
+        result = 31 * result + Objects.hashCode(mConfiguration);
+        return result;
     }
 
     @Override
     public String toString() {
-        return "ActivityConfigurationChange{config=" + mConfiguration + "}";
+        return "ActivityConfigurationChange{" + super.toString()
+                + ",config=" + mConfiguration + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/ActivityLifecycleItem.java b/core/java/android/app/servertransaction/ActivityLifecycleItem.java
index cadb660..b34f678 100644
--- a/core/java/android/app/servertransaction/ActivityLifecycleItem.java
+++ b/core/java/android/app/servertransaction/ActivityLifecycleItem.java
@@ -17,6 +17,8 @@
 package android.app.servertransaction;
 
 import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.os.Parcel;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -50,12 +52,13 @@
     public static final int ON_DESTROY = 6;
     public static final int ON_RESTART = 7;
 
+    ActivityLifecycleItem() {}
+
+    ActivityLifecycleItem(@NonNull Parcel in) {
+        super(in);
+    }
+
     /** A final lifecycle state that an activity should reach. */
     @LifecycleState
     public abstract int getTargetState();
-
-    /** Called by subclasses to make sure base implementation is cleaned up */
-    @Override
-    public void recycle() {
-    }
 }
diff --git a/core/java/android/app/servertransaction/ActivityRelaunchItem.java b/core/java/android/app/servertransaction/ActivityRelaunchItem.java
index a8b058a..491d026 100644
--- a/core/java/android/app/servertransaction/ActivityRelaunchItem.java
+++ b/core/java/android/app/servertransaction/ActivityRelaunchItem.java
@@ -56,18 +56,18 @@
     private ActivityClientRecord mActivityClientRecord;
 
     @Override
-    public void preExecute(ClientTransactionHandler client, IBinder token) {
+    public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
         // The local config is already scaled so only apply if this item is from server side.
         if (!client.isExecutingLocalTransaction()) {
             CompatibilityInfo.applyOverrideScaleIfNeeded(mConfig);
         }
-        mActivityClientRecord = client.prepareRelaunchActivity(token, mPendingResults,
+        mActivityClientRecord = client.prepareRelaunchActivity(getActivityToken(), mPendingResults,
                 mPendingNewIntents, mConfigChanges, mConfig, mPreserveWindow);
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         if (mActivityClientRecord == null) {
             if (DEBUG_ORDER) Slog.d(TAG, "Activity relaunch cancelled");
             return;
@@ -78,9 +78,9 @@
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
-        final ActivityClientRecord r = getActivityClientRecord(client, token);
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
+        final ActivityClientRecord r = getActivityClientRecord(client);
         client.reportRelaunch(r);
     }
 
@@ -89,13 +89,16 @@
     private ActivityRelaunchItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static ActivityRelaunchItem obtain(List<ResultInfo> pendingResults,
-            List<ReferrerIntent> pendingNewIntents, int configChanges, MergedConfiguration config,
-            boolean preserveWindow) {
+    @NonNull
+    public static ActivityRelaunchItem obtain(@NonNull IBinder activityToken,
+            @Nullable List<ResultInfo> pendingResults,
+            @Nullable List<ReferrerIntent> pendingNewIntents, int configChanges,
+            @NonNull MergedConfiguration config, boolean preserveWindow) {
         ActivityRelaunchItem instance = ObjectPool.obtain(ActivityRelaunchItem.class);
         if (instance == null) {
             instance = new ActivityRelaunchItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mPendingResults = pendingResults;
         instance.mPendingNewIntents = pendingNewIntents;
         instance.mConfigChanges = configChanges;
@@ -107,6 +110,7 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mPendingResults = null;
         mPendingNewIntents = null;
         mConfigChanges = 0;
@@ -121,7 +125,8 @@
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeTypedList(mPendingResults, flags);
         dest.writeTypedList(mPendingNewIntents, flags);
         dest.writeInt(mConfigChanges);
@@ -130,7 +135,8 @@
     }
 
     /** Read from Parcel. */
-    private ActivityRelaunchItem(Parcel in) {
+    private ActivityRelaunchItem(@NonNull Parcel in) {
+        super(in);
         mPendingResults = in.createTypedArrayList(ResultInfo.CREATOR);
         mPendingNewIntents = in.createTypedArrayList(ReferrerIntent.CREATOR);
         mConfigChanges = in.readInt();
@@ -139,22 +145,22 @@
     }
 
     public static final @NonNull Creator<ActivityRelaunchItem> CREATOR =
-            new Creator<ActivityRelaunchItem>() {
-        public ActivityRelaunchItem createFromParcel(Parcel in) {
-            return new ActivityRelaunchItem(in);
-        }
+            new Creator<>() {
+                public ActivityRelaunchItem createFromParcel(@NonNull Parcel in) {
+                    return new ActivityRelaunchItem(in);
+                }
 
-        public ActivityRelaunchItem[] newArray(int size) {
-            return new ActivityRelaunchItem[size];
-        }
-    };
+                public ActivityRelaunchItem[] newArray(int size) {
+                    return new ActivityRelaunchItem[size];
+                }
+            };
 
     @Override
     public boolean equals(@Nullable Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final ActivityRelaunchItem other = (ActivityRelaunchItem) o;
@@ -167,6 +173,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + Objects.hashCode(mPendingResults);
         result = 31 * result + Objects.hashCode(mPendingNewIntents);
         result = 31 * result + mConfigChanges;
@@ -177,8 +184,11 @@
 
     @Override
     public String toString() {
-        return "ActivityRelaunchItem{pendingResults=" + mPendingResults
-                + ",pendingNewIntents=" + mPendingNewIntents + ",configChanges="  + mConfigChanges
-                + ",config=" + mConfig + ",preserveWindow" + mPreserveWindow + "}";
+        return "ActivityRelaunchItem{" + super.toString()
+                + ",pendingResults=" + mPendingResults
+                + ",pendingNewIntents=" + mPendingNewIntents
+                + ",configChanges="  + mConfigChanges
+                + ",config=" + mConfig
+                + ",preserveWindow" + mPreserveWindow + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/ActivityResultItem.java b/core/java/android/app/servertransaction/ActivityResultItem.java
index 27d104b..24fced4 100644
--- a/core/java/android/app/servertransaction/ActivityResultItem.java
+++ b/core/java/android/app/servertransaction/ActivityResultItem.java
@@ -30,6 +30,7 @@
 import android.compat.annotation.EnabledAfter;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.os.Build;
+import android.os.IBinder;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.Trace;
@@ -61,24 +62,26 @@
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDeliverResult");
         client.handleSendResult(r, mResultInfoList, "ACTIVITY_RESULT");
         Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
     }
 
-
     // ObjectPoolItem implementation
 
     private ActivityResultItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static ActivityResultItem obtain(List<ResultInfo> resultInfoList) {
+    @NonNull
+    public static ActivityResultItem obtain(@NonNull IBinder activityToken,
+            @NonNull List<ResultInfo> resultInfoList) {
         ActivityResultItem instance = ObjectPool.obtain(ActivityResultItem.class);
         if (instance == null) {
             instance = new ActivityResultItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mResultInfoList = resultInfoList;
 
         return instance;
@@ -86,41 +89,43 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mResultInfoList = null;
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeTypedList(mResultInfoList, flags);
     }
 
     /** Read from Parcel. */
-    private ActivityResultItem(Parcel in) {
+    private ActivityResultItem(@NonNull Parcel in) {
+        super(in);
         mResultInfoList = in.createTypedArrayList(ResultInfo.CREATOR);
     }
 
     public static final @NonNull Parcelable.Creator<ActivityResultItem> CREATOR =
-            new Parcelable.Creator<ActivityResultItem>() {
-        public ActivityResultItem createFromParcel(Parcel in) {
-            return new ActivityResultItem(in);
-        }
+            new Parcelable.Creator<>() {
+                public ActivityResultItem createFromParcel(@NonNull Parcel in) {
+                    return new ActivityResultItem(in);
+                }
 
-        public ActivityResultItem[] newArray(int size) {
-            return new ActivityResultItem[size];
-        }
-    };
+                public ActivityResultItem[] newArray(int size) {
+                    return new ActivityResultItem[size];
+                }
+            };
 
     @Override
     public boolean equals(@Nullable Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final ActivityResultItem other = (ActivityResultItem) o;
@@ -129,11 +134,15 @@
 
     @Override
     public int hashCode() {
-        return mResultInfoList.hashCode();
+        int result = 17;
+        result = 31 * result + super.hashCode();
+        result = 31 * result + Objects.hashCode(mResultInfoList);
+        return result;
     }
 
     @Override
     public String toString() {
-        return "ActivityResultItem{resultInfoList=" + mResultInfoList + "}";
+        return "ActivityResultItem{" + super.toString()
+                + ",resultInfoList=" + mResultInfoList + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/ActivityTransactionItem.java b/core/java/android/app/servertransaction/ActivityTransactionItem.java
index 469a9bf..0f8879e 100644
--- a/core/java/android/app/servertransaction/ActivityTransactionItem.java
+++ b/core/java/android/app/servertransaction/ActivityTransactionItem.java
@@ -18,13 +18,18 @@
 
 import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
 
+import android.annotation.CallSuper;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityThread.ActivityClientRecord;
 import android.app.ClientTransactionHandler;
 import android.os.IBinder;
+import android.os.Parcel;
 
 import com.android.internal.annotations.VisibleForTesting;
 
+import java.util.Objects;
+
 /**
  * An activity-targeting callback message to a client that can be scheduled and executed.
  * It also provides nullity-free version of
@@ -37,11 +42,16 @@
  * @hide
  */
 public abstract class ActivityTransactionItem extends ClientTransactionItem {
-    @Override
-    public final void execute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
-        final ActivityClientRecord r = getActivityClientRecord(client, token);
 
+    /** Target client activity. */
+    private IBinder mActivityToken;
+
+    ActivityTransactionItem() {}
+
+    @Override
+    public final void execute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
+        final ActivityClientRecord r = getActivityClientRecord(client);
         execute(client, r, pendingActions);
     }
 
@@ -51,25 +61,80 @@
      */
     @VisibleForTesting(visibility = PACKAGE)
     public abstract void execute(@NonNull ClientTransactionHandler client,
-            @NonNull ActivityClientRecord r, PendingTransactionActions pendingActions);
+            @NonNull ActivityClientRecord r, @NonNull PendingTransactionActions pendingActions);
 
     /**
-     * Gets the {@link ActivityClientRecord} instance that corresponds to the provided token.
+     * Gets the {@link ActivityClientRecord} instance that this transaction item is for.
      * @param client Target client handler.
-     * @param token Target activity token.
-     * @return The {@link ActivityClientRecord} instance that corresponds to the provided token.
+     * @return The {@link ActivityClientRecord} instance that this transaction item is for.
      */
-    @NonNull ActivityClientRecord getActivityClientRecord(
-            @NonNull ClientTransactionHandler client, IBinder token) {
-        final ActivityClientRecord r = client.getActivityClient(token);
+    @NonNull
+    final ActivityClientRecord getActivityClientRecord(@NonNull ClientTransactionHandler client) {
+        final ActivityClientRecord r = client.getActivityClient(getActivityToken());
         if (r == null) {
             throw new IllegalArgumentException("Activity client record must not be null to execute "
                     + "transaction item: " + this);
         }
-        if (client.getActivity(token) == null) {
+        if (client.getActivity(getActivityToken()) == null) {
             throw new IllegalArgumentException("Activity must not be null to execute "
                     + "transaction item: " + this);
         }
         return r;
     }
+
+    @VisibleForTesting(visibility = PACKAGE)
+    @NonNull
+    @Override
+    public IBinder getActivityToken() {
+        return mActivityToken;
+    }
+
+    void setActivityToken(@NonNull IBinder activityToken) {
+        mActivityToken = activityToken;
+    }
+
+    // To be overridden
+
+    ActivityTransactionItem(@NonNull Parcel in) {
+        mActivityToken = in.readStrongBinder();
+    }
+
+    @CallSuper
+    @Override
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeStrongBinder(mActivityToken);
+    }
+
+    @CallSuper
+    @Override
+    public void recycle() {
+        mActivityToken = null;
+    }
+
+    // Subclass must override and call super.equals to compare the mActivityToken.
+    @SuppressWarnings("EqualsGetClass")
+    @CallSuper
+    @Override
+    public boolean equals(@Nullable Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        final ActivityTransactionItem other = (ActivityTransactionItem) o;
+        return Objects.equals(mActivityToken, other.mActivityToken);
+    }
+
+    @CallSuper
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(mActivityToken);
+    }
+
+    @CallSuper
+    @Override
+    public String toString() {
+        return "mActivityToken=" + mActivityToken;
+    }
 }
diff --git a/core/java/android/app/servertransaction/ClientTransactionItem.java b/core/java/android/app/servertransaction/ClientTransactionItem.java
index fe75d89..30fc104 100644
--- a/core/java/android/app/servertransaction/ClientTransactionItem.java
+++ b/core/java/android/app/servertransaction/ClientTransactionItem.java
@@ -19,6 +19,8 @@
 import static android.app.servertransaction.ActivityLifecycleItem.LifecycleState;
 import static android.app.servertransaction.ActivityLifecycleItem.UNDEFINED;
 
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.ClientTransactionHandler;
@@ -26,13 +28,15 @@
 import android.os.IBinder;
 import android.os.Parcelable;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 /**
  * A callback message to a client that can be scheduled and executed.
  * Examples of these might be activity configuration change, multi-window mode change, activity
  * result delivery etc.
  *
  * @see ClientTransaction
- * @see com.android.server.am.ClientLifecycleManager
+ * @see com.android.server.wm.ClientLifecycleManager
  * @hide
  */
 public abstract class ClientTransactionItem implements BaseClientRequest, Parcelable {
@@ -57,6 +61,16 @@
         return null;
     }
 
+    /**
+     * Returns the activity token if this transaction item is activity-targeting. Otherwise,
+     * returns {@code null}.
+     */
+    @VisibleForTesting(visibility = PACKAGE)
+    @Nullable
+    public IBinder getActivityToken() {
+        return null;
+    }
+
     // Parcelable
 
     @Override
diff --git a/core/java/android/app/servertransaction/DestroyActivityItem.java b/core/java/android/app/servertransaction/DestroyActivityItem.java
index a074286..a327a99 100644
--- a/core/java/android/app/servertransaction/DestroyActivityItem.java
+++ b/core/java/android/app/servertransaction/DestroyActivityItem.java
@@ -36,13 +36,13 @@
     private int mConfigChanges;
 
     @Override
-    public void preExecute(ClientTransactionHandler client, IBinder token) {
-        client.getActivitiesToBeDestroyed().put(token, this);
+    public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
+        client.getActivitiesToBeDestroyed().put(getActivityToken(), this);
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityDestroy");
         client.handleDestroyActivity(r, mFinished, mConfigChanges,
                 false /* getNonConfigInstance */, "DestroyActivityItem");
@@ -54,17 +54,19 @@
         return ON_DESTROY;
     }
 
-
     // ObjectPoolItem implementation
 
     private DestroyActivityItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static DestroyActivityItem obtain(boolean finished, int configChanges) {
+    @NonNull
+    public static DestroyActivityItem obtain(@NonNull IBinder activityToken, boolean finished,
+            int configChanges) {
         DestroyActivityItem instance = ObjectPool.obtain(DestroyActivityItem.class);
         if (instance == null) {
             instance = new DestroyActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mFinished = finished;
         instance.mConfigChanges = configChanges;
 
@@ -79,25 +81,25 @@
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeBoolean(mFinished);
         dest.writeInt(mConfigChanges);
     }
 
     /** Read from Parcel. */
-    private DestroyActivityItem(Parcel in) {
+    private DestroyActivityItem(@NonNull Parcel in) {
+        super(in);
         mFinished = in.readBoolean();
         mConfigChanges = in.readInt();
     }
 
-    public static final @NonNull Creator<DestroyActivityItem> CREATOR =
-            new Creator<DestroyActivityItem>() {
-        public DestroyActivityItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<DestroyActivityItem> CREATOR = new Creator<>() {
+        public DestroyActivityItem createFromParcel(@NonNull Parcel in) {
             return new DestroyActivityItem(in);
         }
 
@@ -111,7 +113,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final DestroyActivityItem other = (DestroyActivityItem) o;
@@ -121,6 +123,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + (mFinished ? 1 : 0);
         result = 31 * result + mConfigChanges;
         return result;
@@ -128,7 +131,8 @@
 
     @Override
     public String toString() {
-        return "DestroyActivityItem{finished=" + mFinished + ",mConfigChanges="
-                + mConfigChanges + "}";
+        return "DestroyActivityItem{" + super.toString()
+                + ",finished=" + mFinished
+                + ",mConfigChanges=" + mConfigChanges + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/EnterPipRequestedItem.java b/core/java/android/app/servertransaction/EnterPipRequestedItem.java
index 7dcae65..743653f 100644
--- a/core/java/android/app/servertransaction/EnterPipRequestedItem.java
+++ b/core/java/android/app/servertransaction/EnterPipRequestedItem.java
@@ -16,9 +16,10 @@
 
 package android.app.servertransaction;
 
-import android.annotation.Nullable;
+import android.annotation.NonNull;
 import android.app.ActivityThread.ActivityClientRecord;
 import android.app.ClientTransactionHandler;
+import android.os.IBinder;
 import android.os.Parcel;
 
 /**
@@ -28,8 +29,8 @@
 public final class EnterPipRequestedItem extends ActivityTransactionItem {
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         client.handlePictureInPictureRequested(r);
     }
 
@@ -38,28 +39,32 @@
     private EnterPipRequestedItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static EnterPipRequestedItem obtain() {
+    @NonNull
+    public static EnterPipRequestedItem obtain(@NonNull IBinder activityToken) {
         EnterPipRequestedItem instance = ObjectPool.obtain(EnterPipRequestedItem.class);
         if (instance == null) {
             instance = new EnterPipRequestedItem();
         }
+        instance.setActivityToken(activityToken);
         return instance;
     }
 
     @Override
     public void recycle() {
+        super.recycle();
         ObjectPool.recycle(this);
     }
 
     // Parcelable implementation
 
-    @Override
-    public void writeToParcel(Parcel dest, int flags) { }
+    private EnterPipRequestedItem(@NonNull Parcel in) {
+        super(in);
+    }
 
-    public static final @android.annotation.NonNull Creator<EnterPipRequestedItem> CREATOR =
-            new Creator<EnterPipRequestedItem>() {
-                public EnterPipRequestedItem createFromParcel(Parcel in) {
-                    return new EnterPipRequestedItem();
+    public static final @NonNull Creator<EnterPipRequestedItem> CREATOR =
+            new Creator<>() {
+                public EnterPipRequestedItem createFromParcel(@NonNull Parcel in) {
+                    return new EnterPipRequestedItem(in);
                 }
 
                 public EnterPipRequestedItem[] newArray(int size) {
@@ -68,12 +73,7 @@
             };
 
     @Override
-    public boolean equals(@Nullable Object o) {
-        return this == o;
-    }
-
-    @Override
     public String toString() {
-        return "EnterPipRequestedItem{}";
+        return "EnterPipRequestedItem{" + super.toString() + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/LaunchActivityItem.java b/core/java/android/app/servertransaction/LaunchActivityItem.java
index 5833f1b..9b37a35 100644
--- a/core/java/android/app/servertransaction/LaunchActivityItem.java
+++ b/core/java/android/app/servertransaction/LaunchActivityItem.java
@@ -18,6 +18,8 @@
 
 import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
 
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.ActivityClient;
@@ -39,6 +41,7 @@
 import android.os.PersistableBundle;
 import android.os.Trace;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.content.ReferrerIntent;
 
@@ -51,6 +54,7 @@
  */
 public class LaunchActivityItem extends ClientTransactionItem {
 
+    private IBinder mActivityToken;
     @UnsupportedAppUsage
     private Intent mIntent;
     private int mIdent;
@@ -80,7 +84,7 @@
     private IActivityClientController mActivityClientController;
 
     @Override
-    public void preExecute(ClientTransactionHandler client, IBinder token) {
+    public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
         client.countLaunchingActivities(1);
         client.updateProcessState(mProcState, false);
         CompatibilityInfo.applyOverrideScaleIfNeeded(mCurConfig);
@@ -92,10 +96,10 @@
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStart");
-        ActivityClientRecord r = new ActivityClientRecord(token, mIntent, mIdent, mInfo,
+        ActivityClientRecord r = new ActivityClientRecord(mActivityToken, mIntent, mIdent, mInfo,
                 mOverrideConfig, mReferrer, mVoiceInteractor, mState, mPersistentState,
                 mPendingResults, mPendingNewIntents, mActivityOptions, mIsForward, mProfilerInfo,
                 client, mAssistToken, mShareableActivityToken, mLaunchedFromBubble,
@@ -105,31 +109,34 @@
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         client.countLaunchingActivities(-1);
     }
 
-
     // ObjectPoolItem implementation
 
     private LaunchActivityItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static LaunchActivityItem obtain(Intent intent, int ident, ActivityInfo info,
-            Configuration curConfig, Configuration overrideConfig, int deviceId,
-            String referrer, IVoiceInteractor voiceInteractor, int procState, Bundle state,
-            PersistableBundle persistentState, List<ResultInfo> pendingResults,
-            List<ReferrerIntent> pendingNewIntents, ActivityOptions activityOptions,
-            boolean isForward, ProfilerInfo profilerInfo, IBinder assistToken,
-            IActivityClientController activityClientController, IBinder shareableActivityToken,
-            boolean launchedFromBubble, IBinder taskFragmentToken) {
+    @NonNull
+    public static LaunchActivityItem obtain(@NonNull IBinder activityToken, @NonNull Intent intent,
+            int ident, @NonNull ActivityInfo info, @NonNull Configuration curConfig,
+            @NonNull Configuration overrideConfig, int deviceId, @Nullable String referrer,
+            @Nullable IVoiceInteractor voiceInteractor, int procState, @Nullable Bundle state,
+            @Nullable PersistableBundle persistentState, @Nullable List<ResultInfo> pendingResults,
+            @Nullable List<ReferrerIntent> pendingNewIntents,
+            @Nullable ActivityOptions activityOptions,
+            boolean isForward, @Nullable ProfilerInfo profilerInfo, @NonNull IBinder assistToken,
+            @Nullable IActivityClientController activityClientController,
+            @NonNull IBinder shareableActivityToken, boolean launchedFromBubble,
+            @Nullable IBinder taskFragmentToken) {
         LaunchActivityItem instance = ObjectPool.obtain(LaunchActivityItem.class);
         if (instance == null) {
             instance = new LaunchActivityItem();
         }
-        setValues(instance, intent, ident, info, curConfig, overrideConfig, deviceId, referrer,
-                voiceInteractor, procState, state, persistentState, pendingResults,
+        setValues(instance, activityToken, intent, ident, info, curConfig, overrideConfig, deviceId,
+                referrer, voiceInteractor, procState, state, persistentState, pendingResults,
                 pendingNewIntents, activityOptions, isForward, profilerInfo, assistToken,
                 activityClientController, shareableActivityToken,
                 launchedFromBubble, taskFragmentToken);
@@ -137,19 +144,26 @@
         return instance;
     }
 
+    @VisibleForTesting(visibility = PACKAGE)
+    @NonNull
+    @Override
+    public IBinder getActivityToken() {
+        return mActivityToken;
+    }
+
     @Override
     public void recycle() {
-        setValues(this, null, 0, null, null, null, 0, null, null, 0, null, null, null, null,
+        setValues(this, null, null, 0, null, null, null, 0, null, null, 0, null, null, null, null,
                 null, false, null, null, null, null, false, null);
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write from Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        dest.writeStrongBinder(mActivityToken);
         dest.writeTypedObject(mIntent, flags);
         dest.writeInt(mIdent);
         dest.writeTypedObject(mInfo, flags);
@@ -174,8 +188,8 @@
     }
 
     /** Read from Parcel. */
-    private LaunchActivityItem(Parcel in) {
-        setValues(this, in.readTypedObject(Intent.CREATOR), in.readInt(),
+    private LaunchActivityItem(@NonNull Parcel in) {
+        setValues(this, in.readStrongBinder(), in.readTypedObject(Intent.CREATOR), in.readInt(),
                 in.readTypedObject(ActivityInfo.CREATOR), in.readTypedObject(Configuration.CREATOR),
                 in.readTypedObject(Configuration.CREATOR), in.readInt(), in.readString(),
                 IVoiceInteractor.Stub.asInterface(in.readStrongBinder()), in.readInt(),
@@ -192,9 +206,8 @@
                 in.readStrongBinder());
     }
 
-    public static final @NonNull Creator<LaunchActivityItem> CREATOR =
-            new Creator<LaunchActivityItem>() {
-        public LaunchActivityItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<LaunchActivityItem> CREATOR = new Creator<>() {
+        public LaunchActivityItem createFromParcel(@NonNull Parcel in) {
             return new LaunchActivityItem(in);
         }
 
@@ -214,7 +227,8 @@
         final LaunchActivityItem other = (LaunchActivityItem) o;
         final boolean intentsEqual = (mIntent == null && other.mIntent == null)
                 || (mIntent != null && mIntent.filterEquals(other.mIntent));
-        return intentsEqual && mIdent == other.mIdent
+        return intentsEqual
+                && Objects.equals(mActivityToken, other.mActivityToken) && mIdent == other.mIdent
                 && activityInfoEqual(other.mInfo) && Objects.equals(mCurConfig, other.mCurConfig)
                 && Objects.equals(mOverrideConfig, other.mOverrideConfig)
                 && mDeviceId == other.mDeviceId
@@ -234,6 +248,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + Objects.hashCode(mActivityToken);
         result = 31 * result + mIntent.filterHashCode();
         result = 31 * result + mIdent;
         result = 31 * result + Objects.hashCode(mCurConfig);
@@ -254,7 +269,7 @@
         return result;
     }
 
-    private boolean activityInfoEqual(ActivityInfo other) {
+    private boolean activityInfoEqual(@Nullable ActivityInfo other) {
         if (mInfo == null) {
             return other == null;
         }
@@ -270,36 +285,51 @@
      * unparceling if a customized class loader is not set to the bundle. So the hash code is
      * simply determined by the bundle is empty or not.
      */
-    private static int getRoughBundleHashCode(BaseBundle bundle) {
+    private static int getRoughBundleHashCode(@Nullable BaseBundle bundle) {
         return (bundle == null || bundle.isDefinitelyEmpty()) ? 0 : 1;
     }
 
     /** Compares the bundles without unparceling them (avoid BadParcelableException). */
-    private static boolean areBundlesEqualRoughly(BaseBundle a, BaseBundle b) {
+    private static boolean areBundlesEqualRoughly(@Nullable BaseBundle a, @Nullable BaseBundle b) {
         return getRoughBundleHashCode(a) == getRoughBundleHashCode(b);
     }
 
     @Override
     public String toString() {
-        return "LaunchActivityItem{intent=" + mIntent + ",ident=" + mIdent + ",info=" + mInfo
-                + ",curConfig=" + mCurConfig + ",overrideConfig=" + mOverrideConfig
-                + ",deviceId=" + mDeviceId + ",referrer=" + mReferrer + ",procState=" + mProcState
-                + ",state=" + mState + ",persistentState=" + mPersistentState
-                + ",pendingResults=" + mPendingResults + ",pendingNewIntents=" + mPendingNewIntents
-                + ",options=" + mActivityOptions + ",profilerInfo=" + mProfilerInfo
-                + ",assistToken=" + mAssistToken + ",shareableActivityToken="
-                + mShareableActivityToken + "}";
+        return "LaunchActivityItem{activityToken=" + mActivityToken
+                + ",intent=" + mIntent
+                + ",ident=" + mIdent
+                + ",info=" + mInfo
+                + ",curConfig=" + mCurConfig
+                + ",overrideConfig=" + mOverrideConfig
+                + ",deviceId=" + mDeviceId
+                + ",referrer=" + mReferrer
+                + ",procState=" + mProcState
+                + ",state=" + mState
+                + ",persistentState=" + mPersistentState
+                + ",pendingResults=" + mPendingResults
+                + ",pendingNewIntents=" + mPendingNewIntents
+                + ",options=" + mActivityOptions
+                + ",profilerInfo=" + mProfilerInfo
+                + ",assistToken=" + mAssistToken
+                + ",shareableActivityToken=" + mShareableActivityToken + "}";
     }
 
     // Using the same method to set and clear values to make sure we don't forget anything
-    private static void setValues(LaunchActivityItem instance, Intent intent, int ident,
-            ActivityInfo info, Configuration curConfig, Configuration overrideConfig, int deviceId,
-            String referrer, IVoiceInteractor voiceInteractor,
-            int procState, Bundle state, PersistableBundle persistentState,
-            List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents,
-            ActivityOptions activityOptions, boolean isForward, ProfilerInfo profilerInfo,
-            IBinder assistToken, IActivityClientController activityClientController,
-            IBinder shareableActivityToken, boolean launchedFromBubble, IBinder taskFragmentToken) {
+    private static void setValues(@Nullable LaunchActivityItem instance,
+            @Nullable IBinder activityToken, @Nullable Intent intent, int ident,
+            @Nullable ActivityInfo info, @Nullable Configuration curConfig,
+            @Nullable Configuration overrideConfig, int deviceId,
+            @Nullable String referrer, @Nullable IVoiceInteractor voiceInteractor,
+            int procState, @Nullable Bundle state, @Nullable PersistableBundle persistentState,
+            @Nullable List<ResultInfo> pendingResults,
+            @Nullable List<ReferrerIntent> pendingNewIntents,
+            @Nullable ActivityOptions activityOptions, boolean isForward,
+            @Nullable ProfilerInfo profilerInfo, @Nullable IBinder assistToken,
+            @Nullable IActivityClientController activityClientController,
+            @Nullable IBinder shareableActivityToken, boolean launchedFromBubble,
+            @Nullable IBinder taskFragmentToken) {
+        instance.mActivityToken = activityToken;
         instance.mIntent = intent;
         instance.mIdent = ident;
         instance.mInfo = info;
diff --git a/core/java/android/app/servertransaction/MoveToDisplayItem.java b/core/java/android/app/servertransaction/MoveToDisplayItem.java
index f13bd74..fb57bed 100644
--- a/core/java/android/app/servertransaction/MoveToDisplayItem.java
+++ b/core/java/android/app/servertransaction/MoveToDisplayItem.java
@@ -40,37 +40,34 @@
     private Configuration mConfiguration;
 
     @Override
-    public void preExecute(ClientTransactionHandler client, IBinder token) {
+    public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
         CompatibilityInfo.applyOverrideScaleIfNeeded(mConfiguration);
         // Notify the client of an upcoming change in the token configuration. This ensures that
         // batches of config change items only process the newest configuration.
-        client.updatePendingActivityConfiguration(token, mConfiguration);
+        client.updatePendingActivityConfiguration(getActivityToken(), mConfiguration);
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityMovedToDisplay");
         client.handleActivityConfigurationChanged(r, mConfiguration, mTargetDisplayId);
         Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
     }
 
-
     // ObjectPoolItem implementation
 
     private MoveToDisplayItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static MoveToDisplayItem obtain(int targetDisplayId,
+    @NonNull
+    public static MoveToDisplayItem obtain(@NonNull IBinder activityToken, int targetDisplayId,
             @NonNull Configuration configuration) {
-        if (configuration == null) {
-            throw new IllegalArgumentException("Configuration must not be null");
-        }
-
         MoveToDisplayItem instance = ObjectPool.obtain(MoveToDisplayItem.class);
         if (instance == null) {
             instance = new MoveToDisplayItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mTargetDisplayId = targetDisplayId;
         instance.mConfiguration = configuration;
 
@@ -79,30 +76,31 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mTargetDisplayId = 0;
         mConfiguration = Configuration.EMPTY;
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeInt(mTargetDisplayId);
         dest.writeTypedObject(mConfiguration, flags);
     }
 
     /** Read from Parcel. */
-    private MoveToDisplayItem(Parcel in) {
+    private MoveToDisplayItem(@NonNull Parcel in) {
+        super(in);
         mTargetDisplayId = in.readInt();
         mConfiguration = in.readTypedObject(Configuration.CREATOR);
     }
 
-    public static final @NonNull Creator<MoveToDisplayItem> CREATOR =
-            new Creator<MoveToDisplayItem>() {
-        public MoveToDisplayItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<MoveToDisplayItem> CREATOR = new Creator<>() {
+        public MoveToDisplayItem createFromParcel(@NonNull Parcel in) {
             return new MoveToDisplayItem(in);
         }
 
@@ -116,7 +114,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final MoveToDisplayItem other = (MoveToDisplayItem) o;
@@ -127,6 +125,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + mTargetDisplayId;
         result = 31 * result + mConfiguration.hashCode();
         return result;
@@ -134,7 +133,8 @@
 
     @Override
     public String toString() {
-        return "MoveToDisplayItem{targetDisplayId=" + mTargetDisplayId
+        return "MoveToDisplayItem{" + super.toString()
+                + ",targetDisplayId=" + mTargetDisplayId
                 + ",configuration=" + mConfiguration + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/NewIntentItem.java b/core/java/android/app/servertransaction/NewIntentItem.java
index 723fa01..8e995aa 100644
--- a/core/java/android/app/servertransaction/NewIntentItem.java
+++ b/core/java/android/app/servertransaction/NewIntentItem.java
@@ -25,6 +25,7 @@
 import android.app.ClientTransactionHandler;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.os.Build;
+import android.os.IBinder;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.Trace;
@@ -50,24 +51,26 @@
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityNewIntent");
         client.handleNewIntent(r, mIntents);
         Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
-
     // ObjectPoolItem implementation
 
     private NewIntentItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static NewIntentItem obtain(List<ReferrerIntent> intents, boolean resume) {
+    @NonNull
+    public static NewIntentItem obtain(@NonNull IBinder activityToken,
+            @NonNull List<ReferrerIntent> intents, boolean resume) {
         NewIntentItem instance = ObjectPool.obtain(NewIntentItem.class);
         if (instance == null) {
             instance = new NewIntentItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mIntents = intents;
         instance.mResume = resume;
 
@@ -76,44 +79,46 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mIntents = null;
         mResume = false;
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeBoolean(mResume);
         dest.writeTypedList(mIntents, flags);
     }
 
     /** Read from Parcel. */
-    private NewIntentItem(Parcel in) {
+    private NewIntentItem(@NonNull Parcel in) {
+        super(in);
         mResume = in.readBoolean();
         mIntents = in.createTypedArrayList(ReferrerIntent.CREATOR);
     }
 
     public static final @NonNull Parcelable.Creator<NewIntentItem> CREATOR =
-            new Parcelable.Creator<NewIntentItem>() {
-        public NewIntentItem createFromParcel(Parcel in) {
-            return new NewIntentItem(in);
-        }
+            new Parcelable.Creator<>() {
+                public NewIntentItem createFromParcel(@NonNull Parcel in) {
+                    return new NewIntentItem(in);
+                }
 
-        public NewIntentItem[] newArray(int size) {
-            return new NewIntentItem[size];
-        }
-    };
+                public NewIntentItem[] newArray(int size) {
+                    return new NewIntentItem[size];
+                }
+            };
 
     @Override
     public boolean equals(@Nullable Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final NewIntentItem other = (NewIntentItem) o;
@@ -123,6 +128,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + (mResume ? 1 : 0);
         result = 31 * result + mIntents.hashCode();
         return result;
@@ -130,6 +136,8 @@
 
     @Override
     public String toString() {
-        return "NewIntentItem{intents=" + mIntents + ",resume=" + mResume + "}";
+        return "NewIntentItem{" + super.toString()
+                + ",intents=" + mIntents
+                + ",resume=" + mResume + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/PauseActivityItem.java b/core/java/android/app/servertransaction/PauseActivityItem.java
index 965e761..a8e6772 100644
--- a/core/java/android/app/servertransaction/PauseActivityItem.java
+++ b/core/java/android/app/servertransaction/PauseActivityItem.java
@@ -42,8 +42,8 @@
     private boolean mAutoEnteringPip;
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
         client.handlePauseActivity(r, mFinished, mUserLeaving, mConfigChanges, mAutoEnteringPip,
                 pendingActions, "PAUSE_ACTIVITY_ITEM");
@@ -56,27 +56,28 @@
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         if (mDontReport) {
             return;
         }
         // TODO(lifecycler): Use interface callback instead of actual implementation.
-        ActivityClient.getInstance().activityPaused(token);
+        ActivityClient.getInstance().activityPaused(getActivityToken());
     }
 
-
     // ObjectPoolItem implementation
 
     private PauseActivityItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static PauseActivityItem obtain(boolean finished, boolean userLeaving, int configChanges,
-            boolean dontReport, boolean autoEnteringPip) {
+    @NonNull
+    public static PauseActivityItem obtain(@NonNull IBinder activityToken, boolean finished,
+            boolean userLeaving, int configChanges, boolean dontReport, boolean autoEnteringPip) {
         PauseActivityItem instance = ObjectPool.obtain(PauseActivityItem.class);
         if (instance == null) {
             instance = new PauseActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mFinished = finished;
         instance.mUserLeaving = userLeaving;
         instance.mConfigChanges = configChanges;
@@ -87,18 +88,10 @@
     }
 
     /** Obtain an instance initialized with default params. */
-    public static PauseActivityItem obtain() {
-        PauseActivityItem instance = ObjectPool.obtain(PauseActivityItem.class);
-        if (instance == null) {
-            instance = new PauseActivityItem();
-        }
-        instance.mFinished = false;
-        instance.mUserLeaving = false;
-        instance.mConfigChanges = 0;
-        instance.mDontReport = true;
-        instance.mAutoEnteringPip = false;
-
-        return instance;
+    @NonNull
+    public static PauseActivityItem obtain(@NonNull IBinder activityToken) {
+        return obtain(activityToken, false /* finished */, false /* userLeaving */,
+                0 /* configChanges */, true /* dontReport */, false /* autoEnteringPip*/);
     }
 
     @Override
@@ -116,7 +109,8 @@
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeBoolean(mFinished);
         dest.writeBoolean(mUserLeaving);
         dest.writeInt(mConfigChanges);
@@ -125,7 +119,8 @@
     }
 
     /** Read from Parcel. */
-    private PauseActivityItem(Parcel in) {
+    private PauseActivityItem(@NonNull Parcel in) {
+        super(in);
         mFinished = in.readBoolean();
         mUserLeaving = in.readBoolean();
         mConfigChanges = in.readInt();
@@ -133,9 +128,8 @@
         mAutoEnteringPip = in.readBoolean();
     }
 
-    public static final @NonNull Creator<PauseActivityItem> CREATOR =
-            new Creator<PauseActivityItem>() {
-        public PauseActivityItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<PauseActivityItem> CREATOR = new Creator<>() {
+        public PauseActivityItem createFromParcel(@NonNull Parcel in) {
             return new PauseActivityItem(in);
         }
 
@@ -149,7 +143,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final PauseActivityItem other = (PauseActivityItem) o;
@@ -161,6 +155,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + (mFinished ? 1 : 0);
         result = 31 * result + (mUserLeaving ? 1 : 0);
         result = 31 * result + mConfigChanges;
@@ -171,8 +166,11 @@
 
     @Override
     public String toString() {
-        return "PauseActivityItem{finished=" + mFinished + ",userLeaving=" + mUserLeaving
-                + ",configChanges=" + mConfigChanges + ",dontReport=" + mDontReport
+        return "PauseActivityItem{" + super.toString()
+                + ",finished=" + mFinished
+                + ",userLeaving=" + mUserLeaving
+                + ",configChanges=" + mConfigChanges
+                + ",dontReport=" + mDontReport
                 + ",autoEnteringPip=" + mAutoEnteringPip + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/PipStateTransactionItem.java b/core/java/android/app/servertransaction/PipStateTransactionItem.java
index 167f5a4..30289ef 100644
--- a/core/java/android/app/servertransaction/PipStateTransactionItem.java
+++ b/core/java/android/app/servertransaction/PipStateTransactionItem.java
@@ -16,12 +16,16 @@
 
 package android.app.servertransaction;
 
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.ActivityThread.ActivityClientRecord;
 import android.app.ClientTransactionHandler;
 import android.app.PictureInPictureUiState;
+import android.os.IBinder;
 import android.os.Parcel;
 
+import java.util.Objects;
+
 /**
  * Request an activity to enter picture-in-picture mode.
  * @hide
@@ -31,8 +35,8 @@
     private PictureInPictureUiState mPipState;
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         client.handlePictureInPictureStateChanged(r, mPipState);
     }
 
@@ -41,11 +45,14 @@
     private PipStateTransactionItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static PipStateTransactionItem obtain(PictureInPictureUiState pipState) {
+    @NonNull
+    public static PipStateTransactionItem obtain(@NonNull IBinder activityToken,
+            @NonNull PictureInPictureUiState pipState) {
         PipStateTransactionItem instance = ObjectPool.obtain(PipStateTransactionItem.class);
         if (instance == null) {
             instance = new PipStateTransactionItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mPipState = pipState;
 
         return instance;
@@ -53,6 +60,7 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mPipState = null;
         ObjectPool.recycle(this);
     }
@@ -61,33 +69,49 @@
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         mPipState.writeToParcel(dest, flags);
     }
 
     /** Read from Parcel. */
-    private PipStateTransactionItem(Parcel in) {
+    private PipStateTransactionItem(@NonNull Parcel in) {
+        super(in);
         mPipState = PictureInPictureUiState.CREATOR.createFromParcel(in);
     }
 
-    public static final @android.annotation.NonNull Creator<PipStateTransactionItem> CREATOR =
-            new Creator<PipStateTransactionItem>() {
-                public PipStateTransactionItem createFromParcel(Parcel in) {
-                    return new PipStateTransactionItem(in);
-                }
+    public static final @NonNull Creator<PipStateTransactionItem> CREATOR = new Creator<>() {
+        public PipStateTransactionItem createFromParcel(@NonNull Parcel in) {
+            return new PipStateTransactionItem(in);
+        }
 
-                public PipStateTransactionItem[] newArray(int size) {
-                    return new PipStateTransactionItem[size];
-                }
-            };
+        public PipStateTransactionItem[] newArray(int size) {
+            return new PipStateTransactionItem[size];
+        }
+    };
 
     @Override
     public boolean equals(@Nullable Object o) {
-        return this == o;
+        if (this == o) {
+            return true;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        final PipStateTransactionItem other = (PipStateTransactionItem) o;
+        return Objects.equals(mPipState, other.mPipState);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + super.hashCode();
+        result = 31 * result + Objects.hashCode(mPipState);
+        return result;
     }
 
     @Override
     public String toString() {
-        return "PipStateTransactionItem{}";
+        return "PipStateTransactionItem{" + super.toString() + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/RefreshCallbackItem.java b/core/java/android/app/servertransaction/RefreshCallbackItem.java
index 74abab2..00128f0 100644
--- a/core/java/android/app/servertransaction/RefreshCallbackItem.java
+++ b/core/java/android/app/servertransaction/RefreshCallbackItem.java
@@ -48,12 +48,12 @@
 
     @Override
     public void execute(@NonNull ClientTransactionHandler client,
-            @NonNull ActivityClientRecord r, PendingTransactionActions pendingActions) {}
+            @NonNull ActivityClientRecord r, @NonNull PendingTransactionActions pendingActions) {}
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
-        final ActivityClientRecord r = getActivityClientRecord(client, token);
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
+        final ActivityClientRecord r = getActivityClientRecord(client);
         client.reportRefresh(r);
     }
 
@@ -71,6 +71,7 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         ObjectPool.recycle(this);
     }
 
@@ -79,7 +80,9 @@
     * @param postExecutionState indicating whether refresh should happen using the
     *        "stopped -> resumed" cycle or "paused -> resumed" cycle.
     */
-    public static RefreshCallbackItem obtain(@LifecycleState int postExecutionState) {
+    @NonNull
+    public static RefreshCallbackItem obtain(@NonNull IBinder activityToken,
+            @LifecycleState int postExecutionState) {
         if (postExecutionState != ON_STOP && postExecutionState != ON_PAUSE) {
             throw new IllegalArgumentException(
                     "Only ON_STOP or ON_PAUSE are allowed as a post execution state for "
@@ -90,6 +93,7 @@
         if (instance == null) {
             instance = new RefreshCallbackItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mPostExecutionState = postExecutionState;
         return instance;
     }
@@ -99,7 +103,8 @@
     // Parcelable implementation
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeInt(mPostExecutionState);
     }
 
@@ -108,7 +113,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final RefreshCallbackItem other = (RefreshCallbackItem) o;
@@ -118,23 +123,25 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + mPostExecutionState;
         return result;
     }
 
     @Override
     public String toString() {
-        return "RefreshCallbackItem{mPostExecutionState=" + mPostExecutionState + "}";
+        return "RefreshCallbackItem{" + super.toString()
+                + ",mPostExecutionState=" + mPostExecutionState + "}";
     }
 
-    private RefreshCallbackItem(Parcel in) {
+    private RefreshCallbackItem(@NonNull Parcel in) {
+        super(in);
         mPostExecutionState = in.readInt();
     }
 
-    public static final @NonNull Creator<RefreshCallbackItem> CREATOR =
-            new Creator<RefreshCallbackItem>() {
+    public static final @NonNull Creator<RefreshCallbackItem> CREATOR = new Creator<>() {
 
-        public RefreshCallbackItem createFromParcel(Parcel in) {
+        public RefreshCallbackItem createFromParcel(@NonNull Parcel in) {
             return new RefreshCallbackItem(in);
         }
 
diff --git a/core/java/android/app/servertransaction/ResumeActivityItem.java b/core/java/android/app/servertransaction/ResumeActivityItem.java
index 222f8ca..b11e73c 100644
--- a/core/java/android/app/servertransaction/ResumeActivityItem.java
+++ b/core/java/android/app/servertransaction/ResumeActivityItem.java
@@ -44,15 +44,15 @@
     private boolean mShouldSendCompatFakeFocus;
 
     @Override
-    public void preExecute(ClientTransactionHandler client, IBinder token) {
+    public void preExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token) {
         if (mUpdateProcState) {
             client.updateProcessState(mProcState, false);
         }
     }
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityResume");
         client.handleResumeActivity(r, true /* finalStateRequest */, mIsForward,
                 mShouldSendCompatFakeFocus, "RESUME_ACTIVITY");
@@ -60,10 +60,11 @@
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void postExecute(@NonNull ClientTransactionHandler client, IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         // TODO(lifecycler): Use interface callback instead of actual implementation.
-        ActivityClient.getInstance().activityResumed(token, client.isHandleSplashScreenExit(token));
+        ActivityClient.getInstance().activityResumed(getActivityToken(),
+                client.isHandleSplashScreenExit(getActivityToken()));
     }
 
     @Override
@@ -71,18 +72,19 @@
         return ON_RESUME;
     }
 
-
     // ObjectPoolItem implementation
 
     private ResumeActivityItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static ResumeActivityItem obtain(int procState, boolean isForward,
-            boolean shouldSendCompatFakeFocus) {
+    @NonNull
+    public static ResumeActivityItem obtain(@NonNull IBinder activityToken, int procState,
+            boolean isForward, boolean shouldSendCompatFakeFocus) {
         ResumeActivityItem instance = ObjectPool.obtain(ResumeActivityItem.class);
         if (instance == null) {
             instance = new ResumeActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mProcState = procState;
         instance.mUpdateProcState = true;
         instance.mIsForward = isForward;
@@ -92,11 +94,14 @@
     }
 
     /** Obtain an instance initialized with provided params. */
-    public static ResumeActivityItem obtain(boolean isForward, boolean shouldSendCompatFakeFocus) {
+    @NonNull
+    public static ResumeActivityItem obtain(@NonNull IBinder activityToken, boolean isForward,
+            boolean shouldSendCompatFakeFocus) {
         ResumeActivityItem instance = ObjectPool.obtain(ResumeActivityItem.class);
         if (instance == null) {
             instance = new ResumeActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mProcState = ActivityManager.PROCESS_STATE_UNKNOWN;
         instance.mUpdateProcState = false;
         instance.mIsForward = isForward;
@@ -115,12 +120,12 @@
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeInt(mProcState);
         dest.writeBoolean(mUpdateProcState);
         dest.writeBoolean(mIsForward);
@@ -128,15 +133,15 @@
     }
 
     /** Read from Parcel. */
-    private ResumeActivityItem(Parcel in) {
+    private ResumeActivityItem(@NonNull Parcel in) {
+        super(in);
         mProcState = in.readInt();
         mUpdateProcState = in.readBoolean();
         mIsForward = in.readBoolean();
         mShouldSendCompatFakeFocus = in.readBoolean();
     }
 
-    public static final @NonNull Creator<ResumeActivityItem> CREATOR =
-            new Creator<ResumeActivityItem>() {
+    public static final @NonNull Creator<ResumeActivityItem> CREATOR = new Creator<>() {
         public ResumeActivityItem createFromParcel(Parcel in) {
             return new ResumeActivityItem(in);
         }
@@ -151,7 +156,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final ResumeActivityItem other = (ResumeActivityItem) o;
@@ -163,6 +168,7 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + mProcState;
         result = 31 * result + (mUpdateProcState ? 1 : 0);
         result = 31 * result + (mIsForward ? 1 : 0);
@@ -172,8 +178,10 @@
 
     @Override
     public String toString() {
-        return "ResumeActivityItem{procState=" + mProcState
-                + ",updateProcState=" + mUpdateProcState + ",isForward=" + mIsForward
+        return "ResumeActivityItem{" + super.toString()
+                + ",procState=" + mProcState
+                + ",updateProcState=" + mUpdateProcState
+                + ",isForward=" + mIsForward
                 + ",shouldSendCompatFakeFocus=" + mShouldSendCompatFakeFocus + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/StartActivityItem.java b/core/java/android/app/servertransaction/StartActivityItem.java
index 15f65f6..8b98b21 100644
--- a/core/java/android/app/servertransaction/StartActivityItem.java
+++ b/core/java/android/app/servertransaction/StartActivityItem.java
@@ -23,6 +23,7 @@
 import android.app.ActivityOptions;
 import android.app.ActivityThread.ActivityClientRecord;
 import android.app.ClientTransactionHandler;
+import android.os.IBinder;
 import android.os.Parcel;
 import android.os.Trace;
 
@@ -37,8 +38,8 @@
     private ActivityOptions mActivityOptions;
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "startActivityItem");
         client.handleStartActivity(r, pendingActions, mActivityOptions);
         Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
@@ -49,17 +50,19 @@
         return ON_START;
     }
 
-
     // ObjectPoolItem implementation
 
     private StartActivityItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static StartActivityItem obtain(ActivityOptions activityOptions) {
+    @NonNull
+    public static StartActivityItem obtain(@NonNull IBinder activityToken,
+            @Nullable ActivityOptions activityOptions) {
         StartActivityItem instance = ObjectPool.obtain(StartActivityItem.class);
         if (instance == null) {
             instance = new StartActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mActivityOptions = activityOptions;
 
         return instance;
@@ -72,37 +75,37 @@
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeBundle(mActivityOptions != null ? mActivityOptions.toBundle() : null);
     }
 
     /** Read from Parcel. */
-    private StartActivityItem(Parcel in) {
+    private StartActivityItem(@NonNull Parcel in) {
+        super(in);
         mActivityOptions = ActivityOptions.fromBundle(in.readBundle());
     }
 
-    public static final @NonNull Creator<StartActivityItem> CREATOR =
-            new Creator<StartActivityItem>() {
-                public StartActivityItem createFromParcel(Parcel in) {
-                    return new StartActivityItem(in);
-                }
+    public static final @NonNull Creator<StartActivityItem> CREATOR = new Creator<>() {
+        public StartActivityItem createFromParcel(@NonNull Parcel in) {
+            return new StartActivityItem(in);
+        }
 
-                public StartActivityItem[] newArray(int size) {
-                    return new StartActivityItem[size];
-                }
-            };
+        public StartActivityItem[] newArray(int size) {
+            return new StartActivityItem[size];
+        }
+    };
 
     @Override
     public boolean equals(@Nullable Object o) {
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final StartActivityItem other = (StartActivityItem) o;
@@ -112,13 +115,15 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + (mActivityOptions != null ? 1 : 0);
         return result;
     }
 
     @Override
     public String toString() {
-        return "StartActivityItem{options=" + mActivityOptions + "}";
+        return "StartActivityItem{" + super.toString()
+                + ",options=" + mActivityOptions + "}";
     }
 }
 
diff --git a/core/java/android/app/servertransaction/StopActivityItem.java b/core/java/android/app/servertransaction/StopActivityItem.java
index 7e9116d..f432567 100644
--- a/core/java/android/app/servertransaction/StopActivityItem.java
+++ b/core/java/android/app/servertransaction/StopActivityItem.java
@@ -37,8 +37,8 @@
     private int mConfigChanges;
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "activityStop");
         client.handleStopActivity(r, mConfigChanges, pendingActions,
                 true /* finalStateRequest */, "STOP_ACTIVITY_ITEM");
@@ -46,8 +46,8 @@
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         client.reportStop(pendingActions);
     }
 
@@ -56,20 +56,22 @@
         return ON_STOP;
     }
 
-
     // ObjectPoolItem implementation
 
     private StopActivityItem() {}
 
     /**
      * Obtain an instance initialized with provided params.
+     * @param activityToken the activity that stops.
      * @param configChanges Configuration pieces that changed.
      */
-    public static StopActivityItem obtain(int configChanges) {
+    @NonNull
+    public static StopActivityItem obtain(@NonNull IBinder activityToken, int configChanges) {
         StopActivityItem instance = ObjectPool.obtain(StopActivityItem.class);
         if (instance == null) {
             instance = new StopActivityItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mConfigChanges = configChanges;
 
         return instance;
@@ -82,23 +84,23 @@
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeInt(mConfigChanges);
     }
 
     /** Read from Parcel. */
-    private StopActivityItem(Parcel in) {
+    private StopActivityItem(@NonNull Parcel in) {
+        super(in);
         mConfigChanges = in.readInt();
     }
 
-    public static final @NonNull Creator<StopActivityItem> CREATOR =
-            new Creator<StopActivityItem>() {
-        public StopActivityItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<StopActivityItem> CREATOR = new Creator<>() {
+        public StopActivityItem createFromParcel(@NonNull Parcel in) {
             return new StopActivityItem(in);
         }
 
@@ -112,7 +114,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final StopActivityItem other = (StopActivityItem) o;
@@ -122,12 +124,14 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + mConfigChanges;
         return result;
     }
 
     @Override
     public String toString() {
-        return "StopActivityItem{configChanges=" + mConfigChanges + "}";
+        return "StopActivityItem{" + super.toString()
+                + ",configChanges=" + mConfigChanges + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java b/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
index 5cd3d68f..693599f 100644
--- a/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
+++ b/core/java/android/app/servertransaction/TopResumedActivityChangeItem.java
@@ -35,16 +35,16 @@
     private boolean mOnTop;
 
     @Override
-    public void execute(ClientTransactionHandler client, ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+    public void execute(@NonNull ClientTransactionHandler client, @NonNull ActivityClientRecord r,
+            @NonNull PendingTransactionActions pendingActions) {
         Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "topResumedActivityChangeItem");
         client.handleTopResumedActivityChanged(r, mOnTop, "topResumedActivityChangeItem");
         Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
     }
 
     @Override
-    public void postExecute(ClientTransactionHandler client, IBinder token,
-            PendingTransactionActions pendingActions) {
+    public void postExecute(@NonNull ClientTransactionHandler client, @NonNull IBinder token,
+            @NonNull PendingTransactionActions pendingActions) {
         if (mOnTop) {
             return;
         }
@@ -58,18 +58,20 @@
         ActivityClient.getInstance().activityTopResumedStateLost();
     }
 
-
     // ObjectPoolItem implementation
 
     private TopResumedActivityChangeItem() {}
 
     /** Obtain an instance initialized with provided params. */
-    public static TopResumedActivityChangeItem obtain(boolean onTop) {
+    @NonNull
+    public static TopResumedActivityChangeItem obtain(@NonNull IBinder activityToken,
+            boolean onTop) {
         TopResumedActivityChangeItem instance =
                 ObjectPool.obtain(TopResumedActivityChangeItem.class);
         if (instance == null) {
             instance = new TopResumedActivityChangeItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mOnTop = onTop;
 
         return instance;
@@ -77,27 +79,28 @@
 
     @Override
     public void recycle() {
+        super.recycle();
         mOnTop = false;
         ObjectPool.recycle(this);
     }
 
-
     // Parcelable implementation
 
     /** Write to Parcel. */
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeBoolean(mOnTop);
     }
 
     /** Read from Parcel. */
-    private TopResumedActivityChangeItem(Parcel in) {
+    private TopResumedActivityChangeItem(@NonNull Parcel in) {
+        super(in);
         mOnTop = in.readBoolean();
     }
 
-    public static final @NonNull Creator<TopResumedActivityChangeItem> CREATOR =
-            new Creator<TopResumedActivityChangeItem>() {
-        public TopResumedActivityChangeItem createFromParcel(Parcel in) {
+    public static final @NonNull Creator<TopResumedActivityChangeItem> CREATOR = new Creator<>() {
+        public TopResumedActivityChangeItem createFromParcel(@NonNull Parcel in) {
             return new TopResumedActivityChangeItem(in);
         }
 
@@ -111,7 +114,7 @@
         if (this == o) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (!super.equals(o)) {
             return false;
         }
         final TopResumedActivityChangeItem other = (TopResumedActivityChangeItem) o;
@@ -121,12 +124,14 @@
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + super.hashCode();
         result = 31 * result + (mOnTop ? 1 : 0);
         return result;
     }
 
     @Override
     public String toString() {
-        return "TopResumedActivityChangeItem{onTop=" + mOnTop + "}";
+        return "TopResumedActivityChangeItem{" + super.toString()
+                + ",onTop=" + mOnTop + "}";
     }
 }
diff --git a/core/java/android/app/servertransaction/TransactionExecutorHelper.java b/core/java/android/app/servertransaction/TransactionExecutorHelper.java
index baf2a47..0f9c517 100644
--- a/core/java/android/app/servertransaction/TransactionExecutorHelper.java
+++ b/core/java/android/app/servertransaction/TransactionExecutorHelper.java
@@ -196,13 +196,13 @@
                 // Fall through to return the PAUSE item to ensure the activity is properly
                 // resumed while relaunching.
             case ON_PAUSE:
-                lifecycleItem = PauseActivityItem.obtain();
+                lifecycleItem = PauseActivityItem.obtain(r.token);
                 break;
             case ON_STOP:
-                lifecycleItem = StopActivityItem.obtain(0 /* configChanges */);
+                lifecycleItem = StopActivityItem.obtain(r.token, 0 /* configChanges */);
                 break;
             default:
-                lifecycleItem = ResumeActivityItem.obtain(false /* isForward */,
+                lifecycleItem = ResumeActivityItem.obtain(r.token, false /* isForward */,
                         false /* shouldSendCompatFakeFocus */);
                 break;
         }
diff --git a/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java b/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
index 767fd28..11947e9 100644
--- a/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
+++ b/core/java/android/app/servertransaction/TransferSplashScreenViewStateItem.java
@@ -20,10 +20,13 @@
 import android.annotation.Nullable;
 import android.app.ActivityThread;
 import android.app.ClientTransactionHandler;
+import android.os.IBinder;
 import android.os.Parcel;
 import android.view.SurfaceControl;
 import android.window.SplashScreenView.SplashScreenViewParcelable;
 
+import java.util.Objects;
+
 /**
  * Transfer a splash screen view to an Activity.
  * @hide
@@ -36,36 +39,44 @@
     @Override
     public void execute(@NonNull ClientTransactionHandler client,
             @NonNull ActivityThread.ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+            @NonNull PendingTransactionActions pendingActions) {
         client.handleAttachSplashScreenView(r, mSplashScreenViewParcelable, mStartingWindowLeash);
     }
 
     @Override
     public void recycle() {
+        super.recycle();
+        mSplashScreenViewParcelable = null;
+        mStartingWindowLeash = null;
         ObjectPool.recycle(this);
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
+        super.writeToParcel(dest, flags);
         dest.writeTypedObject(mSplashScreenViewParcelable, flags);
         dest.writeTypedObject(mStartingWindowLeash, flags);
     }
 
     private TransferSplashScreenViewStateItem() {}
-    private TransferSplashScreenViewStateItem(Parcel in) {
+
+    private TransferSplashScreenViewStateItem(@NonNull Parcel in) {
+        super(in);
         mSplashScreenViewParcelable = in.readTypedObject(SplashScreenViewParcelable.CREATOR);
         mStartingWindowLeash = in.readTypedObject(SurfaceControl.CREATOR);
     }
 
     /** Obtain an instance initialized with provided params. */
+    @NonNull
     public static TransferSplashScreenViewStateItem obtain(
-            @Nullable SplashScreenViewParcelable parcelable,
+            @NonNull IBinder activityToken, @Nullable SplashScreenViewParcelable parcelable,
             @Nullable SurfaceControl startingWindowLeash) {
         TransferSplashScreenViewStateItem instance =
                 ObjectPool.obtain(TransferSplashScreenViewStateItem.class);
         if (instance == null) {
             instance = new TransferSplashScreenViewStateItem();
         }
+        instance.setActivityToken(activityToken);
         instance.mSplashScreenViewParcelable = parcelable;
         instance.mStartingWindowLeash = startingWindowLeash;
 
@@ -73,8 +84,8 @@
     }
 
     public static final @NonNull Creator<TransferSplashScreenViewStateItem> CREATOR =
-            new Creator<TransferSplashScreenViewStateItem>() {
-                public TransferSplashScreenViewStateItem createFromParcel(Parcel in) {
+            new Creator<>() {
+                public TransferSplashScreenViewStateItem createFromParcel(@NonNull Parcel in) {
                     return new TransferSplashScreenViewStateItem(in);
                 }
 
@@ -82,4 +93,33 @@
                     return new TransferSplashScreenViewStateItem[size];
                 }
             };
+
+    @Override
+    public boolean equals(@Nullable Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
+        final TransferSplashScreenViewStateItem other = (TransferSplashScreenViewStateItem) o;
+        return Objects.equals(mSplashScreenViewParcelable, other.mSplashScreenViewParcelable)
+                && Objects.equals(mStartingWindowLeash, other.mStartingWindowLeash);
+    }
+
+    @Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + super.hashCode();
+        result = 31 * result + Objects.hashCode(mSplashScreenViewParcelable);
+        result = 31 * result + Objects.hashCode(mStartingWindowLeash);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return "TransferSplashScreenViewStateItem{" + super.toString()
+                + ",splashScreenViewParcelable=" + mSplashScreenViewParcelable
+                + ",startingWindowLeash=" + mStartingWindowLeash + "}";
+    }
 }
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
index 3aa2877..2fb428b 100644
--- a/core/java/android/companion/CompanionDeviceManager.java
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -39,6 +39,7 @@
 import android.app.PendingIntent;
 import android.bluetooth.BluetoothAdapter;
 import android.bluetooth.BluetoothDevice;
+import android.companion.datatransfer.PermissionSyncRequest;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -180,7 +181,7 @@
     public @interface DataSyncTypes {}
 
     /**
-     * Used by {@link #enableSystemDataSync(int, int)}}.
+     * Used by {@link #enableSystemDataSyncForTypes(int, int)}}.
      * Sync call metadata like muting, ending and silencing a call.
      *
      */
@@ -552,6 +553,39 @@
     }
 
     /**
+     * @hide
+     */
+    public void enablePermissionsSync(int associationId) {
+        try {
+            mService.enablePermissionsSync(associationId);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public void disablePermissionsSync(int associationId) {
+        try {
+            mService.disablePermissionsSync(associationId);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+        try {
+            return mService.getPermissionSyncRequest(associationId);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
      * <p>Calling this API requires a uses-feature
      * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
      *
diff --git a/core/java/android/companion/ICompanionDeviceManager.aidl b/core/java/android/companion/ICompanionDeviceManager.aidl
index a3b202a..c5a1988 100644
--- a/core/java/android/companion/ICompanionDeviceManager.aidl
+++ b/core/java/android/companion/ICompanionDeviceManager.aidl
@@ -24,6 +24,7 @@
 import android.companion.ISystemDataTransferCallback;
 import android.companion.AssociationInfo;
 import android.companion.AssociationRequest;
+import android.companion.datatransfer.PermissionSyncRequest;
 import android.content.ComponentName;
 
 /**
@@ -113,6 +114,12 @@
 
     void disableSystemDataSync(int associationId, int flags);
 
+    void enablePermissionsSync(int associationId);
+
+    void disablePermissionsSync(int associationId);
+
+    PermissionSyncRequest getPermissionSyncRequest(int associationId);
+
     @EnforcePermission("MANAGE_COMPANION_DEVICES")
     void enableSecureTransport(boolean enabled);
 
diff --git a/core/java/android/companion/virtual/IVirtualDevice.aidl b/core/java/android/companion/virtual/IVirtualDevice.aidl
index c58561d..bf00a5a 100644
--- a/core/java/android/companion/virtual/IVirtualDevice.aidl
+++ b/core/java/android/companion/virtual/IVirtualDevice.aidl
@@ -23,6 +23,7 @@
 import android.companion.virtual.sensor.VirtualSensor;
 import android.companion.virtual.sensor.VirtualSensorConfig;
 import android.companion.virtual.sensor.VirtualSensorEvent;
+import android.content.ComponentName;
 import android.content.IntentFilter;
 import android.graphics.Point;
 import android.graphics.PointF;
@@ -86,6 +87,18 @@
     void setDevicePolicy(int policyType, int devicePolicy);
 
     /**
+     * Adds an exemption to the default activity launch policy.
+     */
+    @EnforcePermission("CREATE_VIRTUAL_DEVICE")
+    void addActivityPolicyExemption(in ComponentName exemption);
+
+    /**
+     * Removes an exemption to the default activity launch policy.
+     */
+    @EnforcePermission("CREATE_VIRTUAL_DEVICE")
+    void removeActivityPolicyExemption(in ComponentName exemption);
+
+    /**
      * Notifies that an audio session being started.
      */
     @EnforcePermission("CREATE_VIRTUAL_DEVICE")
diff --git a/core/java/android/companion/virtual/VirtualDeviceInternal.java b/core/java/android/companion/virtual/VirtualDeviceInternal.java
index 2e5c0f7..7bf2e91 100644
--- a/core/java/android/companion/virtual/VirtualDeviceInternal.java
+++ b/core/java/android/companion/virtual/VirtualDeviceInternal.java
@@ -247,6 +247,22 @@
         }
     }
 
+    void addActivityPolicyExemption(@NonNull ComponentName componentName) {
+        try {
+            mVirtualDevice.addActivityPolicyExemption(componentName);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    void removeActivityPolicyExemption(@NonNull ComponentName componentName) {
+        try {
+            mVirtualDevice.removeActivityPolicyExemption(componentName);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
     @NonNull
     VirtualDpad createVirtualDpad(@NonNull VirtualDpadConfig config) {
         try {
diff --git a/core/java/android/companion/virtual/VirtualDeviceManager.java b/core/java/android/companion/virtual/VirtualDeviceManager.java
index 7b81031..d338d17 100644
--- a/core/java/android/companion/virtual/VirtualDeviceManager.java
+++ b/core/java/android/companion/virtual/VirtualDeviceManager.java
@@ -62,7 +62,6 @@
 import android.view.Surface;
 
 import com.android.internal.annotations.GuardedBy;
-import com.android.internal.util.AnnotationValidations;
 
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -624,19 +623,62 @@
          * @param devicePolicy the value of the policy, i.e. how to interpret the device behavior.
          *
          * @see VirtualDeviceParams#POLICY_TYPE_RECENTS
+         * @see VirtualDeviceParams#POLICY_TYPE_ACTIVITY
          */
         @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY)
         @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
         public void setDevicePolicy(@VirtualDeviceParams.DynamicPolicyType int policyType,
                 @VirtualDeviceParams.DevicePolicy int devicePolicy) {
-            AnnotationValidations.validate(
-                    VirtualDeviceParams.DynamicPolicyType.class, null, policyType);
-            AnnotationValidations.validate(
-                    VirtualDeviceParams.DevicePolicy.class, null, devicePolicy);
             mVirtualDeviceInternal.setDevicePolicy(policyType, devicePolicy);
         }
 
         /**
+         * Specifies a component name to be exempt from the current activity launch policy.
+         *
+         * <p>If the current {@link VirtualDeviceParams#POLICY_TYPE_ACTIVIY} allows activity
+         * launches by default, (i.e. it is {@link VirtualDeviceParams#DEVICE_POLICY_DEFAULT},
+         * then the specified component will be blocked from launching.
+         * If the current {@link VirtualDeviceParams#POLICY_TYPE_ACTIVITY} blocks activity
+         * launches by default, (i.e. it is {@link VirtualDeviceParams#DEVICE_POLICY_CUSTOM}, then
+         * the specified component will be allowed to launch.</p>
+         *
+         * <p>Note that changing the activity launch policy will not affect current set of exempt
+         * components and it needs to be updated separately.</p>
+         *
+         * @see #removeActivityPolicyExemption
+         * @see #setDevicePolicy
+         */
+        @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY)
+        @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+        public void addActivityPolicyExemption(@NonNull ComponentName componentName) {
+            mVirtualDeviceInternal.addActivityPolicyExemption(
+                    Objects.requireNonNull(componentName));
+        }
+
+        /**
+         * Makes the specified component name to adhere to the default activity launch policy.
+         *
+         * <p>If the current {@link VirtualDeviceParams#POLICY_TYPE_ACTIVIY} allows activity
+         * launches by default, (i.e. it is {@link VirtualDeviceParams#DEVICE_POLICY_DEFAULT},
+         * then the specified component will be allowed to launch.
+         * If the current {@link VirtualDeviceParams#POLICY_TYPE_ACTIVITY} blocks activity
+         * launches by default, (i.e. it is {@link VirtualDeviceParams#DEVICE_POLICY_CUSTOM}, then
+         * the specified component will be blocked from launching.</p>
+         *
+         * <p>Note that changing the activity launch policy will not affect current set of exempt
+         * components and it needs to be updated separately.</p>
+         *
+         * @see #addActivityPolicyExemption
+         * @see #setDevicePolicy
+         */
+        @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY)
+        @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+        public void removeActivityPolicyExemption(@NonNull ComponentName componentName) {
+            mVirtualDeviceInternal.removeActivityPolicyExemption(
+                    Objects.requireNonNull(componentName));
+        }
+
+        /**
          * Creates a virtual dpad.
          *
          * @param config the configurations of the virtual dpad.
diff --git a/core/java/android/companion/virtual/VirtualDeviceParams.java b/core/java/android/companion/virtual/VirtualDeviceParams.java
index 51df257..b4c740ec 100644
--- a/core/java/android/companion/virtual/VirtualDeviceParams.java
+++ b/core/java/android/companion/virtual/VirtualDeviceParams.java
@@ -22,12 +22,14 @@
 import static java.util.concurrent.TimeUnit.MICROSECONDS;
 
 import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
 import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
+import android.companion.virtual.flags.Flags;
 import android.companion.virtual.sensor.IVirtualSensorCallback;
 import android.companion.virtual.sensor.VirtualSensor;
 import android.companion.virtual.sensor.VirtualSensorCallback;
@@ -144,7 +146,7 @@
      * @hide
      */
     @IntDef(prefix = "POLICY_TYPE_", value = {POLICY_TYPE_SENSORS, POLICY_TYPE_AUDIO,
-            POLICY_TYPE_RECENTS})
+            POLICY_TYPE_RECENTS, POLICY_TYPE_ACTIVITY})
     @Retention(RetentionPolicy.SOURCE)
     @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
     public @interface PolicyType {}
@@ -155,7 +157,7 @@
      * @see VirtualDeviceManager.VirtualDevice#setDevicePolicy
      * @hide
      */
-    @IntDef(prefix = "POLICY_TYPE_", value = {POLICY_TYPE_RECENTS})
+    @IntDef(prefix = "POLICY_TYPE_", value = {POLICY_TYPE_RECENTS, POLICY_TYPE_ACTIVITY})
     @Retention(RetentionPolicy.SOURCE)
     @Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
     public @interface DynamicPolicyType {}
@@ -195,19 +197,35 @@
      *     <li>{@link #DEVICE_POLICY_DEFAULT}: Activities launched on VirtualDisplays owned by this
      *     device will appear in the host device recents.
      *     <li>{@link #DEVICE_POLICY_CUSTOM}: Activities launched on VirtualDisplays owned by this
-     *      *     device will not appear in recents.
+     *     device will not appear in recents.
      * </ul>
      */
     public static final int POLICY_TYPE_RECENTS = 2;
 
+    /**
+     * Tells the activity manager what the default launch behavior for activities on this device is.
+     *
+     * <ul>
+     *     <li>{@link #DEVICE_POLICY_DEFAULT}: Activities are allowed to be launched on displays
+     *     owned by this device, unless explicitly blocked by the device.
+     *     <li>{@link #DEVICE_POLICY_CUSTOM}: Activities are blocked from launching on displays
+     *     owned by this device, unless explicitly allowed by the device.
+     * </ul>
+     *
+     * @see VirtualDeviceManager.VirtualDevice#addActivityPolicyExemption
+     * @see VirtualDeviceManager.VirtualDevice#removeActivityPolicyExemption
+     */
+    @FlaggedApi(Flags.FLAG_DYNAMIC_POLICY)
+    public static final int POLICY_TYPE_ACTIVITY = 3;
+
     private final int mLockState;
     @NonNull private final ArraySet<UserHandle> mUsersWithMatchingAccounts;
     @NavigationPolicy
     private final int mDefaultNavigationPolicy;
-    @NonNull private final ArraySet<ComponentName> mCrossTaskNavigationExceptions;
+    @NonNull private final ArraySet<ComponentName> mCrossTaskNavigationExemptions;
     @ActivityPolicy
     private final int mDefaultActivityPolicy;
-    @NonNull private final ArraySet<ComponentName> mActivityPolicyExceptions;
+    @NonNull private final ArraySet<ComponentName> mActivityPolicyExemptions;
     @Nullable private final String mName;
     // Mapping of @PolicyType to @DevicePolicy
     @NonNull private final SparseIntArray mDevicePolicies;
@@ -220,9 +238,9 @@
             @LockState int lockState,
             @NonNull Set<UserHandle> usersWithMatchingAccounts,
             @NavigationPolicy int defaultNavigationPolicy,
-            @NonNull Set<ComponentName> crossTaskNavigationExceptions,
+            @NonNull Set<ComponentName> crossTaskNavigationExemptions,
             @ActivityPolicy int defaultActivityPolicy,
-            @NonNull Set<ComponentName> activityPolicyExceptions,
+            @NonNull Set<ComponentName> activityPolicyExemptions,
             @Nullable String name,
             @NonNull SparseIntArray devicePolicies,
             @NonNull List<VirtualSensorConfig> virtualSensorConfigs,
@@ -233,11 +251,11 @@
         mUsersWithMatchingAccounts =
                 new ArraySet<>(Objects.requireNonNull(usersWithMatchingAccounts));
         mDefaultNavigationPolicy = defaultNavigationPolicy;
-        mCrossTaskNavigationExceptions =
-                new ArraySet<>(Objects.requireNonNull(crossTaskNavigationExceptions));
+        mCrossTaskNavigationExemptions =
+                new ArraySet<>(Objects.requireNonNull(crossTaskNavigationExemptions));
         mDefaultActivityPolicy = defaultActivityPolicy;
-        mActivityPolicyExceptions =
-                new ArraySet<>(Objects.requireNonNull(activityPolicyExceptions));
+        mActivityPolicyExemptions =
+                new ArraySet<>(Objects.requireNonNull(activityPolicyExemptions));
         mName = name;
         mDevicePolicies = Objects.requireNonNull(devicePolicies);
         mVirtualSensorConfigs = Objects.requireNonNull(virtualSensorConfigs);
@@ -251,9 +269,9 @@
         mLockState = parcel.readInt();
         mUsersWithMatchingAccounts = (ArraySet<UserHandle>) parcel.readArraySet(null);
         mDefaultNavigationPolicy = parcel.readInt();
-        mCrossTaskNavigationExceptions = (ArraySet<ComponentName>) parcel.readArraySet(null);
+        mCrossTaskNavigationExemptions = (ArraySet<ComponentName>) parcel.readArraySet(null);
         mDefaultActivityPolicy = parcel.readInt();
-        mActivityPolicyExceptions = (ArraySet<ComponentName>) parcel.readArraySet(null);
+        mActivityPolicyExemptions = (ArraySet<ComponentName>) parcel.readArraySet(null);
         mName = parcel.readString8();
         mDevicePolicies = parcel.readSparseIntArray();
         mVirtualSensorConfigs = new ArrayList<>();
@@ -295,7 +313,7 @@
     public Set<ComponentName> getAllowedCrossTaskNavigations() {
         return mDefaultNavigationPolicy == NAVIGATION_POLICY_DEFAULT_ALLOWED
                 ? Collections.emptySet()
-                : Collections.unmodifiableSet(mCrossTaskNavigationExceptions);
+                : Collections.unmodifiableSet(mCrossTaskNavigationExemptions);
     }
 
     /**
@@ -310,7 +328,7 @@
     public Set<ComponentName> getBlockedCrossTaskNavigations() {
         return mDefaultNavigationPolicy == NAVIGATION_POLICY_DEFAULT_BLOCKED
                 ? Collections.emptySet()
-                : Collections.unmodifiableSet(mCrossTaskNavigationExceptions);
+                : Collections.unmodifiableSet(mCrossTaskNavigationExemptions);
     }
 
     /**
@@ -336,7 +354,7 @@
     public Set<ComponentName> getAllowedActivities() {
         return mDefaultActivityPolicy == ACTIVITY_POLICY_DEFAULT_ALLOWED
                 ? Collections.emptySet()
-                : Collections.unmodifiableSet(mActivityPolicyExceptions);
+                : Collections.unmodifiableSet(mActivityPolicyExemptions);
     }
 
     /**
@@ -349,7 +367,7 @@
     public Set<ComponentName> getBlockedActivities() {
         return mDefaultActivityPolicy == ACTIVITY_POLICY_DEFAULT_BLOCKED
                 ? Collections.emptySet()
-                : Collections.unmodifiableSet(mActivityPolicyExceptions);
+                : Collections.unmodifiableSet(mActivityPolicyExemptions);
     }
 
     /**
@@ -440,9 +458,9 @@
         dest.writeInt(mLockState);
         dest.writeArraySet(mUsersWithMatchingAccounts);
         dest.writeInt(mDefaultNavigationPolicy);
-        dest.writeArraySet(mCrossTaskNavigationExceptions);
+        dest.writeArraySet(mCrossTaskNavigationExemptions);
         dest.writeInt(mDefaultActivityPolicy);
-        dest.writeArraySet(mActivityPolicyExceptions);
+        dest.writeArraySet(mActivityPolicyExemptions);
         dest.writeString8(mName);
         dest.writeSparseIntArray(mDevicePolicies);
         dest.writeTypedList(mVirtualSensorConfigs);
@@ -476,9 +494,9 @@
         return mLockState == that.mLockState
                 && mUsersWithMatchingAccounts.equals(that.mUsersWithMatchingAccounts)
                 && Objects.equals(
-                        mCrossTaskNavigationExceptions, that.mCrossTaskNavigationExceptions)
+                        mCrossTaskNavigationExemptions, that.mCrossTaskNavigationExemptions)
                 && mDefaultNavigationPolicy == that.mDefaultNavigationPolicy
-                && Objects.equals(mActivityPolicyExceptions, that.mActivityPolicyExceptions)
+                && Objects.equals(mActivityPolicyExemptions, that.mActivityPolicyExemptions)
                 && mDefaultActivityPolicy == that.mDefaultActivityPolicy
                 && Objects.equals(mName, that.mName)
                 && mAudioPlaybackSessionId == that.mAudioPlaybackSessionId
@@ -488,8 +506,8 @@
     @Override
     public int hashCode() {
         int hashCode = Objects.hash(
-                mLockState, mUsersWithMatchingAccounts, mCrossTaskNavigationExceptions,
-                mDefaultNavigationPolicy, mActivityPolicyExceptions, mDefaultActivityPolicy, mName,
+                mLockState, mUsersWithMatchingAccounts, mCrossTaskNavigationExemptions,
+                mDefaultNavigationPolicy, mActivityPolicyExemptions, mDefaultActivityPolicy, mName,
                 mDevicePolicies, mAudioPlaybackSessionId, mAudioRecordingSessionId);
         for (int i = 0; i < mDevicePolicies.size(); i++) {
             hashCode = 31 * hashCode + mDevicePolicies.keyAt(i);
@@ -505,9 +523,9 @@
                 + " mLockState=" + mLockState
                 + " mUsersWithMatchingAccounts=" + mUsersWithMatchingAccounts
                 + " mDefaultNavigationPolicy=" + mDefaultNavigationPolicy
-                + " mCrossTaskNavigationExceptions=" + mCrossTaskNavigationExceptions
+                + " mCrossTaskNavigationExemptions=" + mCrossTaskNavigationExemptions
                 + " mDefaultActivityPolicy=" + mDefaultActivityPolicy
-                + " mActivityPolicyExceptions=" + mActivityPolicyExceptions
+                + " mActivityPolicyExemptions=" + mActivityPolicyExemptions
                 + " mName=" + mName
                 + " mDevicePolicies=" + mDevicePolicies
                 + " mAudioPlaybackSessionId=" + mAudioPlaybackSessionId
@@ -524,9 +542,9 @@
         pw.println(prefix + "mLockState=" + mLockState);
         pw.println(prefix + "mUsersWithMatchingAccounts=" + mUsersWithMatchingAccounts);
         pw.println(prefix + "mDefaultNavigationPolicy=" + mDefaultNavigationPolicy);
-        pw.println(prefix + "mCrossTaskNavigationExceptions=" + mCrossTaskNavigationExceptions);
+        pw.println(prefix + "mCrossTaskNavigationExemptions=" + mCrossTaskNavigationExemptions);
         pw.println(prefix + "mDefaultActivityPolicy=" + mDefaultActivityPolicy);
-        pw.println(prefix + "mActivityPolicyExceptions=" + mActivityPolicyExceptions);
+        pw.println(prefix + "mActivityPolicyExemptions=" + mActivityPolicyExemptions);
         pw.println(prefix + "mDevicePolicies=" + mDevicePolicies);
         pw.println(prefix + "mVirtualSensorConfigs=" + mVirtualSensorConfigs);
         pw.println(prefix + "mAudioPlaybackSessionId=" + mAudioPlaybackSessionId);
@@ -552,11 +570,11 @@
 
         private @LockState int mLockState = LOCK_STATE_DEFAULT;
         @NonNull private Set<UserHandle> mUsersWithMatchingAccounts = Collections.emptySet();
-        @NonNull private Set<ComponentName> mCrossTaskNavigationExceptions = Collections.emptySet();
+        @NonNull private Set<ComponentName> mCrossTaskNavigationExemptions = Collections.emptySet();
         @NavigationPolicy
         private int mDefaultNavigationPolicy = NAVIGATION_POLICY_DEFAULT_ALLOWED;
         private boolean mDefaultNavigationPolicyConfigured = false;
-        @NonNull private Set<ComponentName> mActivityPolicyExceptions = Collections.emptySet();
+        @NonNull private Set<ComponentName> mActivityPolicyExemptions = Collections.emptySet();
         @ActivityPolicy
         private int mDefaultActivityPolicy = ACTIVITY_POLICY_DEFAULT_ALLOWED;
         private boolean mDefaultActivityPolicyConfigured = false;
@@ -700,7 +718,7 @@
             }
             mDefaultNavigationPolicy = NAVIGATION_POLICY_DEFAULT_BLOCKED;
             mDefaultNavigationPolicyConfigured = true;
-            mCrossTaskNavigationExceptions = Objects.requireNonNull(allowedCrossTaskNavigations);
+            mCrossTaskNavigationExemptions = Objects.requireNonNull(allowedCrossTaskNavigations);
             return this;
         }
 
@@ -731,7 +749,7 @@
             }
             mDefaultNavigationPolicy = NAVIGATION_POLICY_DEFAULT_ALLOWED;
             mDefaultNavigationPolicyConfigured = true;
-            mCrossTaskNavigationExceptions = Objects.requireNonNull(blockedCrossTaskNavigations);
+            mCrossTaskNavigationExemptions = Objects.requireNonNull(blockedCrossTaskNavigations);
             return this;
         }
 
@@ -757,7 +775,7 @@
             }
             mDefaultActivityPolicy = ACTIVITY_POLICY_DEFAULT_BLOCKED;
             mDefaultActivityPolicyConfigured = true;
-            mActivityPolicyExceptions = Objects.requireNonNull(allowedActivities);
+            mActivityPolicyExemptions = Objects.requireNonNull(allowedActivities);
             return this;
         }
 
@@ -783,7 +801,7 @@
             }
             mDefaultActivityPolicy = ACTIVITY_POLICY_DEFAULT_ALLOWED;
             mDefaultActivityPolicyConfigured = true;
-            mActivityPolicyExceptions = Objects.requireNonNull(blockedActivities);
+            mActivityPolicyExemptions = Objects.requireNonNull(blockedActivities);
             return this;
         }
 
@@ -956,6 +974,35 @@
                         mVirtualSensorDirectChannelCallback);
             }
 
+            if (Flags.dynamicPolicy()) {
+                switch (mDevicePolicies.get(POLICY_TYPE_ACTIVITY, -1)) {
+                    case DEVICE_POLICY_DEFAULT:
+                        if (mDefaultActivityPolicyConfigured
+                                && mDefaultActivityPolicy == ACTIVITY_POLICY_DEFAULT_BLOCKED) {
+                            throw new IllegalArgumentException(
+                                    "DEVICE_POLICY_DEFAULT is explicitly configured for "
+                                            + "POLICY_TYPE_ACTIVITY, which is exclusive with "
+                                            + "setAllowedActivities.");
+                        }
+                        break;
+                    case DEVICE_POLICY_CUSTOM:
+                        if (mDefaultActivityPolicyConfigured
+                                && mDefaultActivityPolicy == ACTIVITY_POLICY_DEFAULT_ALLOWED) {
+                            throw new IllegalArgumentException(
+                                    "DEVICE_POLICY_CUSTOM is explicitly configured for "
+                                            + "POLICY_TYPE_ACTIVITY, which is exclusive with "
+                                            + "setBlockedActivities.");
+                        }
+                        break;
+                    default:
+                        if (mDefaultActivityPolicyConfigured
+                                && mDefaultActivityPolicy == ACTIVITY_POLICY_DEFAULT_BLOCKED) {
+                            mDevicePolicies.put(POLICY_TYPE_ACTIVITY, DEVICE_POLICY_CUSTOM);
+                        }
+                        break;
+                }
+            }
+
             if ((mAudioPlaybackSessionId != AUDIO_SESSION_ID_GENERATE
                     || mAudioRecordingSessionId != AUDIO_SESSION_ID_GENERATE)
                     && mDevicePolicies.get(POLICY_TYPE_AUDIO, DEVICE_POLICY_DEFAULT)
@@ -964,7 +1011,7 @@
                         + "required for configuration of device-specific audio session ids.");
             }
 
-            SparseArray<Set<String>> sensorNameByType = new SparseArray();
+            SparseArray<Set<String>> sensorNameByType = new SparseArray<>();
             for (int i = 0; i < mVirtualSensorConfigs.size(); ++i) {
                 VirtualSensorConfig config = mVirtualSensorConfigs.get(i);
                 Set<String> sensorNames = sensorNameByType.get(config.getType(), new ArraySet<>());
@@ -979,9 +1026,9 @@
                     mLockState,
                     mUsersWithMatchingAccounts,
                     mDefaultNavigationPolicy,
-                    mCrossTaskNavigationExceptions,
+                    mCrossTaskNavigationExemptions,
                     mDefaultActivityPolicy,
-                    mActivityPolicyExceptions,
+                    mActivityPolicyExemptions,
                     mName,
                     mDevicePolicies,
                     mVirtualSensorConfigs,
diff --git a/core/java/android/companion/virtual/flags.aconfig b/core/java/android/companion/virtual/flags.aconfig
index 3a3ab24..ee36f18 100644
--- a/core/java/android/companion/virtual/flags.aconfig
+++ b/core/java/android/companion/virtual/flags.aconfig
@@ -27,4 +27,3 @@
     description: "Enable Virtual Camera"
     bug: "270352264"
 }
-
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index f156878..e9bbed3 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -5274,7 +5274,7 @@
      * Broadcast Action: Sent to the responsible installer of an archived package when unarchival
      * is requested.
      *
-     * @see android.content.pm.PackageArchiver
+     * @see android.content.pm.PackageInstaller#requestUnarchive(String)
      * @hide
      */
     @SystemApi
diff --git a/core/java/android/content/pm/IPackageArchiverService.aidl b/core/java/android/content/pm/IPackageArchiverService.aidl
deleted file mode 100644
index dc6491d..0000000
--- a/core/java/android/content/pm/IPackageArchiverService.aidl
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.content.IntentSender;
-import android.os.UserHandle;
-
-/** {@hide} */
-interface IPackageArchiverService {
-
-    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES,android.Manifest.permission.REQUEST_DELETE_PACKAGES})")
-    void requestArchive(String packageName, String callerPackageName, in IntentSender statusReceiver, in UserHandle userHandle);
-
-    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES,android.Manifest.permission.REQUEST_INSTALL_PACKAGES})")
-    void requestUnarchive(String packageName, String callerPackageName, in UserHandle userHandle);
-}
\ No newline at end of file
diff --git a/core/java/android/content/pm/IPackageInstaller.aidl b/core/java/android/content/pm/IPackageInstaller.aidl
index ebe2aa3..edb07ce 100644
--- a/core/java/android/content/pm/IPackageInstaller.aidl
+++ b/core/java/android/content/pm/IPackageInstaller.aidl
@@ -24,6 +24,7 @@
 import android.content.pm.VersionedPackage;
 import android.content.IntentSender;
 import android.os.RemoteCallback;
+import android.os.UserHandle;
 
 import android.graphics.Bitmap;
 
@@ -75,4 +76,10 @@
     void waitForInstallConstraints(String installerPackageName, in List<String> packageNames,
             in PackageInstaller.InstallConstraints constraints, in IntentSender callback,
             long timeout);
+
+    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.DELETE_PACKAGES,android.Manifest.permission.REQUEST_DELETE_PACKAGES})")
+    void requestArchive(String packageName, String callerPackageName, in IntentSender statusReceiver, in UserHandle userHandle);
+
+    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(anyOf={android.Manifest.permission.INSTALL_PACKAGES,android.Manifest.permission.REQUEST_INSTALL_PACKAGES})")
+    void requestUnarchive(String packageName, String callerPackageName, in UserHandle userHandle);
 }
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 916c249..556c794 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -26,7 +26,6 @@
 import android.content.pm.ChangedPackages;
 import android.content.pm.InstantAppInfo;
 import android.content.pm.FeatureInfo;
-import android.content.pm.IPackageArchiverService;
 import android.content.pm.IDexModuleRegisterCallback;
 import android.content.pm.InstallSourceInfo;
 import android.content.pm.IOnChecksumsReadyListener;
@@ -652,8 +651,6 @@
     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
     IPackageInstaller getPackageInstaller();
 
-    IPackageArchiverService getPackageArchiverService();
-
     @EnforcePermission("DELETE_PACKAGES")
     boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId);
     @UnsupportedAppUsage
diff --git a/core/java/android/content/pm/PackageArchiver.java b/core/java/android/content/pm/PackageArchiver.java
deleted file mode 100644
index b065231..0000000
--- a/core/java/android/content/pm/PackageArchiver.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.Manifest;
-import android.annotation.NonNull;
-import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
-import android.content.Context;
-import android.content.IntentSender;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.ParcelableException;
-import android.os.RemoteException;
-
-/**
- * {@code ArchiveManager} is used to archive apps. During the archival process, the apps APKs and
- * cache are removed from the device while the user data is kept. Through the
- * {@code requestUnarchive()} call, apps can be restored again through their responsible app store.
- *
- * <p> Archived apps are returned as displayable apps through the {@link LauncherApps} APIs and
- * will be displayed to users with UI treatment to highlight that said apps are archived. If
- * a user taps on an archived app, the app will be unarchived and the restoration process is
- * communicated.
- *
- * @hide
- */
-// TODO(b/278560219) Improve public documentation.
-@SystemApi
-public class PackageArchiver {
-
-    /**
-     * Extra field for the package name of a package that is requested to be unarchived. Sent as
-     * part of the {@link android.content.Intent#ACTION_UNARCHIVE_PACKAGE} intent.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_UNARCHIVE_PACKAGE_NAME =
-            "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
-
-    /**
-     * If true, the requestor of the unarchival has specified that the app should be unarchived
-     * for {@link android.os.UserHandle#ALL}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_UNARCHIVE_ALL_USERS =
-            "android.content.pm.extra.UNARCHIVE_ALL_USERS";
-
-    private final Context mContext;
-    private final IPackageArchiverService mService;
-
-    /**
-     * @hide
-     */
-    public PackageArchiver(Context context, IPackageArchiverService service) {
-        mContext = context;
-        mService = service;
-    }
-
-    /**
-     * Requests to archive a package which is currently installed.
-     *
-     * @param statusReceiver Callback used to notify when the operation is completed.
-     * @throws NameNotFoundException If {@code packageName} isn't found or not available to the
-     *                               caller or isn't archived.
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            Manifest.permission.DELETE_PACKAGES,
-            Manifest.permission.REQUEST_DELETE_PACKAGES})
-    @SystemApi
-    public void requestArchive(@NonNull String packageName, @NonNull IntentSender statusReceiver)
-            throws NameNotFoundException {
-        try {
-            mService.requestArchive(packageName, mContext.getPackageName(), statusReceiver,
-                    mContext.getUser());
-        } catch (ParcelableException e) {
-            e.maybeRethrow(NameNotFoundException.class);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Requests to unarchive a currently archived package.
-     *
-     * <p> Sends a request to unarchive an app to the responsible installer. The installer is
-     * determined by {@link InstallSourceInfo#getUpdateOwnerPackageName()}, or
-     * {@link InstallSourceInfo#getInstallingPackageName()} if the former value is null.
-     *
-     * <p> The installation will happen asynchronously and can be observed through
-     * {@link android.content.Intent#ACTION_PACKAGE_ADDED}.
-     *
-     * @throws NameNotFoundException If {@code packageName} isn't found or not visible to the
-     *                               caller or if the package has no installer on the device
-     *                               anymore to unarchive it.
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            Manifest.permission.INSTALL_PACKAGES,
-            Manifest.permission.REQUEST_INSTALL_PACKAGES})
-    @SystemApi
-    public void requestUnarchive(@NonNull String packageName)
-            throws NameNotFoundException {
-        try {
-            mService.requestUnarchive(packageName, mContext.getPackageName(), mContext.getUser());
-        } catch (ParcelableException e) {
-            e.maybeRethrow(NameNotFoundException.class);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-}
diff --git a/core/java/android/content/pm/PackageInfo.java b/core/java/android/content/pm/PackageInfo.java
index cdb8b46..1fe1923 100644
--- a/core/java/android/content/pm/PackageInfo.java
+++ b/core/java/android/content/pm/PackageInfo.java
@@ -20,6 +20,7 @@
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.compat.annotation.UnsupportedAppUsage;
+import android.content.IntentSender;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -492,7 +493,8 @@
     /**
      * Whether the package is currently in an archived state.
      *
-     * <p>Packages can be archived through {@link PackageArchiver} and do not have any APKs stored
+     * <p>Packages can be archived through
+     * {@link PackageInstaller#requestArchive(String, IntentSender)} and do not have any APKs stored
      * on the device, but do keep the data directory.
      * @hide
      */
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index f417480..673a8a5 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -34,6 +34,7 @@
 import android.annotation.CallbackExecutor;
 import android.annotation.CurrentTimeMillisLong;
 import android.annotation.DurationMillisLong;
+import android.annotation.FlaggedApi;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -348,6 +349,28 @@
             "android.content.pm.extra.RESOLVED_BASE_PATH";
 
     /**
+     * Extra field for the package name of a package that is requested to be unarchived. Sent as
+     * part of the {@link android.content.Intent#ACTION_UNARCHIVE_PACKAGE} intent.
+     *
+     * @hide
+     */
+    @SystemApi
+    @FlaggedApi(Flags.FLAG_ARCHIVING)
+    public static final String EXTRA_UNARCHIVE_PACKAGE_NAME =
+            "android.content.pm.extra.UNARCHIVE_PACKAGE_NAME";
+
+    /**
+     * If true, the requestor of the unarchival has specified that the app should be unarchived
+     * for {@link android.os.UserHandle#ALL}.
+     *
+     * @hide
+     */
+    @SystemApi
+    @FlaggedApi(Flags.FLAG_ARCHIVING)
+    public static final String EXTRA_UNARCHIVE_ALL_USERS =
+            "android.content.pm.extra.UNARCHIVE_ALL_USERS";
+
+    /**
      * Streaming installation pending.
      * Caller should make sure DataLoader is able to prepare image and reinitiate the operation.
      *
@@ -1495,8 +1518,7 @@
          * This returns all names which have been previously written through
          * {@link #openWrite(String, long, long)} as part of this session.
          *
-         * @throws SecurityException if called after the session has been
-         *             committed or abandoned.
+         * @throws SecurityException if called after the session has been abandoned.
          */
         public @NonNull String[] getNames() throws IOException {
             try {
@@ -2158,6 +2180,72 @@
         return new InstallInfo(result);
     }
 
+    /**
+     * Requests to archive a package which is currently installed.
+     *
+     * <p> During the archival process, the apps APKs and cache are removed from the device while
+     * the user data is kept. Through the {@link #requestUnarchive(String)} call, apps can be
+     * restored again through their responsible installer.
+     *
+     * <p> Archived apps are returned as displayable apps through the {@link LauncherApps} APIs and
+     * will be displayed to users with UI treatment to highlight that said apps are archived. If
+     * a user taps on an archived app, the app will be unarchived and the restoration process is
+     * communicated.
+     *
+     * @param statusReceiver Callback used to notify when the operation is completed.
+     * @throws PackageManager.NameNotFoundException If {@code packageName} isn't found or not
+     *                                              available to the caller or isn't archived.
+     * @hide
+     */
+    @RequiresPermission(anyOf = {
+            Manifest.permission.DELETE_PACKAGES,
+            Manifest.permission.REQUEST_DELETE_PACKAGES})
+    @SystemApi
+    @FlaggedApi(Flags.FLAG_ARCHIVING)
+    public void requestArchive(@NonNull String packageName, @NonNull IntentSender statusReceiver)
+            throws PackageManager.NameNotFoundException {
+        try {
+            mInstaller.requestArchive(packageName, mInstallerPackageName, statusReceiver,
+                    new UserHandle(mUserId));
+        } catch (ParcelableException e) {
+            e.maybeRethrow(PackageManager.NameNotFoundException.class);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Requests to unarchive a currently archived package.
+     *
+     * <p> Sends a request to unarchive an app to the responsible installer. The installer is
+     * determined by {@link InstallSourceInfo#getUpdateOwnerPackageName()}, or
+     * {@link InstallSourceInfo#getInstallingPackageName()} if the former value is null.
+     *
+     * <p> The installation will happen asynchronously and can be observed through
+     * {@link android.content.Intent#ACTION_PACKAGE_ADDED}.
+     *
+     * @throws PackageManager.NameNotFoundException If {@code packageName} isn't found or not
+     *                                              visible to the caller or if the package has no
+     *                                              installer on the device anymore to unarchive it.
+     * @hide
+     */
+    @RequiresPermission(anyOf = {
+            Manifest.permission.INSTALL_PACKAGES,
+            Manifest.permission.REQUEST_INSTALL_PACKAGES})
+    @SystemApi
+    @FlaggedApi(Flags.FLAG_ARCHIVING)
+    public void requestUnarchive(@NonNull String packageName)
+            throws PackageManager.NameNotFoundException {
+        try {
+            mInstaller.requestUnarchive(packageName, mInstallerPackageName,
+                    new UserHandle(mUserId));
+        } catch (ParcelableException e) {
+            e.maybeRethrow(PackageManager.NameNotFoundException.class);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
     // (b/239722738) This class serves as a bridge between the PackageLite class, which
     // is a hidden class, and the consumers of this class. (e.g. InstallInstalling.java)
     // This is a part of an effort to remove dependency on hidden APIs and use SystemAPIs or
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 9a53a2a6..cdab431 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -20,6 +20,7 @@
 import android.annotation.CallbackExecutor;
 import android.annotation.CheckResult;
 import android.annotation.DrawableRes;
+import android.annotation.FlaggedApi;
 import android.annotation.IntDef;
 import android.annotation.IntRange;
 import android.annotation.LongDef;
@@ -29,6 +30,7 @@
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
 import android.annotation.StringRes;
+import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
 import android.annotation.TestApi;
 import android.annotation.UserIdInt;
@@ -1238,8 +1240,9 @@
 
     /**
      * Flag parameter to also retrieve some information about archived packages.
-     * Packages can be archived through {@link PackageArchiver} and do not have any APKs stored on
-     * the device, but do keep the data directory.
+     * Packages can be archived through
+     * {@link PackageInstaller#requestArchive(String, IntentSender)} and do not have any APKs stored
+     * on the device, but do keep the data directory.
      * <p> Note: Archived apps are a subset of apps returned by {@link #MATCH_UNINSTALLED_PACKAGES}.
      * <p> Note: this flag may cause less information about currently installed
      * applications to be returned.
@@ -1754,6 +1757,8 @@
      *
      * @hide
      */
+    @SystemApi
+    @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED)
     public static final int FLAG_SUSPEND_QUARANTINED = 0x00000001;
 
     /** @hide */
@@ -9751,7 +9756,10 @@
      *
      * @hide
      */
+    @SystemApi
+    @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED)
     @RequiresPermission(value=Manifest.permission.SUSPEND_APPS, conditional=true)
+    @SuppressLint("NullableCollection")
     @Nullable
     public String[] setPackagesSuspended(@Nullable String[] packageNames, boolean suspended,
             @Nullable PersistableBundle appExtras, @Nullable PersistableBundle launcherExtras,
@@ -9958,16 +9966,6 @@
     public abstract @NonNull PackageInstaller getPackageInstaller();
 
     /**
-     * {@link PackageArchiver} can be used to archive and restore archived packages.
-     *
-     * @hide
-     */
-    @SystemApi
-    public @NonNull PackageArchiver getPackageArchiver() {
-        throw new UnsupportedOperationException(
-                "getPackageArchiver not implemented in subclass");
-    }
-    /**
      * Adds a {@code CrossProfileIntentFilter}. After calling this method all
      * intents sent from the user with id sourceUserId can also be be resolved
      * by activities in the user with id targetUserId if they match the
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 41ba1dc..4b579e7 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1445,7 +1445,7 @@
                     verified.getPublicKeys(),
                     verified.getPastSigningCertificates());
         } else {
-            if (!Signature.areExactMatch(pkg.mSigningDetails.signatures,
+            if (!Signature.areExactArraysMatch(pkg.mSigningDetails.signatures,
                     verified.getSignatures())) {
                 throw new PackageParserException(
                         INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
@@ -6468,7 +6468,7 @@
                     }
                 }
             } else {
-                return Signature.areEffectiveMatch(oldDetails.signatures, signatures);
+                return Signature.areEffectiveArraysMatch(oldDetails.signatures, signatures);
             }
             return false;
         }
@@ -6616,7 +6616,7 @@
 
         /** Returns true if the signatures in this and other match exactly. */
         public boolean signaturesMatchExactly(SigningDetails other) {
-            return Signature.areExactMatch(this.signatures, other.signatures);
+            return Signature.areExactArraysMatch(this.signatures, other.signatures);
         }
 
         @Override
@@ -6668,7 +6668,7 @@
             SigningDetails that = (SigningDetails) o;
 
             if (signatureSchemeVersion != that.signatureSchemeVersion) return false;
-            if (!Signature.areExactMatch(signatures, that.signatures)) return false;
+            if (!Signature.areExactArraysMatch(signatures, that.signatures)) return false;
             if (publicKeys != null) {
                 if (!publicKeys.equals((that.publicKeys))) {
                     return false;
@@ -6677,7 +6677,8 @@
                 return false;
             }
 
-            // can't use Signature.areExactMatch() because order matters with the past signing certs
+            // can't use Signature.areExactArraysMatch() because order matters with the past
+            // signing certs
             if (!Arrays.equals(pastSigningCertificates, that.pastSigningCertificates)) {
                 return false;
             }
diff --git a/core/java/android/content/pm/Signature.java b/core/java/android/content/pm/Signature.java
index b049880..a69eee7 100644
--- a/core/java/android/content/pm/Signature.java
+++ b/core/java/android/content/pm/Signature.java
@@ -307,11 +307,27 @@
     }
 
     /**
-     * Test if given {@link Signature} sets are exactly equal.
-     *
+     * Test if given {@link SigningDetails} are exactly equal.
      * @hide
      */
-    public static boolean areExactMatch(Signature[] a, Signature[] b) {
+    public static boolean areExactMatch(SigningDetails ad, SigningDetails bd) {
+        return areExactArraysMatch(ad.getSignatures(), bd.getSignatures());
+    }
+
+    /**
+     * Test if given {@link SigningDetails} and {@link Signature} set are exactly equal.
+     * @hide
+     */
+    public static boolean areExactMatch(SigningDetails ad, Signature[] b) {
+        return areExactArraysMatch(ad.getSignatures(), b);
+    }
+
+
+    /**
+     * Test if given {@link Signature} sets are exactly equal.
+     * @hide
+     */
+    static boolean areExactArraysMatch(Signature[] a, Signature[] b) {
         return (ArrayUtils.size(a) == ArrayUtils.size(b)) && ArrayUtils.containsAll(a, b)
                 && ArrayUtils.containsAll(b, a);
     }
@@ -329,7 +345,12 @@
      *             substantially, usually a signal of something fishy going on.
      * @hide
      */
-    public static boolean areEffectiveMatch(Signature[] a, Signature[] b)
+    public static boolean areEffectiveMatch(SigningDetails a, SigningDetails b)
+            throws CertificateException {
+        return areEffectiveArraysMatch(a.getSignatures(), b.getSignatures());
+    }
+
+    static boolean areEffectiveArraysMatch(Signature[] a, Signature[] b)
             throws CertificateException {
         final CertificateFactory cf = CertificateFactory.getInstance("X.509");
 
@@ -342,7 +363,7 @@
             bPrime[i] = bounce(cf, b[i]);
         }
 
-        return areExactMatch(aPrime, bPrime);
+        return areExactArraysMatch(aPrime, bPrime);
     }
 
     /**
diff --git a/core/java/android/content/pm/SigningDetails.java b/core/java/android/content/pm/SigningDetails.java
index af2649f..8c21974 100644
--- a/core/java/android/content/pm/SigningDetails.java
+++ b/core/java/android/content/pm/SigningDetails.java
@@ -656,7 +656,7 @@
                 }
             }
         } else {
-            return Signature.areEffectiveMatch(oldDetails.mSignatures, mSignatures);
+            return Signature.areEffectiveMatch(oldDetails, this);
         }
         return false;
     }
@@ -800,7 +800,7 @@
 
     /** Returns true if the signatures in this and other match exactly. */
     public boolean signaturesMatchExactly(@NonNull SigningDetails other) {
-        return Signature.areExactMatch(mSignatures, other.mSignatures);
+        return Signature.areExactMatch(this, other);
     }
 
     @Override
@@ -853,7 +853,7 @@
         final SigningDetails that = (SigningDetails) o;
 
         if (mSignatureSchemeVersion != that.mSignatureSchemeVersion) return false;
-        if (!Signature.areExactMatch(mSignatures, that.mSignatures)) return false;
+        if (!Signature.areExactMatch(this, that)) return false;
         if (mPublicKeys != null) {
             if (!mPublicKeys.equals((that.mPublicKeys))) {
                 return false;
diff --git a/core/java/android/content/pm/flags.aconfig b/core/java/android/content/pm/flags.aconfig
new file mode 100644
index 0000000..0c8eb02
--- /dev/null
+++ b/core/java/android/content/pm/flags.aconfig
@@ -0,0 +1,15 @@
+package: "android.content.pm"
+
+flag {
+    name: "quarantined_enabled"
+    namespace: "package_manager_service"
+    description: "Feature flag for Quarantined state"
+    bug: "269127435"
+}
+
+flag {
+    name: "archiving"
+    namespace: "package_manager_service"
+    description: "Feature flag to enable the archiving feature."
+    bug: "278553670"
+}
diff --git a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
index 3e1c5bb..153dd9a 100644
--- a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
+++ b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
@@ -253,8 +253,8 @@
         if (existingSigningDetails == SigningDetails.UNKNOWN) {
             return verified;
         } else {
-            if (!Signature.areExactMatch(existingSigningDetails.getSignatures(),
-                    verified.getResult().getSignatures())) {
+            if (!Signature.areExactMatch(existingSigningDetails,
+                    verified.getResult())) {
                 return input.error(INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
                         baseCodePath + " has mismatched certificates");
             }
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 08ba5b6..f929c1f 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -100,7 +100,7 @@
      * The effective screen density we have selected for this application.
      */
     public final int applicationDensity;
-    
+
     /**
      * Application's scale.
      */
@@ -112,9 +112,27 @@
      */
     public final float applicationInvertedScale;
 
+    /**
+     * Application's density scale.
+     *
+     * <p>In most cases this is equal to {@link #applicationScale}, but in some cases e.g.
+     * Automotive the requirement is to just scale the density and keep the resolution the same.
+     * This is used for artificially making apps look zoomed in to compensate for the user distance
+     * from the screen.
+     */
+    public final float applicationDensityScale;
+
+    /**
+     * Application's density inverted scale.
+     */
+    public final float applicationDensityInvertedScale;
+
     /** The process level override inverted scale. See {@link #HAS_OVERRIDE_SCALING}. */
     private static float sOverrideInvertedScale = 1f;
 
+    /** The process level override inverted density scale. See {@link #HAS_OVERRIDE_SCALING}. */
+    private static float sOverrideDensityInvertScale = 1f;
+
     @UnsupportedAppUsage
     @Deprecated
     public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw,
@@ -123,17 +141,24 @@
     }
 
     public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw,
-            boolean forceCompat, float overrideScale) {
+            boolean forceCompat, float scaleFactor) {
+        this(appInfo, screenLayout, sw, forceCompat, scaleFactor, scaleFactor);
+    }
+
+    public CompatibilityInfo(ApplicationInfo appInfo, int screenLayout, int sw,
+            boolean forceCompat, float scaleFactor, float densityScaleFactor) {
         int compatFlags = 0;
 
         if (appInfo.targetSdkVersion < VERSION_CODES.O) {
             compatFlags |= NEEDS_COMPAT_RES;
         }
-        if (overrideScale != 1.0f) {
-            applicationScale = overrideScale;
-            applicationInvertedScale = 1.0f / overrideScale;
+        if (scaleFactor != 1f || densityScaleFactor != 1f) {
+            applicationScale = scaleFactor;
+            applicationInvertedScale = 1f / scaleFactor;
+            applicationDensityScale = densityScaleFactor;
+            applicationDensityInvertedScale = 1f / densityScaleFactor;
             applicationDensity = (int) ((DisplayMetrics.DENSITY_DEVICE_STABLE
-                    * applicationInvertedScale) + .5f);
+                    * applicationDensityInvertedScale) + .5f);
             mCompatibilityFlags = NEVER_NEEDS_COMPAT | HAS_OVERRIDE_SCALING;
             // Override scale has the highest priority. So ignore other compatibility attributes.
             return;
@@ -181,7 +206,8 @@
             applicationDensity = DisplayMetrics.DENSITY_DEVICE;
             applicationScale = 1.0f;
             applicationInvertedScale = 1.0f;
-
+            applicationDensityScale = 1.0f;
+            applicationDensityInvertedScale = 1.0f;
         } else {
             /**
              * Has the application said that its UI is expandable?  Based on the
@@ -271,11 +297,16 @@
                 applicationDensity = DisplayMetrics.DENSITY_DEVICE;
                 applicationScale = 1.0f;
                 applicationInvertedScale = 1.0f;
+                applicationDensityScale = 1.0f;
+                applicationDensityInvertedScale = 1.0f;
             } else {
                 applicationDensity = DisplayMetrics.DENSITY_DEFAULT;
                 applicationScale = DisplayMetrics.DENSITY_DEVICE
                         / (float) DisplayMetrics.DENSITY_DEFAULT;
                 applicationInvertedScale = 1.0f / applicationScale;
+                applicationDensityScale = DisplayMetrics.DENSITY_DEVICE
+                        / (float) DisplayMetrics.DENSITY_DEFAULT;
+                applicationDensityInvertedScale = 1f / applicationDensityScale;
                 compatFlags |= SCALING_REQUIRED;
             }
         }
@@ -289,6 +320,8 @@
         applicationDensity = dens;
         applicationScale = scale;
         applicationInvertedScale = invertedScale;
+        applicationDensityScale = (float) DisplayMetrics.DENSITY_DEVICE_STABLE / dens;
+        applicationDensityInvertedScale = 1f / applicationDensityScale;
     }
 
     @UnsupportedAppUsage
@@ -528,7 +561,8 @@
     /** Applies the compatibility adjustment to the display metrics. */
     public void applyDisplayMetricsIfNeeded(DisplayMetrics inoutDm, boolean applyToSize) {
         if (hasOverrideScale()) {
-            scaleDisplayMetrics(sOverrideInvertedScale, inoutDm, applyToSize);
+            scaleDisplayMetrics(sOverrideInvertedScale, sOverrideDensityInvertScale, inoutDm,
+                    applyToSize);
             return;
         }
         if (!equals(DEFAULT_COMPATIBILITY_INFO)) {
@@ -548,15 +582,17 @@
         }
 
         if (isScalingRequired()) {
-            scaleDisplayMetrics(applicationInvertedScale, inoutDm, true /* applyToSize */);
+            scaleDisplayMetrics(applicationInvertedScale, applicationDensityInvertedScale, inoutDm,
+                    true /* applyToSize */);
         }
     }
 
     /** Scales the density of the given display metrics. */
-    private static void scaleDisplayMetrics(float invertedRatio, DisplayMetrics inoutDm,
-            boolean applyToSize) {
-        inoutDm.density = inoutDm.noncompatDensity * invertedRatio;
-        inoutDm.densityDpi = (int) ((inoutDm.noncompatDensityDpi * invertedRatio) + .5f);
+    private static void scaleDisplayMetrics(float invertScale, float densityInvertScale,
+            DisplayMetrics inoutDm, boolean applyToSize) {
+        inoutDm.density = inoutDm.noncompatDensity * densityInvertScale;
+        inoutDm.densityDpi = (int) ((inoutDm.noncompatDensityDpi
+                * densityInvertScale) + .5f);
         // Note: since this is changing the scaledDensity, you might think we also need to change
         // inoutDm.fontScaleConverter to accurately calculate non-linear font scaling. But we're not
         // going to do that, for a couple of reasons (see b/265695259 for details):
@@ -570,12 +606,12 @@
         //    b. Sometime later by WindowManager in onResume or other windowing events. In this case
         //       the DisplayMetrics object is never used by the app/resources, so it's ok if
         //       fontScaleConverter is null because it's not being used to scale fonts anyway.
-        inoutDm.scaledDensity = inoutDm.noncompatScaledDensity * invertedRatio;
-        inoutDm.xdpi = inoutDm.noncompatXdpi * invertedRatio;
-        inoutDm.ydpi = inoutDm.noncompatYdpi * invertedRatio;
+        inoutDm.scaledDensity = inoutDm.noncompatScaledDensity * densityInvertScale;
+        inoutDm.xdpi = inoutDm.noncompatXdpi * densityInvertScale;
+        inoutDm.ydpi = inoutDm.noncompatYdpi * densityInvertScale;
         if (applyToSize) {
-            inoutDm.widthPixels = (int) (inoutDm.widthPixels * invertedRatio + 0.5f);
-            inoutDm.heightPixels = (int) (inoutDm.heightPixels * invertedRatio + 0.5f);
+            inoutDm.widthPixels = (int) (inoutDm.widthPixels * invertScale + 0.5f);
+            inoutDm.heightPixels = (int) (inoutDm.heightPixels * invertScale + 0.5f);
         }
     }
 
@@ -594,38 +630,55 @@
         }
         inoutConfig.densityDpi = displayDensity;
         if (isScalingRequired()) {
-            scaleConfiguration(applicationInvertedScale, inoutConfig);
+            scaleConfiguration(applicationInvertedScale, applicationDensityInvertedScale,
+                    inoutConfig);
         }
     }
 
     /** Scales the density and bounds of the given configuration. */
-    public static void scaleConfiguration(float invertedRatio, Configuration inoutConfig) {
-        inoutConfig.densityDpi = (int) ((inoutConfig.densityDpi * invertedRatio) + .5f);
-        inoutConfig.windowConfiguration.scale(invertedRatio);
+    public static void scaleConfiguration(float invertScale, Configuration inoutConfig) {
+        scaleConfiguration(invertScale, invertScale, inoutConfig);
+    }
+
+    /** Scales the density and bounds of the given configuration. */
+    public static void scaleConfiguration(float invertScale, float densityInvertScale,
+            Configuration inoutConfig) {
+        inoutConfig.densityDpi = (int) ((inoutConfig.densityDpi
+                * densityInvertScale) + .5f);
+        inoutConfig.windowConfiguration.scale(invertScale);
     }
 
     /** @see #sOverrideInvertedScale */
     public static void applyOverrideScaleIfNeeded(Configuration config) {
         if (!hasOverrideScale()) return;
-        scaleConfiguration(sOverrideInvertedScale, config);
+        scaleConfiguration(sOverrideInvertedScale, sOverrideDensityInvertScale, config);
     }
 
     /** @see #sOverrideInvertedScale */
     public static void applyOverrideScaleIfNeeded(MergedConfiguration mergedConfig) {
         if (!hasOverrideScale()) return;
-        scaleConfiguration(sOverrideInvertedScale, mergedConfig.getGlobalConfiguration());
-        scaleConfiguration(sOverrideInvertedScale, mergedConfig.getOverrideConfiguration());
-        scaleConfiguration(sOverrideInvertedScale, mergedConfig.getMergedConfiguration());
+        scaleConfiguration(sOverrideInvertedScale, sOverrideDensityInvertScale,
+                mergedConfig.getGlobalConfiguration());
+        scaleConfiguration(sOverrideInvertedScale, sOverrideDensityInvertScale,
+                mergedConfig.getOverrideConfiguration());
+        scaleConfiguration(sOverrideInvertedScale, sOverrideDensityInvertScale,
+                mergedConfig.getMergedConfiguration());
     }
 
     /** Returns {@code true} if this process is in a environment with override scale. */
     private static boolean hasOverrideScale() {
-        return sOverrideInvertedScale != 1f;
+        return sOverrideInvertedScale != 1f || sOverrideDensityInvertScale != 1f;
     }
 
     /** @see #sOverrideInvertedScale */
-    public static void setOverrideInvertedScale(float invertedRatio) {
-        sOverrideInvertedScale = invertedRatio;
+    public static void setOverrideInvertedScale(float invertScale) {
+        setOverrideInvertedScale(invertScale, invertScale);
+    }
+
+    /** @see #sOverrideInvertedScale */
+    public static void setOverrideInvertedScale(float invertScale, float densityInvertScale) {
+        sOverrideInvertedScale = invertScale;
+        sOverrideDensityInvertScale = densityInvertScale;
     }
 
     /** @see #sOverrideInvertedScale */
@@ -633,6 +686,11 @@
         return sOverrideInvertedScale;
     }
 
+    /** @see #sOverrideDensityInvertScale */
+    public static float getOverrideDensityInvertedScale() {
+        return sOverrideDensityInvertScale;
+    }
+
     /**
      * Compute the frame Rect for applications runs under compatibility mode.
      *
@@ -693,6 +751,8 @@
             if (applicationDensity != oc.applicationDensity) return false;
             if (applicationScale != oc.applicationScale) return false;
             if (applicationInvertedScale != oc.applicationInvertedScale) return false;
+            if (applicationDensityScale != oc.applicationDensityScale) return false;
+            if (applicationDensityInvertedScale != oc.applicationDensityInvertedScale) return false;
             return true;
         } catch (ClassCastException e) {
             return false;
@@ -713,6 +773,8 @@
         if (hasOverrideScaling()) {
             sb.append(" overrideInvScale=");
             sb.append(applicationInvertedScale);
+            sb.append(" overrideDensityInvScale=");
+            sb.append(applicationDensityInvertedScale);
         }
         if (!supportsScreen()) {
             sb.append(" resizing");
@@ -734,6 +796,8 @@
         result = 31 * result + applicationDensity;
         result = 31 * result + Float.floatToIntBits(applicationScale);
         result = 31 * result + Float.floatToIntBits(applicationInvertedScale);
+        result = 31 * result + Float.floatToIntBits(applicationDensityScale);
+        result = 31 * result + Float.floatToIntBits(applicationDensityInvertedScale);
         return result;
     }
 
@@ -748,6 +812,8 @@
         dest.writeInt(applicationDensity);
         dest.writeFloat(applicationScale);
         dest.writeFloat(applicationInvertedScale);
+        dest.writeFloat(applicationDensityScale);
+        dest.writeFloat(applicationDensityInvertedScale);
     }
 
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
@@ -769,5 +835,61 @@
         applicationDensity = source.readInt();
         applicationScale = source.readFloat();
         applicationInvertedScale = source.readFloat();
+        applicationDensityScale = source.readFloat();
+        applicationDensityInvertedScale = source.readFloat();
+    }
+
+    /**
+     * A data class for holding scale factor for width, height, and density.
+     */
+    public static final class CompatScale {
+
+        public final float mScaleFactor;
+        public final float mDensityScaleFactor;
+
+        public CompatScale(float scaleFactor) {
+            this(scaleFactor, scaleFactor);
+        }
+
+        public CompatScale(float scaleFactor, float densityScaleFactor) {
+            mScaleFactor = scaleFactor;
+            mDensityScaleFactor = densityScaleFactor;
+        }
+
+        @Override
+        public boolean equals(@Nullable Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof CompatScale)) {
+                return false;
+            }
+            try {
+                CompatScale oc = (CompatScale) o;
+                if (mScaleFactor != oc.mScaleFactor) return false;
+                if (mDensityScaleFactor != oc.mDensityScaleFactor) return false;
+                return true;
+            } catch (ClassCastException e) {
+                return false;
+            }
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder(128);
+            sb.append("mScaleFactor= ");
+            sb.append(mScaleFactor);
+            sb.append(" mDensityScaleFactor= ");
+            sb.append(mDensityScaleFactor);
+            return sb.toString();
+        }
+
+        @Override
+        public int hashCode() {
+            int result = 17;
+            result = 31 * result + Float.floatToIntBits(mScaleFactor);
+            result = 31 * result + Float.floatToIntBits(mDensityScaleFactor);
+            return result;
+        }
     }
 }
diff --git a/core/java/android/database/DatabaseUtils.java b/core/java/android/database/DatabaseUtils.java
index d41df4f..7b874cc 100644
--- a/core/java/android/database/DatabaseUtils.java
+++ b/core/java/android/database/DatabaseUtils.java
@@ -77,6 +77,16 @@
     /** One of the values returned by {@link #getSqlStatementType(String)}. */
     public static final int STATEMENT_OTHER = 99;
 
+    // The following statement types are "extended" and are for internal use only.  These types
+    // are not public and are never returned by {@link #getSqlStatementType(String)}.
+
+    /** An internal statement type @hide **/
+    public static final int STATEMENT_WITH = 100;
+    /** An internal statement type @hide **/
+    public static final int STATEMENT_CREATE = 101;
+    /** An internal statement type denoting a comment. @hide **/
+    public static final int STATEMENT_COMMENT = 102;
+
     /**
      * Special function for writing an exception result at the header of
      * a parcel, to be used when returning an exception from a transaction.
@@ -1564,6 +1574,79 @@
     }
 
     /**
+     * The legacy prefix matcher.
+     */
+    private static String getSqlStatementPrefixSimple(@NonNull String sql) {
+        sql = sql.trim();
+        if (sql.length() < 3) {
+            return null;
+        }
+        return sql.substring(0, 3).toUpperCase(Locale.ROOT);
+    }
+
+    /**
+     * Return the extended statement type for the SQL statement.  This is not a public API and it
+     * can return values that are not publicly visible.
+     * @hide
+     */
+    private static int categorizeStatement(@NonNull String prefix, @NonNull String sql) {
+        if (prefix == null) return STATEMENT_OTHER;
+
+        switch (prefix) {
+            case "SEL": return STATEMENT_SELECT;
+            case "INS":
+            case "UPD":
+            case "REP":
+            case "DEL": return STATEMENT_UPDATE;
+            case "ATT": return STATEMENT_ATTACH;
+            case "COM":
+            case "END": return STATEMENT_COMMIT;
+            case "ROL":
+                if (sql.toUpperCase(Locale.ROOT).contains(" TO ")) {
+                    // Rollback to savepoint.
+                    return STATEMENT_OTHER;
+                }
+                return STATEMENT_ABORT;
+            case "BEG": return STATEMENT_BEGIN;
+            case "PRA": return STATEMENT_PRAGMA;
+            case "CRE": return STATEMENT_CREATE;
+            case "DRO":
+            case "ALT": return STATEMENT_DDL;
+            case "ANA":
+            case "DET": return STATEMENT_UNPREPARED;
+            case "WIT": return STATEMENT_WITH;
+            default:
+                if (prefix.startsWith("--") || prefix.startsWith("/*")) {
+                    return STATEMENT_COMMENT;
+                }
+                return STATEMENT_OTHER;
+        }
+    }
+
+    /**
+     * Return the extended statement type for the SQL statement.  This is not a public API and it
+     * can return values that are not publicly visible.
+     * @hide
+     */
+    public static int getSqlStatementTypeExtended(@NonNull String sql) {
+        int type = categorizeStatement(getSqlStatementPrefixSimple(sql), sql);
+        return type;
+    }
+
+    /**
+     * Convert an extended statement type to a public SQL statement type value.
+     * @hide
+     */
+    public static int getSqlStatementType(int extended) {
+        switch (extended) {
+            case STATEMENT_CREATE: return STATEMENT_DDL;
+            case STATEMENT_WITH: return STATEMENT_OTHER;
+            case STATEMENT_COMMENT: return STATEMENT_OTHER;
+        }
+        return extended;
+    }
+
+    /**
      * Returns one of the following which represent the type of the given SQL statement.
      * <ol>
      *   <li>{@link #STATEMENT_SELECT}</li>
@@ -1572,49 +1655,16 @@
      *   <li>{@link #STATEMENT_BEGIN}</li>
      *   <li>{@link #STATEMENT_COMMIT}</li>
      *   <li>{@link #STATEMENT_ABORT}</li>
+     *   <li>{@link #STATEMENT_PRAGMA}</li>
+     *   <li>{@link #STATEMENT_DDL}</li>
+     *   <li>{@link #STATEMENT_UNPREPARED}</li>
      *   <li>{@link #STATEMENT_OTHER}</li>
      * </ol>
      * @param sql the SQL statement whose type is returned by this method
      * @return one of the values listed above
      */
     public static int getSqlStatementType(String sql) {
-        sql = sql.trim();
-        if (sql.length() < 3) {
-            return STATEMENT_OTHER;
-        }
-        String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT);
-        if (prefixSql.equals("SEL")) {
-            return STATEMENT_SELECT;
-        } else if (prefixSql.equals("INS") ||
-                prefixSql.equals("UPD") ||
-                prefixSql.equals("REP") ||
-                prefixSql.equals("DEL")) {
-            return STATEMENT_UPDATE;
-        } else if (prefixSql.equals("ATT")) {
-            return STATEMENT_ATTACH;
-        } else if (prefixSql.equals("COM")) {
-            return STATEMENT_COMMIT;
-        } else if (prefixSql.equals("END")) {
-            return STATEMENT_COMMIT;
-        } else if (prefixSql.equals("ROL")) {
-            boolean isRollbackToSavepoint = sql.toUpperCase(Locale.ROOT).contains(" TO ");
-            if (isRollbackToSavepoint) {
-                Log.w(TAG, "Statement '" + sql
-                        + "' may not work on API levels 16-27, use ';" + sql + "' instead");
-                return STATEMENT_OTHER;
-            }
-            return STATEMENT_ABORT;
-        } else if (prefixSql.equals("BEG")) {
-            return STATEMENT_BEGIN;
-        } else if (prefixSql.equals("PRA")) {
-            return STATEMENT_PRAGMA;
-        } else if (prefixSql.equals("CRE") || prefixSql.equals("DRO") ||
-                prefixSql.equals("ALT")) {
-            return STATEMENT_DDL;
-        } else if (prefixSql.equals("ANA") || prefixSql.equals("DET")) {
-            return STATEMENT_UNPREPARED;
-        }
-        return STATEMENT_OTHER;
+        return getSqlStatementType(getSqlStatementTypeExtended(sql));
     }
 
     /**
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index f2980f4..b96d832 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -1096,7 +1096,7 @@
         seqNum = mPreparedStatementCache.getLastSeqNum();
         try {
             final int numParameters = nativeGetParameterCount(mConnectionPtr, statementPtr);
-            final int type = DatabaseUtils.getSqlStatementType(sql);
+            final int type = DatabaseUtils.getSqlStatementTypeExtended(sql);
             final boolean readOnly = nativeIsReadOnly(mConnectionPtr, statementPtr);
             statement = obtainPreparedStatement(sql, statementPtr, numParameters, type, readOnly,
                     seqNum);
@@ -1279,7 +1279,8 @@
 
     private static boolean isCacheable(int statementType) {
         if (statementType == DatabaseUtils.STATEMENT_UPDATE
-                || statementType == DatabaseUtils.STATEMENT_SELECT) {
+            || statementType == DatabaseUtils.STATEMENT_SELECT
+            || statementType == DatabaseUtils.STATEMENT_WITH) {
             return true;
         }
         return false;
diff --git a/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl b/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
index addd622..17cd18c 100644
--- a/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
+++ b/core/java/android/hardware/biometrics/IBiometricAuthenticator.aidl
@@ -48,7 +48,8 @@
     // startPreparedClient().
     void prepareForAuthentication(boolean requireConfirmation, IBinder token, long operationId,
             int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
-            long requestId, int cookie, boolean allowBackgroundAuthentication);
+            long requestId, int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager);
 
     // Starts authentication with the previously prepared client.
     void startPreparedClient(int cookie);
diff --git a/core/java/android/hardware/fingerprint/IFingerprintService.aidl b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
index e2840ec..0100660 100644
--- a/core/java/android/hardware/fingerprint/IFingerprintService.aidl
+++ b/core/java/android/hardware/fingerprint/IFingerprintService.aidl
@@ -74,7 +74,8 @@
     @EnforcePermission("MANAGE_BIOMETRIC")
     void prepareForAuthentication(IBinder token, long operationId,
             IBiometricSensorReceiver sensorReceiver, in FingerprintAuthenticateOptions options, long requestId,
-            int cookie, boolean allowBackgroundAuthentication);
+            int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager);
 
     // Starts authentication with the previously prepared client.
     @EnforcePermission("MANAGE_BIOMETRIC")
diff --git a/core/java/android/hardware/radio/ProgramList.java b/core/java/android/hardware/radio/ProgramList.java
index b2dfd85..4f07acf 100644
--- a/core/java/android/hardware/radio/ProgramList.java
+++ b/core/java/android/hardware/radio/ProgramList.java
@@ -23,6 +23,7 @@
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 
 import com.android.internal.annotations.GuardedBy;
 
@@ -34,7 +35,6 @@
 import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.Executor;
-import java.util.stream.Collectors;
 
 /**
  * @hide
@@ -45,8 +45,8 @@
     private final Object mLock = new Object();
 
     @GuardedBy("mLock")
-    private final Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> mPrograms =
-            new ArrayMap<>();
+    private final Map<ProgramSelector.Identifier, Map<UniqueProgramIdentifier,
+            RadioManager.ProgramInfo>> mPrograms = new ArrayMap<>();
 
     @GuardedBy("mLock")
     private final List<ListCallback> mListCallbacks = new ArrayList<>();
@@ -193,7 +193,7 @@
 
     void apply(Chunk chunk) {
         List<ProgramSelector.Identifier> removedList = new ArrayList<>();
-        List<ProgramSelector.Identifier> changedList = new ArrayList<>();
+        Set<ProgramSelector.Identifier> changedSet = new ArraySet<>();
         List<ProgramList.ListCallback> listCallbacksCopied;
         List<OnCompleteListener> onCompleteListenersCopied = new ArrayList<>();
         synchronized (mLock) {
@@ -203,19 +203,27 @@
             listCallbacksCopied = new ArrayList<>(mListCallbacks);
 
             if (chunk.isPurge()) {
-                Iterator<Map.Entry<ProgramSelector.Identifier, RadioManager.ProgramInfo>>
-                        programsIterator = mPrograms.entrySet().iterator();
+                Iterator<Map.Entry<ProgramSelector.Identifier, Map<UniqueProgramIdentifier,
+                        RadioManager.ProgramInfo>>> programsIterator =
+                        mPrograms.entrySet().iterator();
                 while (programsIterator.hasNext()) {
-                    RadioManager.ProgramInfo removed = programsIterator.next().getValue();
-                    if (removed != null) {
-                        removedList.add(removed.getSelector().getPrimaryId());
+                    Map.Entry<ProgramSelector.Identifier, Map<UniqueProgramIdentifier,
+                            RadioManager.ProgramInfo>> removed = programsIterator.next();
+                    if (removed.getValue() != null) {
+                        removedList.add(removed.getKey());
                     }
                     programsIterator.remove();
                 }
             }
 
-            chunk.getRemoved().stream().forEach(id -> removeLocked(id, removedList));
-            chunk.getModified().stream().forEach(info -> putLocked(info, changedList));
+            Iterator<UniqueProgramIdentifier> removedIterator = chunk.getRemoved().iterator();
+            while (removedIterator.hasNext()) {
+                removeLocked(removedIterator.next(), removedList);
+            }
+            Iterator<RadioManager.ProgramInfo> modifiedIterator = chunk.getModified().iterator();
+            while (modifiedIterator.hasNext()) {
+                putLocked(modifiedIterator.next(), changedSet);
+            }
 
             if (chunk.isComplete()) {
                 mIsComplete = true;
@@ -228,9 +236,11 @@
                 listCallbacksCopied.get(cbIndex).onItemRemoved(removedList.get(i));
             }
         }
-        for (int i = 0; i < changedList.size(); i++) {
+        Iterator<ProgramSelector.Identifier> changedIterator = changedSet.iterator();
+        while (changedIterator.hasNext()) {
+            ProgramSelector.Identifier changedId = changedIterator.next();
             for (int cbIndex = 0; cbIndex < listCallbacksCopied.size(); cbIndex++) {
-                listCallbacksCopied.get(cbIndex).onItemChanged(changedList.get(i));
+                listCallbacksCopied.get(cbIndex).onItemChanged(changedId);
             }
         }
         if (chunk.isComplete()) {
@@ -242,20 +252,31 @@
 
     @GuardedBy("mLock")
     private void putLocked(RadioManager.ProgramInfo value,
-            List<ProgramSelector.Identifier> changedIdentifierList) {
-        ProgramSelector.Identifier key = value.getSelector().getPrimaryId();
-        mPrograms.put(Objects.requireNonNull(key), value);
-        ProgramSelector.Identifier sel = value.getSelector().getPrimaryId();
-        changedIdentifierList.add(sel);
+            Set<ProgramSelector.Identifier> changedIdentifierSet) {
+        UniqueProgramIdentifier key = new UniqueProgramIdentifier(
+                value.getSelector());
+        ProgramSelector.Identifier primaryKey = Objects.requireNonNull(key.getPrimaryId());
+        if (!mPrograms.containsKey(primaryKey)) {
+            mPrograms.put(primaryKey, new ArrayMap<>());
+        }
+        mPrograms.get(primaryKey).put(key, value);
+        changedIdentifierSet.add(primaryKey);
     }
 
     @GuardedBy("mLock")
-    private void removeLocked(ProgramSelector.Identifier key,
+    private void removeLocked(UniqueProgramIdentifier key,
             List<ProgramSelector.Identifier> removedIdentifierList) {
-        RadioManager.ProgramInfo removed = mPrograms.remove(Objects.requireNonNull(key));
+        ProgramSelector.Identifier primaryKey = Objects.requireNonNull(key.getPrimaryId());
+        if (!mPrograms.containsKey(primaryKey)) {
+            return;
+        }
+        Map<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries = mPrograms
+                .get(primaryKey);
+        RadioManager.ProgramInfo removed = entries.remove(Objects.requireNonNull(key));
         if (removed == null) return;
-        ProgramSelector.Identifier sel = removed.getSelector().getPrimaryId();
-        removedIdentifierList.add(sel);
+        if (entries.size() == 0) {
+            removedIdentifierList.add(primaryKey);
+        }
     }
 
     /**
@@ -264,9 +285,20 @@
      * @return the new List<> object; it won't receive any further updates
      */
     public @NonNull List<RadioManager.ProgramInfo> toList() {
+        List<RadioManager.ProgramInfo> list = new ArrayList<>();
         synchronized (mLock) {
-            return mPrograms.values().stream().collect(Collectors.toList());
+            Iterator<Map.Entry<ProgramSelector.Identifier, Map<UniqueProgramIdentifier,
+                    RadioManager.ProgramInfo>>> listIterator = mPrograms.entrySet().iterator();
+            while (listIterator.hasNext()) {
+                Iterator<Map.Entry<UniqueProgramIdentifier,
+                        RadioManager.ProgramInfo>> prorgramsIterator = listIterator.next()
+                        .getValue().entrySet().iterator();
+                while (prorgramsIterator.hasNext()) {
+                    list.add(prorgramsIterator.next().getValue());
+                }
+            }
         }
+        return list;
     }
 
     /**
@@ -276,9 +308,15 @@
      * @return the program info, or null if there is no such program on the list
      */
     public @Nullable RadioManager.ProgramInfo get(@NonNull ProgramSelector.Identifier id) {
+        Map<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries;
         synchronized (mLock) {
-            return mPrograms.get(Objects.requireNonNull(id));
+            entries = mPrograms.get(Objects.requireNonNull(id,
+                    "Primary identifier can not be null"));
         }
+        if (entries == null) {
+            return null;
+        }
+        return entries.entrySet().iterator().next().getValue();
     }
 
     /**
@@ -404,7 +442,7 @@
          * Checks, if non-tunable entries that define tree structure on the
          * program list (i.e. DAB ensembles) should be included.
          *
-         * @see {@link ProgramSelector.Identifier#isCategory()}
+         * @see ProgramSelector.Identifier#isCategoryType()
          */
         public boolean areCategoriesIncluded() {
             return mIncludeCategories;
@@ -459,11 +497,11 @@
         private final boolean mPurge;
         private final boolean mComplete;
         private final @NonNull Set<RadioManager.ProgramInfo> mModified;
-        private final @NonNull Set<ProgramSelector.Identifier> mRemoved;
+        private final @NonNull Set<UniqueProgramIdentifier> mRemoved;
 
         public Chunk(boolean purge, boolean complete,
                 @Nullable Set<RadioManager.ProgramInfo> modified,
-                @Nullable Set<ProgramSelector.Identifier> removed) {
+                @Nullable Set<UniqueProgramIdentifier> removed) {
             mPurge = purge;
             mComplete = complete;
             mModified = (modified != null) ? modified : Collections.emptySet();
@@ -474,7 +512,7 @@
             mPurge = in.readByte() != 0;
             mComplete = in.readByte() != 0;
             mModified = Utils.createSet(in, RadioManager.ProgramInfo.CREATOR);
-            mRemoved = Utils.createSet(in, ProgramSelector.Identifier.CREATOR);
+            mRemoved = Utils.createSet(in, UniqueProgramIdentifier.CREATOR);
         }
 
         @Override
@@ -512,7 +550,7 @@
             return mModified;
         }
 
-        public @NonNull Set<ProgramSelector.Identifier> getRemoved() {
+        public @NonNull Set<UniqueProgramIdentifier> getRemoved() {
             return mRemoved;
         }
 
diff --git a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
index 9da2f4c..36c4a2a 100644
--- a/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
+++ b/core/java/android/hardware/usb/DisplayPortAltModeInfo.java
@@ -200,19 +200,43 @@
         dest.writeInt(mLinkTrainingStatus);
     }
 
+    private String displayPortAltModeStatusToString(@DisplayPortAltModeStatus int status) {
+        switch (status) {
+            case DISPLAYPORT_ALT_MODE_STATUS_NOT_CAPABLE:
+                return "not capable";
+            case DISPLAYPORT_ALT_MODE_STATUS_CAPABLE_DISABLED:
+                return "capable disabled";
+            case DISPLAYPORT_ALT_MODE_STATUS_ENABLED:
+                return "enabled";
+            default:
+                return "unknown";
+        }
+    }
+
+    private String linkTrainingStatusToString(@LinkTrainingStatus int status) {
+        switch (status) {
+            case LINK_TRAINING_STATUS_SUCCESS:
+                return "success";
+            case LINK_TRAINING_STATUS_FAILURE:
+                return "failure";
+            default:
+                return "unknown";
+        }
+    }
+
     @NonNull
     @Override
     public String toString() {
         return "DisplayPortAltModeInfo{partnerSink="
-                + mPartnerSinkStatus
-                + " cable="
-                + mCableStatus
-                + " numLanes="
+                + displayPortAltModeStatusToString(mPartnerSinkStatus)
+                + ", cable="
+                + displayPortAltModeStatusToString(mCableStatus)
+                + ", numLanes="
                 + mNumLanes
-                + " hotPlugDetect="
+                + ", hotPlugDetect="
                 + mHotPlugDetect
-                + " linkTrainingStatus="
-                + mLinkTrainingStatus
+                + ", linkTrainingStatus="
+                + linkTrainingStatusToString(mLinkTrainingStatus)
                 + "}";
     }
 
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index f1ae9be..582c5c0 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -4139,13 +4139,13 @@
         p.println("  mExtractedToken=" + mExtractedToken);
         p.println("  mIsInputViewShown=" + mIsInputViewShown
                 + " mStatusIcon=" + mStatusIcon);
-        p.println("Last computed insets:");
-        p.println("  contentTopInsets=" + mTmpInsets.contentTopInsets
+        p.println("  Last computed insets:");
+        p.println("    contentTopInsets=" + mTmpInsets.contentTopInsets
                 + " visibleTopInsets=" + mTmpInsets.visibleTopInsets
                 + " touchableInsets=" + mTmpInsets.touchableInsets
                 + " touchableRegion=" + mTmpInsets.touchableRegion);
-        p.println(" mSettingsObserver=" + mSettingsObserver);
-        p.println(" mNavigationBarController=" + mNavigationBarController.toDebugString());
+        p.println("  mSettingsObserver=" + mSettingsObserver);
+        p.println("  mNavigationBarController=" + mNavigationBarController.toDebugString());
     }
 
     private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() {
diff --git a/core/java/android/inputmethodservice/SoftInputWindow.java b/core/java/android/inputmethodservice/SoftInputWindow.java
index e4a09a6..7f6ec58 100644
--- a/core/java/android/inputmethodservice/SoftInputWindow.java
+++ b/core/java/android/inputmethodservice/SoftInputWindow.java
@@ -176,7 +176,8 @@
                 try {
                     super.show();
                     updateWindowState(WindowState.SHOWN_AT_LEAST_ONCE);
-                } catch (WindowManager.BadTokenException e) {
+                } catch (WindowManager.BadTokenException
+                         | WindowManager.InvalidDisplayException e) {
                     // Just ignore this exception.  Since show() can be requested from other
                     // components such as the system and there could be multiple event queues before
                     // the request finally arrives here, the system may have already invalidated the
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index 1929a4d..ada5532 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -227,7 +227,7 @@
                 Log.v(Binder.TAG, "BinderProxy map growth! bucket size = " + size
                         + " total = " + totalSize);
                 mWarnBucketSize += WARN_INCREMENT;
-                if (Build.IS_DEBUGGABLE && totalSize >= CRASH_AT_SIZE) {
+                if (totalSize >= CRASH_AT_SIZE) {
                     // Use the number of uncleared entries to determine whether we should
                     // really report a histogram and crash. We don't want to fundamentally
                     // change behavior for a debuggable process, so we GC only if we are
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index b210c46..e96c24d 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -245,7 +245,7 @@
     public static boolean isDeclared(@NonNull String name) {
         try {
             return getIServiceManager().isDeclared(name);
-        } catch (RemoteException e) {
+        } catch (RemoteException | SecurityException e) {
             Log.e(TAG, "error in isDeclared", e);
             return false;
         }
diff --git a/core/java/android/os/flags.aconfig b/core/java/android/os/flags.aconfig
index 851aa6d..febe6f7 100644
--- a/core/java/android/os/flags.aconfig
+++ b/core/java/android/os/flags.aconfig
@@ -6,3 +6,17 @@
     description: "Guards a new UserManager user restriction that admins can use to require cellular encryption on their managed devices."
     bug: "276752881"
 }
+
+flag {
+    name: "remove_app_profiler_pss_collection"
+    namespace: "android_platform_power_optimization"
+    description: "Replaces background PSS collection in AppProfiler with RSS"
+    bug: "297542292"
+}
+
+flag {
+    name: "allow_private_profile"
+    namespace: "private_profile"
+    description: "Guards a new Private Profile type in UserManager - everything from its setup to config to deletion."
+    bug: "299069460"
+}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index b962d76..7e71134f 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -10664,6 +10664,14 @@
                 "search_press_hold_nav_handle_enabled";
 
         /**
+         * Whether long-pressing on the home button can trigger search.
+         *
+         * @hide
+         */
+        public static final String SEARCH_LONG_PRESS_HOME_ENABLED =
+                "search_long_press_home_enabled";
+
+        /**
          * Control whether Night display is currently activated.
          * @hide
          */
diff --git a/core/java/android/security/TEST_MAPPING b/core/java/android/security/TEST_MAPPING
new file mode 100644
index 0000000..7e43381
--- /dev/null
+++ b/core/java/android/security/TEST_MAPPING
@@ -0,0 +1,16 @@
+{
+    "postsubmit": [
+        {
+            "name": "CtsSecurityTestCases",
+            "options": [
+                {
+                    "include-filter": "android.security.cts.FileIntegrityManagerTest"
+                }
+            ],
+            "file_patterns": [
+                "FileIntegrityManager\\.java",
+                "IFileIntegrityService\\.aidl"
+            ]
+        }
+    ]
+}
diff --git a/core/java/android/security/flags.aconfig b/core/java/android/security/flags.aconfig
index b27dac2..cfc6f48 100644
--- a/core/java/android/security/flags.aconfig
+++ b/core/java/android/security/flags.aconfig
@@ -6,3 +6,17 @@
     description: "Feature flag for fs-verity API"
     bug: "285185747"
 }
+
+flag {
+    name: "fix_unlocked_device_required_keys"
+    namespace: "hardware_backed_security"
+    description: "Fix bugs in behavior of UnlockedDeviceRequired keystore keys"
+    bug: "296464083"
+}
+
+flag {
+    name: "deprecate_fsv_sig"
+    namespace: "hardware_backed_security"
+    description: "Feature flag for deprecating .fsv_sig"
+    bug: "277916185"
+}
diff --git a/core/java/android/service/voice/HotwordTrainingAudio.java b/core/java/android/service/voice/HotwordTrainingAudio.java
index 895b0c0..91e34dc 100644
--- a/core/java/android/service/voice/HotwordTrainingAudio.java
+++ b/core/java/android/service/voice/HotwordTrainingAudio.java
@@ -18,6 +18,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
 import android.media.AudioFormat;
 import android.os.Parcel;
@@ -25,6 +26,8 @@
 
 import com.android.internal.util.DataClass;
 
+import java.util.Objects;
+
 /**
  * Represents audio supporting hotword model training.
  *
@@ -43,7 +46,10 @@
     /** Represents unset value for the hotword offset. */
     public static final int HOTWORD_OFFSET_UNSET = -1;
 
-    /** Buffer of hotword audio data for training models. */
+    /**
+     * Buffer of hotword audio data for training models. The data format is expected to match
+     * {@link #getAudioFormat()}.
+     */
     @NonNull
     private final byte[] mHotwordAudio;
 
@@ -74,6 +80,24 @@
      */
     private int mHotwordOffsetMillis = HOTWORD_OFFSET_UNSET;
 
+    @DataClass.Suppress("setHotwordAudio")
+    abstract static class BaseBuilder {
+
+        /**
+         * Buffer of hotword audio data for training models. The data format is expected to match
+         * {@link #getAudioFormat()}.
+         */
+        @SuppressLint("UnflaggedApi")
+        public @NonNull HotwordTrainingAudio.Builder setHotwordAudio(@NonNull byte[] value) {
+            Objects.requireNonNull(value, "value should not be null");
+            final HotwordTrainingAudio.Builder builder = (HotwordTrainingAudio.Builder) this;
+            // If the code gen flag in build() is changed, we must update the flag e.g. 0x1 here.
+            builder.mBuilderFieldsSet |= 0x1;
+            builder.mHotwordAudio = value;
+            return builder;
+        }
+    }
+
 
 
     // Code below generated by codegen v1.0.23.
@@ -110,7 +134,8 @@
     }
 
     /**
-     * Buffer of hotword audio data for training models.
+     * Buffer of hotword audio data for training models. The data format is expected to match
+     * {@link #getAudioFormat()}.
      */
     @DataClass.Generated.Member
     public @NonNull byte[] getHotwordAudio() {
@@ -171,7 +196,7 @@
         //noinspection PointlessBooleanExpression
         return true
                 && java.util.Arrays.equals(mHotwordAudio, that.mHotwordAudio)
-                && java.util.Objects.equals(mAudioFormat, that.mAudioFormat)
+                && Objects.equals(mAudioFormat, that.mAudioFormat)
                 && mAudioType == that.mAudioType
                 && mHotwordOffsetMillis == that.mHotwordOffsetMillis;
     }
@@ -184,7 +209,7 @@
 
         int _hash = 1;
         _hash = 31 * _hash + java.util.Arrays.hashCode(mHotwordAudio);
-        _hash = 31 * _hash + java.util.Objects.hashCode(mAudioFormat);
+        _hash = 31 * _hash + Objects.hashCode(mAudioFormat);
         _hash = 31 * _hash + mAudioType;
         _hash = 31 * _hash + mHotwordOffsetMillis;
         return _hash;
@@ -251,7 +276,7 @@
      */
     @SuppressWarnings("WeakerAccess")
     @DataClass.Generated.Member
-    public static final class Builder {
+    public static final class Builder extends BaseBuilder {
 
         private @NonNull byte[] mHotwordAudio;
         private @NonNull AudioFormat mAudioFormat;
@@ -264,7 +289,8 @@
          * Creates a new Builder.
          *
          * @param hotwordAudio
-         *   Buffer of hotword audio data for training models.
+         *   Buffer of hotword audio data for training models. The data format is expected to match
+         *   {@link #getAudioFormat()}.
          * @param audioFormat
          *   The {@link AudioFormat} of the {@link HotwordTrainingAudio#mHotwordAudio}.
          */
@@ -280,17 +306,6 @@
         }
 
         /**
-         * Buffer of hotword audio data for training models.
-         */
-        @DataClass.Generated.Member
-        public @NonNull Builder setHotwordAudio(@NonNull byte... value) {
-            checkNotUsed();
-            mBuilderFieldsSet |= 0x1;
-            mHotwordAudio = value;
-            return this;
-        }
-
-        /**
          * The {@link AudioFormat} of the {@link HotwordTrainingAudio#mHotwordAudio}.
          */
         @DataClass.Generated.Member
@@ -353,10 +368,10 @@
     }
 
     @DataClass.Generated(
-            time = 1692837160437L,
+            time = 1694193905346L,
             codegenVersion = "1.0.23",
             sourceFile = "frameworks/base/core/java/android/service/voice/HotwordTrainingAudio.java",
-            inputSignatures = "public static final  int HOTWORD_OFFSET_UNSET\nprivate final @android.annotation.NonNull byte[] mHotwordAudio\nprivate final @android.annotation.NonNull android.media.AudioFormat mAudioFormat\nprivate final @android.annotation.NonNull int mAudioType\nprivate  int mHotwordOffsetMillis\nprivate  java.lang.String hotwordAudioToString()\nprivate static  int defaultAudioType()\nclass HotwordTrainingAudio extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=true, genEqualsHashCode=true, genHiddenConstDefs=true, genParcelable=true, genToString=true)")
+            inputSignatures = "public static final  int HOTWORD_OFFSET_UNSET\nprivate final @android.annotation.NonNull byte[] mHotwordAudio\nprivate final @android.annotation.NonNull android.media.AudioFormat mAudioFormat\nprivate final @android.annotation.NonNull int mAudioType\nprivate  int mHotwordOffsetMillis\nprivate  java.lang.String hotwordAudioToString()\nprivate static  int defaultAudioType()\nclass HotwordTrainingAudio extends java.lang.Object implements [android.os.Parcelable]\npublic @android.annotation.SuppressLint @android.annotation.NonNull android.service.voice.HotwordTrainingAudio.Builder setHotwordAudio(byte[])\nclass BaseBuilder extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=true, genEqualsHashCode=true, genHiddenConstDefs=true, genParcelable=true, genToString=true)\npublic @android.annotation.SuppressLint @android.annotation.NonNull android.service.voice.HotwordTrainingAudio.Builder setHotwordAudio(byte[])\nclass BaseBuilder extends java.lang.Object implements []")
     @Deprecated
     private void __metadata() {}
 
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 637770c..04ae0af 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -2556,7 +2556,7 @@
         private void doDetachEngine() {
             // Some wallpapers will not trigger the rendering threads of the remaining engines even
             // if they are visible, so we need to toggle the state to get their attention.
-            if (!mEngine.mDestroyed) {
+            if (mEngine != null && !mEngine.mDestroyed) {
                 mEngine.detach();
                 synchronized (mActiveEngines) {
                     for (IWallpaperEngineWrapper engineWrapper : mActiveEngines.values()) {
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index 14fc585..65a1da6 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -16,6 +16,9 @@
 
 package android.text;
 
+import static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
+
+import android.annotation.FlaggedApi;
 import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -55,9 +58,7 @@
      *                line width
      * @param includePad set whether to include extra space beyond font ascent and descent which is
      *                   needed to avoid clipping in some scripts
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static BoringLayout make(CharSequence source, TextPaint paint, int outerWidth,
             Alignment align, float spacingMult, float spacingAdd, BoringLayout.Metrics metrics,
             boolean includePad) {
@@ -83,9 +84,7 @@
      * @param ellipsizedWidth the width to which this Layout is ellipsizing. If {@code ellipsize} is
      *                        {@code null}, or is {@link TextUtils.TruncateAt#MARQUEE} this value is
      *                        not used, {@code outerWidth} is used instead
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static BoringLayout make(CharSequence source, TextPaint paint, int outerWidth,
             Alignment align, float spacingmult, float spacingadd, BoringLayout.Metrics metrics,
             boolean includePad, TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
@@ -117,9 +116,7 @@
      *                              False for keeping the first font's line height. If some glyphs
      *                              requires larger vertical spaces, by passing true to this
      *                              argument, the layout increase the line height to fit all glyphs.
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static @NonNull BoringLayout make(
             @NonNull CharSequence source, @NonNull TextPaint paint,
             @IntRange(from = 0) int outerWidth,
@@ -266,9 +263,7 @@
      *                line width
      * @param includePad set whether to include extra space beyond font ascent and descent which is
      *                   needed to avoid clipping in some scripts
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public BoringLayout(CharSequence source, TextPaint paint, int outerwidth, Alignment align,
             float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, boolean includePad) {
         super(source, paint, outerwidth, align, TextDirectionHeuristics.LTR, spacingMult,
@@ -302,9 +297,7 @@
      * @param ellipsizedWidth the width to which this Layout is ellipsizing. If {@code ellipsize} is
      *                        {@code null}, or is {@link TextUtils.TruncateAt#MARQUEE} this value is
      *                        not used, {@code outerWidth} is used instead
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public BoringLayout(CharSequence source, TextPaint paint, int outerWidth, Alignment align,
             float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, boolean includePad,
             TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
@@ -333,9 +326,7 @@
      *                              False for keeping the first font's line height. If some glyphs
      *                              requires larger vertical spaces, by passing true to this
      *                              argument, the layout increase the line height to fit all glyphs.
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public BoringLayout(
             @NonNull CharSequence source, @NonNull TextPaint paint,
             @IntRange(from = 0) int outerWidth, @NonNull Alignment align, float spacingMult,
@@ -478,9 +469,7 @@
      * @param paint a paint
      * @return layout metric for the given text. null if given text is unable to be handled by
      *         BoringLayout.
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static Metrics isBoring(CharSequence text, TextPaint paint) {
         return isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, null);
     }
@@ -495,9 +484,7 @@
      * @return layout metric for the given text. If metrics is not null, this method fills values
      *         to given metrics object instead of allocating new metrics object. null if given text
      *         is unable to be handled by BoringLayout.
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static Metrics isBoring(CharSequence text, TextPaint paint, Metrics metrics) {
         return isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, metrics);
     }
@@ -557,9 +544,7 @@
      *                              argument, the layout increase the line height to fit all glyphs.
      * @param metrics the out metrics.
      * @return metrics on success. null if text cannot be rendered by BoringLayout.
-     * @deprecated Use {@link android.text.Layout.Builder} instead.
      */
-    @Deprecated
     public static @Nullable Metrics isBoring(@NonNull CharSequence text, @NonNull TextPaint paint,
             @NonNull TextDirectionHeuristic textDir, boolean useFallbackLineSpacing,
             @Nullable Metrics metrics) {
@@ -746,6 +731,7 @@
          *
          * @return a drawing bounding box.
          */
+        @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
         @NonNull public RectF getDrawingBoundingBox() {
             return mDrawingBounds;
         }
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 469e166..4f4dea7 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -16,6 +16,9 @@
 
 package android.text;
 
+import static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
+
+import android.annotation.FlaggedApi;
 import android.annotation.FloatRange;
 import android.annotation.IntDef;
 import android.annotation.IntRange;
@@ -1010,6 +1013,7 @@
      * @return bounding rectangle
      */
     @NonNull
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public RectF computeDrawingBoundingBox() {
         float left = 0;
         float right = 0;
@@ -3436,6 +3440,7 @@
      *
      * @see StaticLayout.Builder
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public static final class Builder {
         /**
          * Construct a builder class.
@@ -3776,6 +3781,7 @@
         // The corresponding getter is getUseBoundsForWidth
         @NonNull
         @SuppressLint("MissingGetterMatchingBuilder")
+        @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
         public Builder setUseBoundsForWidth(boolean useBoundsForWidth) {
             mUseBoundsForWidth = useBoundsForWidth;
             return this;
@@ -3865,6 +3871,7 @@
      * @see Layout.Builder
      */
     @NonNull
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final CharSequence getText() {
         return mText;
     }
@@ -3914,6 +3921,7 @@
      * @see StaticLayout.Builder#setTextDirection(TextDirectionHeuristic)
      */
     @NonNull
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final TextDirectionHeuristic getTextDirectionHeuristic() {
         return mTextDir;
     }
@@ -3940,6 +3948,7 @@
      * @see StaticLayout.Builder#setLineSpacing(float, float)
      * @see Layout#getSpacingMultiplier()
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final float getLineSpacingMultiplier() {
         return mSpacingMult;
     }
@@ -3966,6 +3975,7 @@
      * @see StaticLayout.Builder#setLineSpacing(float, float)
      * @see Layout#getSpacingAdd()
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final float getLineSpacingAmount() {
         return mSpacingAdd;
     }
@@ -3977,6 +3987,7 @@
      * @see Layout.Builder#setFontPaddingIncluded(boolean)
      * @see StaticLayout.Builder#setIncludePad(boolean)
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final boolean isFontPaddingIncluded() {
         return mIncludePad;
     }
@@ -4024,6 +4035,7 @@
      * @see Layout#getEllipsizedWidth()
      */
     @Nullable
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final TextUtils.TruncateAt getEllipsize() {
         return mEllipsize;
     }
@@ -4039,6 +4051,7 @@
      * @see StaticLayout.Builder#setMaxLines(int)
      */
     @IntRange(from = 1)
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int getMaxLines() {
         return mMaxLines;
     }
@@ -4051,6 +4064,7 @@
      * @see StaticLayout.Builder#setBreakStrategy(int)
      */
     @BreakStrategy
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int getBreakStrategy() {
         return mBreakStrategy;
     }
@@ -4063,6 +4077,7 @@
      * @see StaticLayout.Builder#setHyphenationFrequency(int)
      */
     @HyphenationFrequency
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int getHyphenationFrequency() {
         return mHyphenationFrequency;
     }
@@ -4078,6 +4093,7 @@
      * @see StaticLayout.Builder#setIndents(int[], int[])
      */
     @Nullable
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int[] getLeftIndents() {
         if (mLeftIndents == null) {
             return null;
@@ -4098,6 +4114,7 @@
      * @see StaticLayout.Builder#setIndents(int[], int[])
      */
     @Nullable
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int[] getRightIndents() {
         if (mRightIndents == null) {
             return null;
@@ -4115,6 +4132,7 @@
      * @see StaticLayout.Builder#setJustificationMode(int)
      */
     @JustificationMode
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public final int getJustificationMode() {
         return mJustificationMode;
     }
@@ -4128,6 +4146,7 @@
      */
     // not being final because of subclass has already published API.
     @NonNull
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public LineBreakConfig getLineBreakConfig() {
         return mLineBreakConfig;
     }
@@ -4141,6 +4160,7 @@
      * @see StaticLayout.Builder#setUseBoundsForWidth(boolean)
      * @see DynamicLayout.Builder#setUseBoundsForWidth(boolean)
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public boolean getUseBoundsForWidth() {
         return mUseBoundsForWidth;
     }
diff --git a/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig b/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig
new file mode 100644
index 0000000..60f1e88
--- /dev/null
+++ b/core/java/android/text/flags/no_break_no_hyphenation_span.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.text.flags"
+
+flag {
+  name: "no_break_no_hyphenation_span"
+  namespace: "text"
+  description: "A feature flag that adding new spans that prevents line breaking and hyphenation."
+  bug: "283193586"
+}
diff --git a/core/java/android/text/style/LineBreakConfigSpan.java b/core/java/android/text/style/LineBreakConfigSpan.java
index 90a79c6..b8033a9 100644
--- a/core/java/android/text/style/LineBreakConfigSpan.java
+++ b/core/java/android/text/style/LineBreakConfigSpan.java
@@ -16,6 +16,9 @@
 
 package android.text.style;
 
+import static com.android.text.flags.Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN;
+
+import android.annotation.FlaggedApi;
 import android.annotation.NonNull;
 import android.graphics.text.LineBreakConfig;
 
@@ -24,6 +27,7 @@
 /**
  * LineBreakSpan for changing line break style of the specific region of the text.
  */
+@FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
 public class LineBreakConfigSpan {
     private final LineBreakConfig mLineBreakConfig;
 
@@ -60,4 +64,22 @@
     public String toString() {
         return "LineBreakConfigSpan{mLineBreakConfig=" + mLineBreakConfig + '}';
     }
+
+    private static final LineBreakConfig sNoHyphenationConfig = new LineBreakConfig.Builder()
+            .setHyphenation(LineBreakConfig.HYPHENATION_DISABLED)
+            .build();
+
+    /**
+     * A specialized {@link LineBreakConfigSpan} that used for preventing hyphenation.
+     */
+    @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+    public static final class NoHyphenationSpan extends LineBreakConfigSpan {
+        /**
+         * Construct a new {@link NoHyphenationSpan}.
+         */
+        @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+        public NoHyphenationSpan() {
+            super(sNoHyphenationConfig);
+        }
+    }
 }
diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java
index 12527e9..2906d86 100644
--- a/core/java/android/util/FeatureFlagUtils.java
+++ b/core/java/android/util/FeatureFlagUtils.java
@@ -187,14 +187,6 @@
     public static final String SETTINGS_FLASH_NOTIFICATIONS = "settings_flash_notifications";
 
     /**
-     * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll
-     * view is shown in system ui.
-     * @hide
-     */
-    public static final String SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS =
-            "settings_show_udfps_enroll_in_settings";
-
-    /**
      * Flag to enable lock screen credentials transfer API in Android U.
      * @hide
      */
@@ -250,7 +242,6 @@
         DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false");
         DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false");
         DEFAULT_FLAGS.put(SETTINGS_FLASH_NOTIFICATIONS, "true");
-        DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "true");
         DEFAULT_FLAGS.put(SETTINGS_ENABLE_LOCKSCREEN_TRANSFER_API, "true");
         DEFAULT_FLAGS.put(SETTINGS_REMOTE_DEVICE_CREDENTIAL_VALIDATION, "true");
         DEFAULT_FLAGS.put(SETTINGS_BIOMETRICS2_FINGERPRINT_SETTINGS, "false");
diff --git a/core/java/android/util/apk/ApkSignatureVerifier.java b/core/java/android/util/apk/ApkSignatureVerifier.java
index d2a18dd..a6724da 100644
--- a/core/java/android/util/apk/ApkSignatureVerifier.java
+++ b/core/java/android/util/apk/ApkSignatureVerifier.java
@@ -48,6 +48,7 @@
 import java.security.cert.Certificate;
 import java.security.cert.CertificateEncodingException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -428,7 +429,7 @@
 
                     // make sure all entries use the same signing certs
                     final Signature[] entrySigs = convertToSignatures(entryCerts);
-                    if (!Signature.areExactMatch(lastSigs, entrySigs)) {
+                    if (!Arrays.equals(lastSigs, entrySigs)) {
                         return input.error(
                                 INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
                                 "Package " + apkPath + " has mismatched certificates at entry "
diff --git a/core/java/android/view/HandwritingInitiator.java b/core/java/android/view/HandwritingInitiator.java
index a208d1f..0ce1d47 100644
--- a/core/java/android/view/HandwritingInitiator.java
+++ b/core/java/android/view/HandwritingInitiator.java
@@ -24,6 +24,7 @@
 import android.graphics.RectF;
 import android.graphics.Region;
 import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
 import android.widget.TextView;
 
 import com.android.internal.annotations.VisibleForTesting;
@@ -81,6 +82,8 @@
     private int mConnectionCount = 0;
     private final InputMethodManager mImm;
 
+    private final int[] mTempLocation = new int[2];
+
     private final Rect mTempRect = new Rect();
 
     private final RectF mTempRectF = new RectF();
@@ -424,7 +427,19 @@
         return null;
     }
 
-    private static void requestFocusWithoutReveal(View view) {
+    private void requestFocusWithoutReveal(View view) {
+        if (view instanceof EditText editText && !mState.mStylusDownWithinEditorBounds) {
+            // If the stylus down point was inside the EditText's bounds, then the EditText will
+            // automatically set its cursor position nearest to the stylus down point when it
+            // gains focus. If the stylus down point was outside the EditText's bounds (within
+            // the extended handwriting bounds), then we must calculate and set the cursor
+            // position manually.
+            view.getLocationInWindow(mTempLocation);
+            int offset = editText.getOffsetForPosition(
+                    mState.mStylusDownX - mTempLocation[0],
+                    mState.mStylusDownY - mTempLocation[1]);
+            editText.setSelection(offset);
+        }
         if (view.getRevealOnFocusHint()) {
             view.setRevealOnFocusHint(false);
             view.requestFocus();
@@ -452,6 +467,10 @@
             if (getViewHandwritingArea(connectedView, handwritingArea)
                     && isInHandwritingArea(handwritingArea, x, y, connectedView, isHover)
                     && shouldTriggerStylusHandwritingForView(connectedView)) {
+                if (!isHover && mState != null) {
+                    mState.mStylusDownWithinEditorBounds =
+                            contains(handwritingArea, x, y, 0f, 0f, 0f, 0f);
+                }
                 return connectedView;
             }
         }
@@ -470,7 +489,12 @@
             }
 
             final float distance = distance(handwritingArea, x, y);
-            if (distance == 0f) return view;
+            if (distance == 0f) {
+                if (!isHover && mState != null) {
+                    mState.mStylusDownWithinEditorBounds = true;
+                }
+                return view;
+            }
             if (distance < minDistance) {
                 minDistance = distance;
                 bestCandidate = view;
@@ -653,6 +677,12 @@
         private boolean mExceedHandwritingSlop;
 
         /**
+         * Whether the stylus down point of the MotionEvent sequence was within the editor's bounds
+         * (not including the extended handwriting bounds).
+         */
+        private boolean mStylusDownWithinEditorBounds;
+
+        /**
          * A view which has requested focus and is pending input connection creation. When an input
          * connection is created for the view, a handwriting session should be started for the view.
          */
diff --git a/core/java/android/view/HapticScrollFeedbackProvider.java b/core/java/android/view/HapticScrollFeedbackProvider.java
index fba23ba..a2f1d37 100644
--- a/core/java/android/view/HapticScrollFeedbackProvider.java
+++ b/core/java/android/view/HapticScrollFeedbackProvider.java
@@ -17,21 +17,35 @@
 package android.view;
 
 import android.annotation.FlaggedApi;
+import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.view.flags.Flags;
 
 import com.android.internal.annotations.VisibleForTesting;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * {@link ScrollFeedbackProvider} that performs haptic feedback when scrolling.
  *
  * <p>Each scrolling widget should have its own instance of this class to ensure that scroll state
  * is isolated.
+ *
+ * <p>Check {@link ScrollFeedbackProvider} for details on the arguments that should be passed to the
+ * methods in this class. To check if your input device ID, source, and motion axis are valid for
+ * haptic feedback, you can use the
+ * {@link ViewConfiguration#isHapticScrollFeedbackEnabled(int, int, int)} API.
  */
 @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
 public class HapticScrollFeedbackProvider implements ScrollFeedbackProvider {
     private static final String TAG = "HapticScrollFeedbackProvider";
 
+    /** @hide */
+    @IntDef(value = {MotionEvent.AXIS_SCROLL})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface HapticScrollFeedbackAxis {}
+
     private static final int TICK_INTERVAL_NO_TICK = 0;
 
     private final View mView;
@@ -46,10 +60,6 @@
     /** The {@link InputDevice} source from which the latest scroll event happened. */
     private int mSource = -1;
 
-    /**
-     * Cache for tick interval for scroll tick caused by a {@link InputDevice#SOURCE_ROTARY_ENCODER}
-     * on {@link MotionEvent#AXIS_SCROLL}. Set to -1 if the value has not been fetched and cached.
-     */
     /** The tick interval corresponding to the current InputDevice/source/axis. */
     private int mTickIntervalPixels = TICK_INTERVAL_NO_TICK;
     private int mTotalScrollPixels = 0;
@@ -68,7 +78,8 @@
     }
 
     @Override
-    public void onScrollProgress(int inputDeviceId, int source, int axis, int deltaInPixels) {
+    public void onScrollProgress(
+            int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis, int deltaInPixels) {
         maybeUpdateCurrentConfig(inputDeviceId, source, axis);
         if (!mHapticScrollFeedbackEnabled) {
             return;
@@ -95,7 +106,8 @@
     }
 
     @Override
-    public void onScrollLimit(int inputDeviceId, int source, int axis, boolean isStart) {
+    public void onScrollLimit(
+            int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis, boolean isStart) {
         maybeUpdateCurrentConfig(inputDeviceId, source, axis);
         if (!mHapticScrollFeedbackEnabled) {
             return;
@@ -112,7 +124,7 @@
     }
 
     @Override
-    public void onSnapToItem(int inputDeviceId, int source, int axis) {
+    public void onSnapToItem(int inputDeviceId, int source, @HapticScrollFeedbackAxis int axis) {
         maybeUpdateCurrentConfig(inputDeviceId, source, axis);
         if (!mHapticScrollFeedbackEnabled) {
             return;
diff --git a/core/java/android/view/InputWindowHandle.java b/core/java/android/view/InputWindowHandle.java
index 2761aae..bc83750 100644
--- a/core/java/android/view/InputWindowHandle.java
+++ b/core/java/android/view/InputWindowHandle.java
@@ -35,6 +35,8 @@
  * @hide
  */
 public final class InputWindowHandle {
+    // TODO (b/300094445): Convert to use correct flagging infrastructure
+    public static final boolean USE_SURFACE_TRUSTED_OVERLAY = true;
 
     /**
      * An internal annotation for all the {@link android.os.InputConfig} flags that can be
@@ -59,7 +61,6 @@
             InputConfig.DUPLICATE_TOUCH_TO_WALLPAPER,
             InputConfig.IS_WALLPAPER,
             InputConfig.PAUSE_DISPATCHING,
-            InputConfig.TRUSTED_OVERLAY,
             InputConfig.WATCH_OUTSIDE_TOUCH,
             InputConfig.SLIPPERY,
             InputConfig.DISABLE_USER_ACTIVITY,
@@ -272,4 +273,13 @@
         }
         this.inputConfig &= ~inputConfig;
     }
+
+    public void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc,
+            boolean isTrusted) {
+        if (USE_SURFACE_TRUSTED_OVERLAY) {
+            t.setTrustedOverlay(sc, isTrusted);
+        } else if (isTrusted) {
+            inputConfig |= InputConfig.TRUSTED_OVERLAY;
+        }
+    }
 }
diff --git a/core/java/android/view/ScrollFeedbackProvider.java b/core/java/android/view/ScrollFeedbackProvider.java
index 6f760c5..78716f5 100644
--- a/core/java/android/view/ScrollFeedbackProvider.java
+++ b/core/java/android/view/ScrollFeedbackProvider.java
@@ -24,120 +24,103 @@
  * Interface to represent an entity giving consistent feedback for different events surrounding view
  * scroll.
  *
- * <p>When you have access to the {@link MotionEvent}s that triggered the different scroll events,
- * use the {@link MotionEvent} based APIs in this class. If you do not have access to the motion
- * events, you can use the methods that accept the {@link InputDevice} ID (which can be obtained by
- * APIs like {@link MotionEvent#getDeviceId()} and {@link InputDevice#getId()}) and source (which
- * can be obtained by APIs like {@link MotionEvent#getSource()}) of the motion that caused the
- * scroll events.
+ * <p>The interface provides methods for the client to report different scroll events. The client
+ * should report all scroll events that they want to be considered for scroll feedback using the
+ * respective methods. The interface will process these events and provide scroll feedback based on
+ * its specific feedback implementation.
+ *
+ * <h3>Obtaining the correct arguments for methods in this interface</h3>
+ *
+ * <p>Methods in this interface rely on the provision of valid {@link InputDevice} ID and source, as
+ * well as the {@link MotionEvent} axis that generated a specific scroll event. The
+ * {@link InputDevice} represented by the provided ID must have a {@link InputDevice.MotionRange}
+ * with the provided source and axis. See below for more details on obtaining the right arguments
+ * for your method call.
+ *
+ * <ul>
+ *
+ * <li><p><b>inputDeviceId</b>: should always be the ID of the {@link InputDevice} that generated
+ * the scroll event. If calling this method in response to a {@link MotionEvent}, use the device ID
+ * that is reported by the event, which can be obtained using {@link MotionEvent#getDeviceId()}.
+ * Otherwise, use a valid ID that is obtained from {@link InputDevice#getId()}, or from an
+ * {@link InputManager} instance ({@link InputManager#getInputDeviceIds()} gives all the valid input
+ * device IDs).
+ *
+ * <li><p><b>source</b>: should always be the {@link InputDevice} source that generated the scroll
+ * event. Use {@link MotionEvent#getSource()} if calling this method in response to a
+ * {@link MotionEvent}. Otherwise, use a valid source for the {@link InputDevice}. You can use
+ * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
+ * {@link InputDevice}, from which you can derive all the valid sources for the device.
+ *
+ * <li><p><b>axis</b>: should always be the axis whose axis value produced the scroll event.
+ * A {@link MotionEvent} may report data for multiple axes, and each axis may have multiple data
+ * points for different pointers. Use the axis whose movement produced the specific scroll event.
+ * The motion value for an axis can be obtained using {@link MotionEvent#getAxisValue(int)}.
+ * You can use {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s
+ * for the {@link InputDevice}, from which you can derive all the valid axes for the device.
+ *
+ * </ul>
+ *
+ * <b>Note</b> that not all valid input device source and motion axis inputs are necessarily
+ * supported for scroll feedback. If you are implementing this interface, provide clear
+ * documentation in your implementation class about which input device source and motion axis are
+ * supported for your specific implementation. If you are using one of the implementations of this
+ * interface, please refer to the documentation of the implementation for details on which input
+ * device source and axis are supported.
  */
 @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
 public interface ScrollFeedbackProvider {
     /**
-     * Call this when the view has snapped to an item, with a motion generated by an
-     * {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and on
-     * a given motion event {@code axis}.
+     * Call this when the view has snapped to an item.
      *
-     * <p>This method has the same purpose as {@link #onSnapToItem(MotionEvent, int)}. When a scroll
-     * snap happens, call either this method or {@link #onSnapToItem(MotionEvent, int)}, not both.
-     * This method is useful when you have no direct access to the {@link MotionEvent} that
-     * caused the snap event.
      *
      * @param inputDeviceId the ID of the {@link InputDevice} that generated the motion triggering
      *          the snap.
      * @param source the input source of the motion causing the snap.
      * @param axis the axis of {@code event} that caused the item to snap.
-     *
-     * @see #onSnapToItem(MotionEvent, int)
      */
     void onSnapToItem(int inputDeviceId, int source, int axis);
 
     /**
-     * Call this when the view has snapped to an item, with a motion from a given
-     * {@link MotionEvent} on a given {@code axis}.
+     * Call this when the view has reached the scroll limit.
      *
-     * <p>The interface is not aware of the internal scroll states of the view for which scroll
-     * feedback is played. As such, the client should call
-     * {@link #onScrollLimit(MotionEvent, int, int)} when scrolling has reached limit.
-     *
-     * @param event the {@link MotionEvent} that caused the item to snap.
-     * @param axis the axis of {@code event} that caused the item to snap.
-     *
-     * @see #onSnapToItem(int, int, int)
-     */
-    default void onSnapToItem(@NonNull MotionEvent event, int axis) {
-        onSnapToItem(event.getDeviceId(), event.getSource(), axis);
-    }
-
-    /**
-     * Call this when the view has reached the scroll limit when scrolled by a motion generated by
-     * an {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and
-     * on a given motion event {@code axis}.
-     *
-     * <p>This method has the same purpose as {@link #onScrollLimit(MotionEvent, int, boolean)}.
-     * When a scroll limit happens, call either this method or
-     * {@link #onScrollLimit(MotionEvent, int, boolean)}, not both. This method is useful when you
-     * have no direct access to the {@link MotionEvent} that caused the scroll limit.
+     * <p>Note that a feedback may not be provided on every call to this method. This interface, for
+     * instance, may provide feedback on every `N`th scroll limit event. For the interface to
+     * properly provide feedback when needed, call this method for each scroll limit event that you
+     * want to be accounted to scroll limit feedback.
      *
      * @param inputDeviceId the ID of the {@link InputDevice} that caused scrolling to hit limit.
      * @param source the input source of the motion that caused scrolling to hit the limit.
      * @param axis the axis of {@code event} that caused scrolling to hit the limit.
      * @param isStart {@code true} if scrolling hit limit at the start of the scrolling list, and
      *                {@code false} if the scrolling hit limit at the end of the scrolling list.
-     *
-     * @see #onScrollLimit(MotionEvent, int, boolean)
+     *                <i>start</i> and <i>end<i> in this context are not geometrical references.
+     *                Instead, they refer to the start and end of a scrolling experience. As such,
+     *                "start" for some views may be at the bottom of a scrolling list, while it may
+     *                be at the top of scrolling list for others.
      */
     void onScrollLimit(int inputDeviceId, int source, int axis, boolean isStart);
 
     /**
-     * Call this when the view has reached the scroll limit when scrolled by the motion from a given
-     * {@link MotionEvent} on a given {@code axis}.
+     * Call this when the view has scrolled.
      *
-     * @param event the {@link MotionEvent} that caused scrolling to hit the limit.
-     * @param axis the axis of {@code event} that caused scrolling to hit the limit.
-     * @param isStart {@code true} if scrolling hit limit at the start of the scrolling list, and
-     *                {@code false} if the scrolling hit limit at the end of the scrolling list.
+     * <p>Different axes have different ways to map their raw axis values to pixels for scrolling.
+     * When calling this method, use the scroll values in pixels by which the view was scrolled; do
+     * not use the raw axis values. That is, use whatever value is passed to one of View's scrolling
+     * methods (example: {@link View#scrollBy(int, int)}). For example, for vertical scrolling on
+     * {@link MotionEvent#AXIS_SCROLL}, convert the raw axis value to the equivalent pixels by using
+     * {@link ViewConfiguration#getScaledVerticalScrollFactor()}, and use that value for this method
+     * call.
      *
-     * @see #onScrollLimit(int, int, int, boolean)
-     */
-    default void onScrollLimit(@NonNull MotionEvent event, int axis, boolean isStart) {
-        onScrollLimit(event.getDeviceId(), event.getSource(), axis, isStart);
-    }
-
-    /**
-     * Call this when the view has scrolled by {@code deltaInPixels} due to the motion generated by
-     * an {@link InputDevice} with an id of {@code inputDeviceId}, from an input {@code source} and
-     * on a given motion event {@code axis}.
-     *
-     * <p>This method has the same purpose as {@link #onScrollProgress(MotionEvent, int, int)}.
-     * When a scroll progress happens, call either this method or
-     * {@link #onScrollProgress(MotionEvent, int, int)}, not both. This method is useful when you
-     * have no direct access to the {@link MotionEvent} that caused the scroll progress.
+     * <p>Note that a feedback may not be provided on every call to this method. This interface, for
+     * instance, may provide feedback for every `x` pixels scrolled. For the interface to properly
+     * track scroll progress and provide feedback when needed, call this method for each scroll
+     * event that you want to be accounted to scroll feedback.
      *
      * @param inputDeviceId the ID of the {@link InputDevice} that caused scroll progress.
      * @param source the input source of the motion that caused scroll progress.
      * @param axis the axis of {@code event} that caused scroll progress.
      * @param deltaInPixels the amount of scroll progress, in pixels.
-     *
-     * @see #onScrollProgress(MotionEvent, int, int)
      */
     void onScrollProgress(int inputDeviceId, int source, int axis, int deltaInPixels);
-
-    /**
-     * Call this when the view has scrolled by {@code deltaInPixels} due to the motion from a given
-     * {@link MotionEvent} on a given {@code axis}.
-     *
-     * <p>The interface is not aware of the internal scroll states of the view for which scroll
-     * feedback is played. As such, the client should call
-     * {@link #onScrollLimit(MotionEvent, int, int)} when scrolling has reached limit.
-     *
-     * @param event the {@link MotionEvent} that caused scroll progress.
-     * @param axis the axis of {@code event} that caused scroll progress.
-     * @param deltaInPixels the amount of scroll progress, in pixels.
-     *
-     * @see #onScrollProgress(int, int, int, int)
-     */
-    default void onScrollProgress(@NonNull MotionEvent event, int axis, int deltaInPixels) {
-        onScrollProgress(event.getDeviceId(), event.getSource(), axis, deltaInPixels);
-    }
 }
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 0244d46..a3ae6cf 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -1220,36 +1220,39 @@
      * Checks if any kind of scroll haptic feedback is enabled for a motion generated by a specific
      * input device configuration and motion axis.
      *
-     * <h3>Obtaining the correct arguments for this method call</h3>
-     * <p><b>inputDeviceId</b>: if calling this method in response to a {@link MotionEvent}, use
-     * the device ID that is reported by the event, which can be obtained using
-     * {@link MotionEvent#getDeviceId()}. Otherwise, use a valid ID that is obtained from
-     * {@link InputDevice#getId()}, or from an {@link InputManager} instance
-     * ({@link InputManager#getInputDeviceIds()} gives all the valid input device IDs).
+     * <p>See {@link ScrollFeedbackProvider} for details on the arguments that should be passed to
+     * the methods in this class.
      *
-     * <p><b>axis</b>: a {@link MotionEvent} may report data for multiple axes, and each axis may
-     * have multiple data points for different pointers. Use the axis whose movement produced the
-     * scrolls that would generate the scroll haptics. You can use
-     * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
-     * {@link InputDevice}, from which you can derive all the valid axes for the device.
+     * <p>If the provided input device ID, source, and motion axis are not supported by this Android
+     * device, this method returns {@code false}. In other words, if the {@link InputDevice}
+     * represented by the provided {code inputDeviceId} does not have a
+     * {@link InputDevice.MotionRange} with the provided {@code axis} and {@code source}, the method
+     * returns {@code false}.
      *
-     * <p><b>source</b>: use {@link MotionEvent#getSource()} if calling this method in response to a
-     * {@link MotionEvent}. Otherwise, use a valid source for the {@link InputDevice}. You can use
-     * {@link InputDevice#getMotionRanges()} to get all the {@link InputDevice.MotionRange}s for the
-     * {@link InputDevice}, from which you can derive all the valid sources for the device.
+     * <p>If the provided input device ID, source, and motion axis are supported by this Android
+     * device, this method returns {@code true} only if the provided arguments are supported for
+     * scroll haptics. Otherwise, this method returns {@code false}.
      *
      * @param inputDeviceId the ID of the {@link InputDevice} that generated the motion that may
      *      produce scroll haptics.
      * @param source the input source of the motion that may produce scroll haptics.
      * @param axis the axis of the motion that may produce scroll haptics.
      * @return {@code true} if motions generated by the provided input and motion configuration
-     *      should produce scroll haptics. {@code false} otherwise.
+     *      can produce scroll haptics. {@code false} otherwise.
+     *
+     * @see #getHapticScrollFeedbackTickInterval(int, int, int)
+     * @see InputDevice#getMotionRanges()
+     * @see InputDevice#getMotionRange(int)
+     * @see InputDevice#getMotionRange(int, int)
      */
     @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
-    public boolean isHapticScrollFeedbackEnabled(int inputDeviceId, int axis, int source) {
+    public boolean isHapticScrollFeedbackEnabled(
+            int inputDeviceId,
+            @HapticScrollFeedbackProvider.HapticScrollFeedbackAxis int axis,
+            int source) {
         if (!isInputDeviceInfoValid(inputDeviceId, axis, source)) return false;
 
-        if (source == InputDevice.SOURCE_ROTARY_ENCODER) {
+        if (source == InputDevice.SOURCE_ROTARY_ENCODER && axis == MotionEvent.AXIS_SCROLL) {
             return mRotaryEncoderHapticScrollFeedbackEnabled;
         }
 
@@ -1285,9 +1288,14 @@
      *      configuration. If scroll haptics is disabled for the given configuration, or if the
      *      device does not support scroll tick haptics for the given configuration, this method
      *      returns {@code Integer.MAX_VALUE}.
+     *
+     * @see #isHapticScrollFeedbackEnabled(int, int, int)
      */
     @FlaggedApi(Flags.FLAG_SCROLL_FEEDBACK_API)
-    public int getHapticScrollFeedbackTickInterval(int inputDeviceId, int axis, int source) {
+    public int getHapticScrollFeedbackTickInterval(
+            int inputDeviceId,
+            @HapticScrollFeedbackProvider.HapticScrollFeedbackAxis int axis,
+            int source) {
         if (!mRotaryEncoderHapticScrollFeedbackEnabled) {
             return NO_HAPTIC_SCROLL_TICK_INTERVAL;
         }
@@ -1296,7 +1304,7 @@
             return NO_HAPTIC_SCROLL_TICK_INTERVAL;
         }
 
-        if (source == InputDevice.SOURCE_ROTARY_ENCODER) {
+        if (source == InputDevice.SOURCE_ROTARY_ENCODER && axis == MotionEvent.AXIS_SCROLL) {
             return mRotaryEncoderHapticScrollFeedbackTickIntervalPixels;
         }
 
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index b8385c6..e64274e 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -3139,15 +3139,6 @@
         public static final int PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS = 1 << 10;
 
         /**
-         * Flag to force the status bar window to be visible all the time. If the bar is hidden when
-         * this flag is set it will be shown again.
-         * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}.
-         *
-         * {@hide}
-         */
-        public static final int PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR = 1 << 11;
-
-        /**
          * Flag to indicate that the window frame should be the requested frame adding the display
          * cutout frame. This will only be applied if a specific size smaller than the parent frame
          * is given, and the window is covering the display cutout. The extended frame will not be
@@ -3238,15 +3229,6 @@
         public static final int PRIVATE_FLAG_NOT_MAGNIFIABLE = 1 << 22;
 
         /**
-         * Flag to indicate that the status bar window is in a state such that it forces showing
-         * the navigation bar unless the navigation bar window is explicitly set to
-         * {@link View#GONE}.
-         * It only takes effects if this is set by {@link LayoutParams#TYPE_STATUS_BAR}.
-         * @hide
-         */
-        public static final int PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION = 1 << 23;
-
-        /**
          * Flag to indicate that the window is color space agnostic, and the color can be
          * interpreted to any color space.
          * @hide
@@ -3334,7 +3316,6 @@
                 PRIVATE_FLAG_SYSTEM_ERROR,
                 PRIVATE_FLAG_OPTIMIZE_MEASURE,
                 PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS,
-                PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR,
                 PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT,
                 PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY,
                 PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME,
@@ -3345,7 +3326,6 @@
                 PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY,
                 PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION,
                 PRIVATE_FLAG_NOT_MAGNIFIABLE,
-                PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
                 PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                 PRIVATE_FLAG_USE_BLAST,
                 PRIVATE_FLAG_APPEARANCE_CONTROLLED,
@@ -3401,10 +3381,6 @@
                         equals = PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS,
                         name = "DISABLE_WALLPAPER_TOUCH_EVENTS"),
                 @ViewDebug.FlagToString(
-                        mask = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR,
-                        equals = PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR,
-                        name = "FORCE_STATUS_BAR_VISIBLE"),
-                @ViewDebug.FlagToString(
                         mask = PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT,
                         equals = PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_BY_CUTOUT,
                         name = "LAYOUT_SIZE_EXTENDED_BY_CUTOUT"),
@@ -3445,10 +3421,6 @@
                         equals = PRIVATE_FLAG_NOT_MAGNIFIABLE,
                         name = "NOT_MAGNIFIABLE"),
                 @ViewDebug.FlagToString(
-                        mask = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
-                        equals = PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
-                        name = "STATUS_FORCE_SHOW_NAVIGATION"),
-                @ViewDebug.FlagToString(
                         mask = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                         equals = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                         name = "COLOR_SPACE_AGNOSTIC"),
@@ -4412,6 +4384,16 @@
         public InsetsFrameProvider[] providedInsets;
 
         /**
+         * Specifies which {@link InsetsType}s should be forcibly shown. The types shown by this
+         * method won't affect the app's layout. This field only takes effects if the caller has
+         * {@link android.Manifest.permission#STATUS_BAR_SERVICE} or the caller has the same uid as
+         * the recents component.
+         *
+         * @hide
+         */
+        public @InsetsType int forciblyShownTypes;
+
+        /**
          * {@link LayoutParams} to be applied to the window when layout with a assigned rotation.
          * This will make layout during rotation change smoothly.
          *
@@ -4869,6 +4851,7 @@
             out.writeInt(mBlurBehindRadius);
             out.writeBoolean(mWallpaperTouchEventsEnabled);
             out.writeTypedArray(providedInsets, 0 /* parcelableFlags */);
+            out.writeInt(forciblyShownTypes);
             checkNonRecursiveParams();
             out.writeTypedArray(paramsForRotation, 0 /* parcelableFlags */);
             out.writeInt(mDisplayFlags);
@@ -4940,6 +4923,7 @@
             mBlurBehindRadius = in.readInt();
             mWallpaperTouchEventsEnabled = in.readBoolean();
             providedInsets = in.createTypedArray(InsetsFrameProvider.CREATOR);
+            forciblyShownTypes = in.readInt();
             paramsForRotation = in.createTypedArray(LayoutParams.CREATOR);
             mDisplayFlags = in.readInt();
         }
@@ -5245,6 +5229,11 @@
                 changes |= LAYOUT_CHANGED;
             }
 
+            if (forciblyShownTypes != o.forciblyShownTypes) {
+                forciblyShownTypes = o.forciblyShownTypes;
+                changes |= PRIVATE_FLAGS_CHANGED;
+            }
+
             if (paramsForRotation != o.paramsForRotation) {
                 if ((changes & LAYOUT_CHANGED) == 0) {
                     if (paramsForRotation != null && o.paramsForRotation != null
@@ -5482,6 +5471,11 @@
                     sb.append(prefix).append("    ").append(providedInsets[i]);
                 }
             }
+            if (forciblyShownTypes != 0) {
+                sb.append(System.lineSeparator());
+                sb.append(prefix).append("  forciblyShownTypes=").append(
+                        WindowInsets.Type.toString(forciblyShownTypes));
+            }
             if (paramsForRotation != null && paramsForRotation.length != 0) {
                 sb.append(System.lineSeparator());
                 sb.append(prefix).append("  paramsForRotation:");
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index a116542..26ceea6 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4520,7 +4520,8 @@
                     if (!trackMotionScroll(delta, delta)) {
                         if (Flags.platformWidgetHapticScrollFeedback()) {
                             initHapticScrollFeedbackProviderIfNotExists();
-                            mHapticScrollFeedbackProvider.onScrollProgress(event, axis, delta);
+                            mHapticScrollFeedbackProvider.onScrollProgress(
+                                    event.getDeviceId(), event.getSource(), axis, delta);
                         }
                         initDifferentialFlingHelperIfNotExists();
                         mDifferentialMotionFlingHelper.onMotionEvent(event, axis);
@@ -4536,7 +4537,8 @@
                         if (Flags.platformWidgetHapticScrollFeedback()) {
                             initHapticScrollFeedbackProviderIfNotExists();
                             mHapticScrollFeedbackProvider.onScrollLimit(
-                                    event, axis, /* isStart= */ hitTopLimit);
+                                    event.getDeviceId(), event.getSource(), axis,
+                                    /* isStart= */ hitTopLimit);
                         }
                         if (hitTopLimit) {
                             mEdgeGlowTop.onPullDistance(overscroll, 0.5f);
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 90b077b..e0e72ba 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -1014,12 +1014,14 @@
                             if (Flags.platformWidgetHapticScrollFeedback()) {
                                 initHapticScrollFeedbackProviderIfNotExists();
                                 mHapticScrollFeedbackProvider.onScrollLimit(
-                                        event, axis, /* isStart= */ newScrollY == 0);
+                                        event.getDeviceId(), event.getSource(), axis,
+                                        /* isStart= */ newScrollY == 0);
                             }
                         } else {
                             if (Flags.platformWidgetHapticScrollFeedback()) {
                                 initHapticScrollFeedbackProviderIfNotExists();
-                                mHapticScrollFeedbackProvider.onScrollProgress(event, axis, delta);
+                                mHapticScrollFeedbackProvider.onScrollProgress(
+                                        event.getDeviceId(), event.getSource(), axis, delta);
                             }
                             initDifferentialFlingHelperIfNotExists();
                             mDifferentialMotionFlingHelper.onMotionEvent(event, axis);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index f6b337c..59344b0 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -27,12 +27,14 @@
 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 static com.android.text.flags.Flags.FLAG_USE_BOUNDS_FOR_WIDTH;
 
 import android.R;
 import android.annotation.CallSuper;
 import android.annotation.CheckResult;
 import android.annotation.ColorInt;
 import android.annotation.DrawableRes;
+import android.annotation.FlaggedApi;
 import android.annotation.FloatRange;
 import android.annotation.IntDef;
 import android.annotation.IntRange;
@@ -238,6 +240,7 @@
 import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.FastMath;
 import com.android.internal.util.Preconditions;
+import com.android.text.flags.Flags;
 
 import libcore.util.EmptyArray;
 
@@ -523,6 +526,15 @@
     @EnabledSince(targetSdkVersion = Build.VERSION_CODES.P)
     public static final long STATICLAYOUT_FALLBACK_LINESPACING = 37756858; // buganizer id
 
+
+    /**
+     * This change ID enables the bounding box based layout.
+     * @hide
+     */
+    @ChangeId
+    @EnabledSince(targetSdkVersion = VERSION_CODES.VANILLA_ICE_CREAM)
+    public static final long USE_BOUNDS_FOR_WIDTH = 63938206;  // buganizer id
+
     // System wide time for last cut, copy or text changed action.
     static long sLastCutCopyOrTextChangedTime;
 
@@ -1621,7 +1633,11 @@
             mUseFallbackLineSpacing = FALLBACK_LINE_SPACING_NONE;
         }
 
-        mUseBoundsForWidth = false;  // TODO: Make enable this by default.
+        if (CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH)) {
+            mUseBoundsForWidth = Flags.useBoundsForWidth();
+        } else {
+            mUseBoundsForWidth = false;
+        }
 
         // TODO(b/179693024): Use a ChangeId instead.
         mUseTextPaddingForUiTranslation = targetSdkVersion <= Build.VERSION_CODES.R;
@@ -4848,6 +4864,7 @@
      *                          width.
      * @see #getUseBoundsForWidth()
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public void setUseBoundsForWidth(boolean useBoundsForWidth) {
         if (mUseBoundsForWidth != useBoundsForWidth) {
             mUseBoundsForWidth = useBoundsForWidth;
@@ -4865,6 +4882,7 @@
      * @see #setUseBoundsForWidth(boolean)
      * @return True if using bounding box for width, false if using advance for width.
      */
+    @FlaggedApi(FLAG_USE_BOUNDS_FOR_WIDTH)
     public boolean getUseBoundsForWidth() {
         return mUseBoundsForWidth;
     }
diff --git a/core/java/android/widget/ToastPresenter.java b/core/java/android/widget/ToastPresenter.java
index 89271b5..6884e63 100644
--- a/core/java/android/widget/ToastPresenter.java
+++ b/core/java/android/widget/ToastPresenter.java
@@ -89,9 +89,10 @@
         return view;
     }
 
+    private final WeakReference<Context> mContext;
     private final Resources mResources;
     private final WeakReference<WindowManager> mWindowManager;
-    private final WeakReference<AccessibilityManager> mAccessibilityManager;
+    private final IAccessibilityManager mAccessibilityManagerService;
     private final INotificationManager mNotificationManager;
     private final String mPackageName;
     private final String mContextPackageName;
@@ -101,21 +102,14 @@
 
     public ToastPresenter(Context context, IAccessibilityManager accessibilityManager,
             INotificationManager notificationManager, String packageName) {
+        mContext = new WeakReference<>(context);
         mResources = context.getResources();
         mWindowManager = new WeakReference<>(context.getSystemService(WindowManager.class));
         mNotificationManager = notificationManager;
         mPackageName = packageName;
         mContextPackageName = context.getPackageName();
         mParams = createLayoutParams();
-
-        // We obtain AccessibilityManager manually via its constructor instead of using method
-        // AccessibilityManager.getInstance() for 2 reasons:
-        //   1. We want to be able to inject IAccessibilityManager in tests to verify behavior.
-        //   2. getInstance() caches the instance for the process even if we pass a different
-        //      context to it. This is problematic for multi-user because callers can pass a context
-        //      created via Context.createContextAsUser().
-        mAccessibilityManager = new WeakReference<>(
-                new AccessibilityManager(context, accessibilityManager, context.getUserId()));
+        mAccessibilityManagerService = accessibilityManager;
     }
 
     public String getPackageName() {
@@ -306,11 +300,20 @@
      * enabled.
      */
     public void trySendAccessibilityEvent(View view, String packageName) {
-        final AccessibilityManager accessibilityManager = mAccessibilityManager.get();
-        if (accessibilityManager == null) {
+        final Context context = mContext.get();
+        if (context == null) {
             return;
         }
 
+        // We obtain AccessibilityManager manually via its constructor instead of using method
+        // AccessibilityManager.getInstance() for 2 reasons:
+        //   1. We want to be able to inject IAccessibilityManager in tests to verify behavior.
+        //   2. getInstance() caches the instance for the process even if we pass a different
+        //      context to it. This is problematic for multi-user because callers can pass a context
+        //      created via Context.createContextAsUser().
+        final AccessibilityManager accessibilityManager = new AccessibilityManager(context,
+                    mAccessibilityManagerService, context.getUserId());
+
         if (!accessibilityManager.isEnabled()) {
             accessibilityManager.removeClient();
             return;
diff --git a/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig b/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig
new file mode 100644
index 0000000..f1d981a
--- /dev/null
+++ b/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.window.flags"
+
+flag {
+  name: "letterbox_background_wallpaper_flag"
+  namespace: "large_screen_experiences_app_compat"
+  description: "Whether the letterbox wallpaper style is enabled by default"
+  bug: "297195682"
+}
diff --git a/core/java/android/window/flags/windowing_frontend.aconfig b/core/java/android/window/flags/windowing_frontend.aconfig
new file mode 100644
index 0000000..7a4c5bc
--- /dev/null
+++ b/core/java/android/window/flags/windowing_frontend.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.window.flags"
+
+flag {
+  name: "nav_bar_transparent_by_default"
+  namespace: "windowing_frontend"
+  description: "Make nav bar color transparent by default when targeting SDK 35 or greater"
+  bug: "232195501"
+}
diff --git a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
index 5e2eceb..dee4935 100644
--- a/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/AbstractMultiProfilePagerAdapter.java
@@ -177,7 +177,7 @@
      * <code>1</code> would return the work profile {@link ProfileDescriptor}.</li>
      * </ul>
      */
-    abstract ProfileDescriptor getItem(int pageIndex);
+    public abstract ProfileDescriptor getItem(int pageIndex);
 
     /**
      * Returns the number of {@link ProfileDescriptor} objects.
@@ -438,8 +438,8 @@
                     && isQuietModeEnabled(mWorkProfileUserHandle));
     }
 
-    protected class ProfileDescriptor {
-        final ViewGroup rootView;
+    public static class ProfileDescriptor {
+        public final ViewGroup rootView;
         private final ViewGroup mEmptyStateView;
         ProfileDescriptor(ViewGroup rootView) {
             this.rootView = rootView;
diff --git a/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java b/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
index b9f0236..d2fdc65 100644
--- a/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
+++ b/core/java/com/android/internal/app/AppPredictionServiceResolverComparator.java
@@ -61,6 +61,8 @@
     private final ModelBuilder mModelBuilder;
     private ResolverComparatorModel mComparatorModel;
 
+    private ResolverAppPredictorCallback mSortingCallback;
+
     // If this is non-null (and this is not destroyed), it means APS is disabled and we should fall
     // back to using the ResolverRankerService.
     // TODO: responsibility for this fallback behavior can live outside of the AppPrediction client.
@@ -94,6 +96,9 @@
             // TODO: may not be necessary to build a new model, since we're destroying anyways.
             mComparatorModel = mModelBuilder.buildFallbackModel(mResolverRankerService);
         }
+        if (mSortingCallback != null) {
+            mSortingCallback.destroy();
+        }
     }
 
     @Override
@@ -140,22 +145,27 @@
                     .setClassName(target.name.getClassName())
                     .build());
         }
+
+        if (mSortingCallback != null) {
+            mSortingCallback.destroy();
+        }
+        mSortingCallback = new ResolverAppPredictorCallback(sortedAppTargets -> {
+            if (sortedAppTargets.isEmpty()) {
+                Log.i(TAG, "AppPredictionService disabled. Using resolver.");
+                setupFallbackModel(targets);
+            } else {
+                Log.i(TAG, "AppPredictionService response received");
+                // Skip sending to Handler which takes extra time to dispatch messages.
+                // TODO: the Handler guards some concurrency conditions, so this could
+                // probably result in a race (we're not currently on the Handler thread?).
+                // We'll leave this as-is since we intend to remove the Handler design
+                // shortly, but this is still an unsound shortcut.
+                handleResult(sortedAppTargets);
+            }
+        });
+
         mAppPredictor.sortTargets(appTargets, Executors.newSingleThreadExecutor(),
-                sortedAppTargets -> {
-                    if (sortedAppTargets.isEmpty()) {
-                        Log.i(TAG, "AppPredictionService disabled. Using resolver.");
-                        setupFallbackModel(targets);
-                    } else {
-                        Log.i(TAG, "AppPredictionService response received");
-                        // Skip sending to Handler which takes extra time to dispatch messages.
-                        // TODO: the Handler guards some concurrency conditions, so this could
-                        // probably result in a race (we're not currently on the Handler thread?).
-                        // We'll leave this as-is since we intend to remove the Handler design
-                        // shortly, but this is still an unsound shortcut.
-                        handleResult(sortedAppTargets);
-                    }
-                }
-        );
+                mSortingCallback.asConsumer());
     }
 
     private void setupFallbackModel(List<ResolvedComponentInfo> targets) {
diff --git a/core/java/com/android/internal/app/ChooserActivity.java b/core/java/com/android/internal/app/ChooserActivity.java
index 2b39bb4..6d8512c 100644
--- a/core/java/com/android/internal/app/ChooserActivity.java
+++ b/core/java/com/android/internal/app/ChooserActivity.java
@@ -24,9 +24,7 @@
 import static android.content.ContentProvider.getUserIdFromUri;
 import static android.stats.devicepolicy.DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_SHARING_TO_PERSONAL;
 import static android.stats.devicepolicy.DevicePolicyEnums.RESOLVER_EMPTY_STATE_NO_SHARING_TO_WORK;
-
 import static com.android.internal.util.LatencyTracker.ACTION_LOAD_SHARE_SHEET;
-
 import static java.lang.annotation.RetentionPolicy.SOURCE;
 
 import android.animation.Animator;
@@ -777,9 +775,9 @@
         return appPredictor;
     }
 
-    private AppPredictor.Callback createAppPredictorCallback(
+    private ResolverAppPredictorCallback createAppPredictorCallback(
             ChooserListAdapter chooserListAdapter) {
-        return resultList -> {
+        return new ResolverAppPredictorCallback(resultList -> {
             if (isFinishing() || isDestroyed()) {
                 return;
             }
@@ -811,7 +809,7 @@
             }
             sendShareShortcutInfoList(shareShortcutInfos, chooserListAdapter, resultList,
                     chooserListAdapter.getUserHandle());
-        };
+        });
     }
 
     static SharedPreferences getPinnedSharedPrefs(Context context) {
@@ -2559,10 +2557,13 @@
             boolean filterLastUsed, UserHandle userHandle) {
         ChooserListAdapter chooserListAdapter = createChooserListAdapter(context, payloadIntents,
                 initialIntents, rList, filterLastUsed, userHandle);
-        AppPredictor.Callback appPredictorCallback = createAppPredictorCallback(chooserListAdapter);
+        ResolverAppPredictorCallback appPredictorCallbackWrapper =
+                createAppPredictorCallback(chooserListAdapter);
+        AppPredictor.Callback appPredictorCallback = appPredictorCallbackWrapper.asCallback();
         AppPredictor appPredictor = setupAppPredictorForUser(userHandle, appPredictorCallback);
         chooserListAdapter.setAppPredictor(appPredictor);
-        chooserListAdapter.setAppPredictorCallback(appPredictorCallback);
+        chooserListAdapter.setAppPredictorCallback(
+                appPredictorCallback, appPredictorCallbackWrapper);
         return new ChooserGridAdapter(chooserListAdapter);
     }
 
diff --git a/core/java/com/android/internal/app/ChooserListAdapter.java b/core/java/com/android/internal/app/ChooserListAdapter.java
index 1eecb41..f77e718 100644
--- a/core/java/com/android/internal/app/ChooserListAdapter.java
+++ b/core/java/com/android/internal/app/ChooserListAdapter.java
@@ -103,6 +103,7 @@
     // Sorted list of DisplayResolveInfos for the alphabetical app section.
     private List<DisplayResolveInfo> mSortedList = new ArrayList<>();
     private AppPredictor mAppPredictor;
+    private ResolverAppPredictorCallback mAppPredictorCallbackWrapper;
     private AppPredictor.Callback mAppPredictorCallback;
 
     // Represents the UserSpace in which the Initial Intents should be resolved.
@@ -747,8 +748,11 @@
         mAppPredictor = appPredictor;
     }
 
-    public void setAppPredictorCallback(AppPredictor.Callback appPredictorCallback) {
+    public void setAppPredictorCallback(
+            AppPredictor.Callback appPredictorCallback,
+            ResolverAppPredictorCallback appPredictorCallbackWrapper) {
         mAppPredictorCallback = appPredictorCallback;
+        mAppPredictorCallbackWrapper = appPredictorCallbackWrapper;
     }
 
     public void destroyAppPredictor() {
@@ -757,6 +761,10 @@
             getAppPredictor().destroy();
             setAppPredictor(null);
         }
+
+        if (mAppPredictorCallbackWrapper != null) {
+            mAppPredictorCallbackWrapper.destroy();
+        }
     }
 
     /**
diff --git a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
index 7beb059..8197e26 100644
--- a/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ChooserMultiProfilePagerAdapter.java
@@ -94,7 +94,7 @@
     }
 
     @Override
-    ChooserProfileDescriptor getItem(int pageIndex) {
+    public ChooserProfileDescriptor getItem(int pageIndex) {
         return mItems[pageIndex];
     }
 
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index ac15f11..7534d29 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -2623,13 +2623,13 @@
      * An a11y delegate that expands resolver drawer when gesture navigation reaches a partially
      * invisible target in the list.
      */
-    private static class AppListAccessibilityDelegate extends View.AccessibilityDelegate {
+    public static class AppListAccessibilityDelegate extends View.AccessibilityDelegate {
         private final ResolverDrawerLayout mDrawer;
         @Nullable
         private final View mBottomBar;
         private final Rect mRect = new Rect();
 
-        private AppListAccessibilityDelegate(ResolverDrawerLayout drawer) {
+        public AppListAccessibilityDelegate(ResolverDrawerLayout drawer) {
             mDrawer = drawer;
             mBottomBar = mDrawer.findViewById(R.id.button_bar_container);
         }
diff --git a/core/java/com/android/internal/app/ResolverAppPredictorCallback.java b/core/java/com/android/internal/app/ResolverAppPredictorCallback.java
new file mode 100644
index 0000000..c35e536
--- /dev/null
+++ b/core/java/com/android/internal/app/ResolverAppPredictorCallback.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.app;
+
+import android.app.prediction.AppPredictor;
+import android.app.prediction.AppTarget;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.function.Consumer;
+
+/**
+ * Callback wrapper that works around potential memory leaks in app predictor.
+ *
+ * Nulls the callback itself when destroyed, so at worst you'll leak just this object.
+ */
+public class ResolverAppPredictorCallback {
+    private volatile Consumer<List<AppTarget>> mCallback;
+
+    public ResolverAppPredictorCallback(Consumer<List<AppTarget>> callback) {
+        mCallback = callback;
+    }
+
+    private void notifyCallback(List<AppTarget> list) {
+        Consumer<List<AppTarget>> callback = mCallback;
+        if (callback != null) {
+            callback.accept(Objects.requireNonNullElseGet(list, List::of));
+        }
+    }
+
+    public Consumer<List<AppTarget>> asConsumer() {
+        return this::notifyCallback;
+    }
+
+    public AppPredictor.Callback asCallback() {
+        return this::notifyCallback;
+    }
+
+    public void destroy() {
+        mCallback = null;
+    }
+}
diff --git a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
index 7677912..031f9d3 100644
--- a/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
+++ b/core/java/com/android/internal/app/ResolverMultiProfilePagerAdapter.java
@@ -79,7 +79,7 @@
     }
 
     @Override
-    ResolverProfileDescriptor getItem(int pageIndex) {
+    public ResolverProfileDescriptor getItem(int pageIndex) {
         return mItems[pageIndex];
     }
 
diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java
index 1ed06b4..1bfb51c 100644
--- a/core/java/com/android/internal/jank/InteractionJankMonitor.java
+++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java
@@ -70,7 +70,6 @@
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON;
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL;
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_DIALOG_OPEN;
-import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR;
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR;
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_DISAPPEAR;
 import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_ADD;
@@ -269,7 +268,6 @@
      * eg: Exit the app using back gesture.
      */
     public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK = 78;
-    public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR = 79;
     public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80;
     public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81;
 
@@ -364,7 +362,7 @@
         CUJ_TO_STATSD_INTERACTION_TYPE[76] = NO_STATSD_LOGGING;
         CUJ_TO_STATSD_INTERACTION_TYPE[77] = NO_STATSD_LOGGING;
         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK;
-        CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_EXPAND_FROM_STATUS_BAR] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR;
+        CUJ_TO_STATSD_INTERACTION_TYPE[79] = NO_STATSD_LOGGING; // This is deprecated.
         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION;
         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION;
         CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
@@ -467,7 +465,6 @@
             CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION,
             CUJ_LAUNCHER_OPEN_SEARCH_RESULT,
             CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK,
-            CUJ_SHADE_EXPAND_FROM_STATUS_BAR,
             CUJ_IME_INSETS_SHOW_ANIMATION,
             CUJ_IME_INSETS_HIDE_ANIMATION,
             CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER,
@@ -1082,8 +1079,6 @@
                 return "LAUNCHER_OPEN_SEARCH_RESULT";
             case CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK:
                 return "LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK";
-            case CUJ_SHADE_EXPAND_FROM_STATUS_BAR:
-                return "SHADE_EXPAND_FROM_STATUS_BAR";
             case CUJ_IME_INSETS_SHOW_ANIMATION:
                 return "IME_INSETS_SHOW_ANIMATION";
             case CUJ_IME_INSETS_HIDE_ANIMATION:
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 3e16df4d..1be916f 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1160,7 +1160,9 @@
                     mForceWindowDrawsBarBackgrounds, requestedVisibleTypes);
             boolean oldDrawLegacy = mDrawLegacyNavigationBarBackground;
             mDrawLegacyNavigationBarBackground =
-                    (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
+                    ((requestedVisibleTypes | mLastForceConsumingTypes)
+                            & WindowInsets.Type.navigationBars()) != 0
+                    && (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
             if (oldDrawLegacy != mDrawLegacyNavigationBarBackground) {
                 mDrawLegacyNavigationBarBackgroundHandled =
                         mWindow.onDrawLegacyNavigationBarBackgroundChanged(
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 9b9e010..9b5a3f7 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -333,6 +333,8 @@
     private long mBackgroundFadeDurationMillis = -1;
     private Boolean mSharedElementsUseOverlay;
 
+    private Boolean mAllowFloatingWindowsFillScreen;
+
     private boolean mIsStartingWindow;
     private int mTheme = -1;
 
@@ -361,6 +363,8 @@
         mRenderShadowsInCompositor = Settings.Global.getInt(context.getContentResolver(),
                 DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR, 1) != 0;
         mProxyOnBackInvokedDispatcher = new ProxyOnBackInvokedDispatcher(context);
+        mAllowFloatingWindowsFillScreen = context.getResources().getBoolean(
+                com.android.internal.R.bool.config_allowFloatingWindowsFillScreen);
     }
 
     /**
@@ -2422,7 +2426,7 @@
         mIsFloating = a.getBoolean(R.styleable.Window_windowIsFloating, false);
         int flagsToUpdate = (FLAG_LAYOUT_IN_SCREEN|FLAG_LAYOUT_INSET_DECOR)
                 & (~getForcedWindowFlags());
-        if (mIsFloating) {
+        if (mIsFloating && !mAllowFloatingWindowsFillScreen) {
             setLayout(WRAP_CONTENT, WRAP_CONTENT);
             setFlags(0, flagsToUpdate);
         } else {
diff --git a/core/java/com/android/internal/policy/TransitionAnimation.java b/core/java/com/android/internal/policy/TransitionAnimation.java
index 483a184..8f4df80 100644
--- a/core/java/com/android/internal/policy/TransitionAnimation.java
+++ b/core/java/com/android/internal/policy/TransitionAnimation.java
@@ -1304,8 +1304,9 @@
         t.setBuffer(layer, buffer.getHardwareBuffer());
         t.setDataSpace(layer, buffer.getColorSpace().getDataSpace());
         // Avoid showing dimming effect for HDR content when running animations.
-        // TODO(b/298219334): Only do this if we know we already dimmed in the screenshot
-        t.setDimmingEnabled(layer, false);
+        if (buffer.containsHdrLayers()) {
+            t.setDimmingEnabled(layer, false);
+        }
     }
 
     /** Returns whether the hardware buffer passed in is marked as protected. */
diff --git a/core/java/com/android/internal/usb/DumpUtils.java b/core/java/com/android/internal/usb/DumpUtils.java
index f974d9d..21c3e7b 100644
--- a/core/java/com/android/internal/usb/DumpUtils.java
+++ b/core/java/com/android/internal/usb/DumpUtils.java
@@ -16,6 +16,7 @@
 
 package com.android.internal.usb;
 
+import static android.hardware.usb.UsbPort.FLAG_ALT_MODE_TYPE_DISPLAYPORT;
 import static android.hardware.usb.UsbPortStatus.MODE_AUDIO_ACCESSORY;
 import static android.hardware.usb.UsbPortStatus.MODE_DEBUG_ACCESSORY;
 import static android.hardware.usb.UsbPortStatus.MODE_DFP;
@@ -26,6 +27,7 @@
 import static com.android.internal.util.dump.DumpUtils.writeStringIfNotNull;
 
 import android.annotation.NonNull;
+import android.hardware.usb.DisplayPortAltModeInfo;
 import android.hardware.usb.UsbAccessory;
 import android.hardware.usb.UsbConfiguration;
 import android.hardware.usb.UsbDevice;
@@ -177,6 +179,10 @@
         dump.write("supports_compliance_warnings",
                 UsbPortProto.SUPPORTS_COMPLIANCE_WARNINGS,
                 port.supportsComplianceWarnings());
+        if (port.isAltModeSupported(FLAG_ALT_MODE_TYPE_DISPLAYPORT)) {
+            dump.write("supported_alt_modes", UsbPortProto.SUPPORTED_ALT_MODES,
+                    FLAG_ALT_MODE_TYPE_DISPLAYPORT);
+        }
 
         dump.end(token);
     }
@@ -255,6 +261,12 @@
                 UsbPort.powerBrickConnectionStatusToString(status.getPowerBrickConnectionStatus()));
         dump.write("compliance_warning_status", UsbPortStatusProto.COMPLIANCE_WARNINGS_STRING,
                 UsbPort.complianceWarningsToString(status.getComplianceWarnings()));
+        DisplayPortAltModeInfo displayPortAltModeInfo = status.getDisplayPortAltModeInfo();
+        if (displayPortAltModeInfo != null) {
+            dump.write("displayport_alt_mode_status",
+                    UsbPortStatusProto.DISPLAYPORT_ALT_MODE_STATUS,
+                    status.getDisplayPortAltModeInfo().toString());
+        }
         dump.end(token);
     }
 }
diff --git a/core/java/com/android/internal/util/FileRotator.java b/core/java/com/android/internal/util/FileRotator.java
index 5bc48c5..c9d9926 100644
--- a/core/java/com/android/internal/util/FileRotator.java
+++ b/core/java/com/android/internal/util/FileRotator.java
@@ -19,6 +19,9 @@
 import android.annotation.NonNull;
 import android.os.FileUtils;
 import android.util.Log;
+import android.util.Pair;
+
+import libcore.io.IoUtils;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -28,12 +31,12 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.Comparator;
 import java.util.Objects;
+import java.util.TreeSet;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
-import libcore.io.IoUtils;
-
 /**
  * Utility that rotates files over time, similar to {@code logrotate}. There is
  * a single "active" file, which is periodically rotated into historical files,
@@ -302,17 +305,24 @@
     public void readMatching(Reader reader, long matchStartMillis, long matchEndMillis)
             throws IOException {
         final FileInfo info = new FileInfo(mPrefix);
+        final TreeSet<Pair<Long, String>> readSet = new TreeSet<>(
+                Comparator.comparingLong(o -> o.first));
         for (String name : mBasePath.list()) {
             if (!info.parse(name)) continue;
 
-            // read file when it overlaps
+            // Add file to set when it overlaps.
             if (info.startMillis <= matchEndMillis && matchStartMillis <= info.endMillis) {
-                if (LOGD) Log.d(TAG, "reading matching " + name);
-
-                final File file = new File(mBasePath, name);
-                readFile(file, reader);
+                readSet.add(new Pair(info.startMillis, name));
             }
         }
+
+        // Read files in ascending order of start timestamp.
+        for (Pair<Long, String> pair : readSet) {
+            final String name = pair.second;
+            if (LOGD) Log.d(TAG, "reading matching " + name);
+            final File file = new File(mBasePath, name);
+            readFile(file, reader);
+        }
     }
 
     /**
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index c368fa8..56066b2 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -1806,15 +1806,10 @@
     if (!is_system_server && getuid() == 0) {
         const int rc = createProcessGroup(uid, getpid());
         if (rc != 0) {
-            if (rc == -ESRCH) {
-                // If process is dead, treat this as a non-fatal error
-                ALOGE("createProcessGroup(%d, %d) failed: %s", uid, /* pid= */ 0, strerror(-rc));
-            } else {
-                fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "
-                                                    "CONFIG_CGROUP_CPUACCT?")
-                                     : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid,
-                                                    /* pid= */ 0, strerror(-rc)));
-            }
+            fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "
+                                                "CONFIG_CGROUP_CPUACCT?")
+                                 : CREATE_ERROR("createProcessGroup(%d, %d) failed: %s", uid,
+                                                /* pid= */ 0, strerror(-rc)));
         }
     }
 
diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto
index ad88092..6c93680 100644
--- a/core/proto/android/providers/settings/secure.proto
+++ b/core/proto/android/providers/settings/secure.proto
@@ -139,6 +139,7 @@
         optional SettingProto touch_gesture_enabled = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
         optional SettingProto long_press_home_enabled = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
         optional SettingProto search_press_hold_nav_handle_enabled = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
+        optional SettingProto search_long_press_home_enabled = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
     }
     optional Assist assist = 7;
 
diff --git a/core/proto/android/service/usb.proto b/core/proto/android/service/usb.proto
index 8889320..49b8450 100644
--- a/core/proto/android/service/usb.proto
+++ b/core/proto/android/service/usb.proto
@@ -238,10 +238,15 @@
         MODE_DEBUG_ACCESSORY = 8;
     }
 
+    enum AltMode {
+        ALT_MODE_DISPLAYPORT = 1;
+    }
+
     // ID of the port. A device (eg: Chromebooks) might have multiple ports.
     optional string id = 1;
     repeated Mode supported_modes = 2;
     optional bool supports_compliance_warnings = 3;
+    repeated AltMode supported_alt_modes = 4;
 }
 
 message UsbPortStatusProto {
@@ -271,6 +276,7 @@
     optional bool is_power_transfer_limited = 8;
     optional string usb_power_brick_status = 9;
     optional string compliance_warnings_string = 10;
+    optional string displayport_alt_mode_status = 11;
 }
 
 message UsbPortStatusRoleCombinationProto {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 32fe4e3..3180ffb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1466,10 +1466,9 @@
 
     <!-- Allows an application to initiate a phone call without going through
         the Dialer user interface for the user to confirm the call.
-        <p>
-        <em>Note: An app holding this permission can also call carrier MMI codes to change settings
-        such as call forwarding or call waiting preferences.
-        <p>Protection level: dangerous
+        <p class="note"><b>Note:</b> An app holding this permission can also call carrier MMI
+        codes to change settings such as call forwarding or call waiting preferences.</p>
+        <p>Protection level: dangerous</p>
     -->
     <permission android:name="android.permission.CALL_PHONE"
         android:permissionGroup="android.permission-group.UNDEFINED"
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 8109e9a..8ffdba3 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2ኛ ሥራ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3ኛ ሥራ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>ን አባዛ"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"የግል <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ከመንቀል በፊት ፒን ጠይቅ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ከመንቀል በፊት የማስከፈቻ ስርዓተ-ጥለት ጠይቅ"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ከመንቀል በፊት የይለፍ ቃል ጠይቅ"</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index f2aee40..0ca9ea2 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"২য় কার্য <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"৩য় কার্য <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"ক্ল’ন <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"ব্যক্তিগত <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"আনপিন কৰাৰ পূৰ্বে পিন দিবলৈ কওক"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"আনপিন কৰাৰ পূৰ্বে আনলক আৰ্হি দিবলৈ কওক"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"আনপিন কৰাৰ পূৰ্বে পাছৱৰ্ড দিবলৈ কওক"</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 592c344..74ba52d 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -807,7 +807,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Dozvoljava vlasniku da ažurira aplikaciju koju je prethodno instalirala bez radnji korisnika"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Podešavanje pravila za lozinku"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Kontroliše dužinu i znakove dozvoljene u lozinkama i PIN-ovima za zaključavanje ekrana."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadgledajte pokušaje otključavanja ekrana"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadzor pokušaja otključavanja ekrana"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Prati broj netačno unetih lozinki prilikom otključavanja ekrana i zaključava tablet ili briše podatke sa tableta ako je netačna lozinka uneta previše puta."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Nadgleda broj netačnih lozinki unetih pri otključavanju ekrana i zaključava Android TV uređaj ili briše sve podatke sa Android TV uređaja ako se unese previše netačnih lozinki."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Prati broj netačno unetih lozinki pri otključavanju ekrana i zaključava sistem za info-zabavu ili briše sve podatke sa sistema za info-zabavu ako je netačna lozinka uneta previše puta."</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 4cd8aa58..3a79090 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -812,7 +812,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Сачыць за колькасцю няправільных набраных пароляў падчас разблакоўкі экрана і блакаваць планшэт або сціраць усе дадзеныя на ім, калі няправільны пароль набраны занадта шмат разоў."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і заблакіраваць прыладу Android TV або сцерці ўсе даныя на прыладзе, калі няправільны пароль набраны занадта шмат разоў."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Падчас разблакіроўкі экрана сачыць за колькасцю няправільна набраных пароляў і, калі няправільны пароль набраны занадта шмат разоў, заблакіраваць інфармацыйна-забаўляльную сістэму ці сцерці ў ёй усе даныя."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Сачыць за колькасцю няправільных набраных пароляў падчас разблакоўкі экрана і блакаваць тяэлефон або сціраць усе дадзеныя на ім, калі набрана занадта шмат няправільных пароляў."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і блакіраваць тэлефон або сціраць усе даныя на ім, калі набрана занадта шмат няправільных пароляў."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і блакіраваць планшэт або сцерці ўсе даныя гэтага карыстальніка, калі няправільны пароль набраны занадта шмат разоў."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Сачыць за колькасцю няправільна набраных пароляў падчас разблакіроўкі экрана і заблакіраваць прыладу Android TV або сцерці ўсе даныя карыстальніка, калі няправільны пароль набраны занадта шмат разоў."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Падчас разблакіроўкі экрана сачыць за колькасцю няправільна набраных пароляў і, калі няправільны пароль набраны занадта шмат разоў, заблакіраваць інфармацыйна-забаўляльную сістэму ці сцерці ўсе даныя гэтага профілю."</string>
@@ -1869,8 +1869,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Другая праца <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Трэцяя праца <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Кланіраваць \"<xliff:g id="LABEL">%1$s</xliff:g>\""</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (прыватны профіль)"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Запытваць PIN-код перад адмацаваннем"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запытваць узор разблакіроўкі перад адмацаваннем"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запытваць пароль перад адмацаваннем"</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index 1d1e29c..f6f5b0e 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"দ্বিতীয় কার্যক্ষেত্র <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"তৃতীয় কার্যক্ষেত্র <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ক্লোন"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"ব্যক্তিগত <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"আনপিন করার আগে পিন চান"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"আনপিন করার আগে আনলক প্যাটার্ন চান"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"আনপিন করার আগে পাসওয়ার্ড চান"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 5ec91f5..010e22c 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2n <xliff:g id="LABEL">%1$s</xliff:g> de la feina"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3r <xliff:g id="LABEL">%1$s</xliff:g> de la feina"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Clon de <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Sol·licita el PIN per deixar de fixar"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Sol·licita el patró de desbloqueig per deixar de fixar"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Demana la contrasenya per deixar de fixar"</string>
@@ -1891,8 +1890,8 @@
     <string name="zen_mode_duration_hours" msgid="7841806065034711849">"{count,plural, =1{Durant 1 hora}many{Durant # hores}other{Durant # hores}}"</string>
     <string name="zen_mode_duration_hours_short" msgid="3666949653933099065">"{count,plural, =1{Durant 1 h}many{Durant # h}other{Durant # h}}"</string>
     <string name="zen_mode_until_next_day" msgid="1403042784161725038">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
-    <string name="zen_mode_until" msgid="2250286190237669079">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
-    <string name="zen_mode_alarm" msgid="7046911727540499275">"Fins a les <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (propera alarma)"</string>
+    <string name="zen_mode_until" msgid="2250286190237669079">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+    <string name="zen_mode_alarm" msgid="7046911727540499275">"Finalitza: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (propera alarma)"</string>
     <string name="zen_mode_forever" msgid="740585666364912448">"Fins que no el desactivis"</string>
     <string name="zen_mode_forever_dnd" msgid="3423201955704180067">"Fins que desactivis el mode No molestis"</string>
     <string name="zen_mode_rule_name_combination" msgid="7174598364351313725">"<xliff:g id="FIRST">%1$s</xliff:g> / <xliff:g id="REST">%2$s</xliff:g>"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index ca2206c..e816391 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -672,12 +672,12 @@
     <string name="device_unlock_notification_name" msgid="2632928999862915709">"Enhedsoplåsning"</string>
     <string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prøv en anden metode til oplåsning"</string>
     <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Brug ansigtsoplåsning, hvis dit fingeraftryk ikke genkendes, f.eks. når du har våde fingre"</string>
-    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Brug oplåsning med fingeraftryk, hvis dit ansigt ikke genkendes, f.eks. når der ikke er nok lys"</string>
+    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Brug fingeroplåsning, hvis dit ansigt ikke genkendes, f.eks. når der ikke er nok lys"</string>
     <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Ansigtsoplåsning"</string>
     <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Der er et problem med Ansigtsoplåsning"</string>
     <string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Tryk for at slette din ansigtsmodel, og tilføj derefter dit ansigt igen"</string>
     <string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Hvis du vil bruge ansigtsoplåsning, skal du aktivere "<b>"Kameraadgang"</b>" under Indstillinger &gt; Privatliv"</string>
-    <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Oplåsning med fingeraftryk"</string>
+    <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Fingeroplåsning"</string>
     <string name="fingerprint_recalibrate_notification_title" msgid="2406561052064558497">"Fingeraftrykssensoren kan ikke bruges"</string>
     <string name="fingerprint_recalibrate_notification_content" msgid="8519935717822194943">"Få den repareret."</string>
     <string name="face_acquired_insufficient" msgid="6889245852748492218">"Din ansigtsmodel kan ikke oprettes. Prøv igen."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> til arbejde"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> til arbejde"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon af <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (privat)"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Bed om pinkode inden frigørelse"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Bed om oplåsningsmønster ved deaktivering"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Bed om adgangskode inden frigørelse"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index be511e8..3f960f7 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> (geschäftlich)"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> (geschäftlich)"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (privat)"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Vor dem Beenden nach PIN fragen"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Vor dem Beenden nach Entsperrungsmuster fragen"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Vor dem Beenden nach Passwort fragen"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index e0aeb31..e61fe1a 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -672,8 +672,8 @@
     <string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Ícono de huella dactilar"</string>
     <string name="device_unlock_notification_name" msgid="2632928999862915709">"Desbloqueo del dispositivo"</string>
     <string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prueba otra forma para desbloquear el dispositivo"</string>
-    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa la función de Desbloqueo facial cuando no se reconoce tu huella dactilar (por ejemplo cuando tienes los dedos mojados)"</string>
-    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa la función de Desbloqueo facial cuando no se reconoce tu rostro (por ejemplo cuando no hay suficiente luz)"</string>
+    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa el Desbloqueo facial si no se reconoce tu huella dactilar (p. ej., si tienes los dedos mojados)"</string>
+    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa el Desbloqueo con huellas dactilares si no se reconoce tu rostro (p. ej., si hay poca luz)"</string>
     <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Desbloqueo facial"</string>
     <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con el Desbloqueo facial"</string>
     <string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Presiona para borrar el modelo de rostro y, luego, vuelve a agregar tu rostro"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 3bcc0f4..cbcf403 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -672,8 +672,8 @@
     <string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icono de huella digital"</string>
     <string name="device_unlock_notification_name" msgid="2632928999862915709">"Desbloqueo del dispositivo"</string>
     <string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prueba otro método de desbloqueo"</string>
-    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa Desbloqueo facial cuando no se reconozca tu huella digital (por ejemplo, cuando tus dedos estén húmedos)"</string>
-    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa Desbloqueo con huella digital cuando no se reconozca tu cara (por ejemplo, cuando no haya suficiente luz)"</string>
+    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa Desbloqueo facial cuando no se reconozca tu huella (p. ej., si tienes los dedos mojados)"</string>
+    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa Desbloqueo con huella digital cuando no se reconozca tu cara (p. ej., si hay poca luz)"</string>
     <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Desbloqueo facial"</string>
     <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Desbloqueo facial"</string>
     <string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Toca para eliminar tu modelo facial y luego añade de nuevo tu cara"</string>
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> de trabajo 2"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> de trabajo 3"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Clon de <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privado"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Solicitar PIN para desactivar"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pedir patrón de desbloqueo para dejar de fijar"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Solicitar contraseña para desactivar"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index d212946..22600e5 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -823,7 +823,7 @@
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Kustutage tahvelarvuti andmed hoiatamata, lähtestades arvuti tehaseandmetele."</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Kustutatakse teie Android TV seadme andmed ilma hoiatamata, lähtestades seadme tehase andmetele."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Teabe ja meelelahutuse süsteemi andmete hoiatamata kustutamine tehase andmetele lähtestamise abil."</string>
-    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Telefoniandmete hoiatuseta kustutamine, lähtestades telefoni tehaseseadetele."</string>
+    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Kustutab telefoniandmed hoiatuseta, lähtestades telefoni tehaseseadetele."</string>
     <string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Profiili andmete kustutamine"</string>
     <string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Kasutaja andmete kustutamine"</string>
     <string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Kustutatakse selle kasutaja andmed sellest tahvelarvutist ilma hoiatamata."</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 302acb0..019296d 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Laneko 2. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Laneko 3. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> aplikazioaren klona"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> pribatua"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Eskatu PINa aingura kendu aurretik"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Eskatu desblokeatzeko eredua aingura kendu aurretik"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Eskatu pasahitza aingura kendu aurretik"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 7947b6e..6210b62 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"کار دوم <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"کار سوم <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"همسانه <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"«<xliff:g id="LABEL">%1$s</xliff:g>» خصوصی"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"درخواست کد پین قبل از برداشتن پین"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"درخواست الگوی بازگشایی قفل قبل‌از برداشتن سنجاق"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"درخواست گذرواژه قبل از برداشتن سنجاق"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 3b5c86e..ef09aee 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Toinen <xliff:g id="LABEL">%1$s</xliff:g>, työ"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Kolmas <xliff:g id="LABEL">%1$s</xliff:g>, työ"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Kloonaa <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Yksityinen <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pyydä PIN ennen irrotusta"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pyydä lukituksenpoistokuvio ennen irrotusta"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pyydä salasana ennen irrotusta"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 782ccd0..d38f656 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -319,7 +319,7 @@
     <string name="permgroupdesc_microphone" msgid="1047786732792487722">"enregistrer des fichiers audio"</string>
     <string name="permgrouplab_activityRecognition" msgid="3324466667921775766">"Activité physique"</string>
     <string name="permgroupdesc_activityRecognition" msgid="4725624819457670704">"accéder à vos activités physiques"</string>
-    <string name="permgrouplab_camera" msgid="9090413408963547706">"appareil photo"</string>
+    <string name="permgrouplab_camera" msgid="9090413408963547706">"Appareil photo"</string>
     <string name="permgroupdesc_camera" msgid="7585150538459320326">"prendre des photos et filmer des vidéos"</string>
     <string name="permgrouplab_nearby_devices" msgid="5529147543651181991">"Appareils à proximité"</string>
     <string name="permgroupdesc_nearby_devices" msgid="3213561597116913508">"découvrir les appareils à proximité et s\'y connecter"</string>
@@ -672,8 +672,8 @@
     <string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icône d\'empreinte digitale"</string>
     <string name="device_unlock_notification_name" msgid="2632928999862915709">"Déverrouillage de l\'appareil"</string>
     <string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Essayez une autre façon de déverrouiller"</string>
-    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Utilisez Déverrouillage par reconnaissance faciale lorsque votre empreinte digitale n\'est pas reconnue, par exemple lorsque vos doigts sont mouillés"</string>
-    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Utilisez Déverrouillage par empreinte digitale lorsque votre visage n\'est pas reconnu, par exemple lorsque la luminosité est insuffisante"</string>
+    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Utilisez le Déverrouillage par reconnaissance faciale lorsque votre empreinte digitale n\'est pas reconnue, par exemple lorsque vos doigts sont mouillés"</string>
+    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Utilisez le Déverrouillage par empreinte digitale lorsque votre visage n\'est pas reconnu, par exemple lorsque la luminosité est insuffisante"</string>
     <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Déverrouillage par reconnaissance faciale"</string>
     <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problème avec la fonctionnalité de déverrouillage par reconnaissance faciale"</string>
     <string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Touchez pour supprimer votre modèle facial, puis ajoutez votre visage de nouveau"</string>
@@ -811,7 +811,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Contrôler le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran, puis verrouiller la tablette ou effacer toutes ses données si le nombre maximal de tentatives de saisie du mot de passe est atteint"</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez votre appareil Android TV ou effacez toutes les données qu\'il contient en cas d\'un nombre trop élevé de tentatives."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez le système d\'infodivertissement ou effacez toutes ses données en cas d\'un nombre trop élevé de tentatives."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Contrôler le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran, puis verrouille le téléphone ou efface toutes ses données si le nombre maximal de tentatives de saisie du mot de passe est atteint."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Le nombre de mots de passe incorrects saisis pour le déverrouillage de l\'écran est contrôlé. Si le nombre maximal de tentatives de saisie du mot de passe est atteint, le téléphone est verrouillé ou toutes ses données sont effacées."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Surveille le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouille la tablette ou efface toutes les données de l\'utilisateur en cas d\'un nombre trop élevé de tentatives."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez votre appareil Android TV ou effacez toutes les données de l\'utilisateur en cas d\'un nombre trop élevé de tentatives."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Surveillez le nombre de mots de passe incorrects entrés lors du déverrouillage de l\'écran et verrouillez le système d\'infodivertissement ou effacez toutes les données de ce profil en cas d\'un nombre trop élevé de tentatives."</string>
@@ -824,7 +824,7 @@
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Effacer les données de la tablette sans avertissement, en rétablissant les paramètres par défaut"</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Effacez les données de votre appareil Android TV sans avertissement en effectuant une réinitialisation des paramètres d\'usine."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Effacez les données du système d\'infodivertissement sans avertissement en rétablissant les paramètres par défaut."</string>
-    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Effacer les données du téléphone sans avertissement en rétablissant les paramètres par défaut."</string>
+    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Les données du téléphone sont effacées sans avertissement en rétablissant les paramètres par défaut."</string>
     <string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Effacer les données de profil"</string>
     <string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Effacer les données de l\'utilisateur"</string>
     <string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Effacer les données de l\'utilisateur sur cette tablette sans avertissement."</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b5ea2e2..1049d49 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2e <xliff:g id="LABEL">%1$s</xliff:g> professionnelle"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3e <xliff:g id="LABEL">%1$s</xliff:g> professionnelle"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Cloner <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privé"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Demander le code avant de retirer l\'épingle"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Demander le schéma de déverrouillage avant de retirer l\'épingle"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Demander le mot de passe avant de retirer l\'épingle"</string>
@@ -2132,7 +2131,7 @@
     <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Le Bluetooth restera activé en mode Avion"</string>
     <string name="car_loading_profile" msgid="8219978381196748070">"Chargement…"</string>
     <string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # fichier}one{{file_name} + # fichier}many{{file_name} + # fichiers}other{{file_name} + # fichiers}}"</string>
-    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Aucune recommandation de personnes avec lesquelles effectuer un partage"</string>
+    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Aucun destinataire recommandé"</string>
     <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Liste des applications"</string>
     <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Cette application n\'a pas reçu l\'autorisation d\'enregistrer des contenus audio, mais peut le faire via ce périphérique USB."</string>
     <string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Accueil"</string>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index ea3f104..1b8a8fd 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2.º <xliff:g id="LABEL">%1$s</xliff:g> do traballo"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3.º <xliff:g id="LABEL">%1$s</xliff:g> do traballo"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Clonar <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privado"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pedir PIN antes de soltar a fixación"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pedir padrón de desbloqueo antes de soltar a fixación"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pedir contrasinal antes de soltar a fixación"</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 0a42b24..9ad7ff1 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2જું કાર્ય <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3જું કાર્ય <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>ની ક્લોન"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"ખાનગી <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"અનપિન કરતા પહેલાં પિન માટે પૂછો"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"અનપિન કરતા પહેલાં અનલૉક પૅટર્ન માટે પૂછો"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"અનપિન કરતાં પહેલાં પાસવર્ડ માટે પૂછો"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 8a383a1..2cd1509 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -806,11 +806,11 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"इससे होल्डर उस ऐप्लिकेशन को अपने-आप अपडेट कर पाएगा जो उसने पहले इंस्टॉल किया था"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियम सेट करना"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"स्‍क्रीन लॉक पासवर्ड और पिन की लंबाई और उनमें स्वीकृत वर्णों को नियंत्रित करना."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"स्‍क्रीन अनलॉक करने के की कोशिशों पर नज़र रखना"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"स्‍क्रीन अनलॉक करने की कोशिशों पर नज़र रखना"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"स्‍क्रीन को अनलॉक करते समय गलत लिखे गए पासवर्ड की संख्‍या पर निगरानी करें, और बहुत ज़्यादा बार गलत पासवर्ड लिखे जाने पर टैबलेट लॉक करें या टैबलेट का संपूर्ण डेटा मिटाएं."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने Android TV डिवाइस को तुरंत लॉक करें या इसका सभी डेटा मिटाएं."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो सूचना और मनोरंजन की सुविधा देने वाले डिवाइस को लॉक करें या इस डिवाइस का सारा डेटा मिटाएं."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन को अनलॉक करते समय जितनी बार गलत पासवर्ड लिखा गया है, उसकी संख्या पर नज़र रखना और अगर बहुत बार गलत पासवर्ड डाले गए हैं, तो फ़ोन को लॉक कर देना या फ़ोन का सारा डेटा मिटा देना."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने फ़ोन को तुरंत लॉक करें या फ़ोन का सारा डेटा मिटा दें."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"स्‍क्रीन का लॉक खोलते समय गलत तरीके से लिखे गए पासवर्ड पर नज़र रखें, और अगर बार-बार ज़्यादा पासवर्ड लिखे जाते हैं तो टैबलेट को लॉक करें या इस उपयोगकर्ता का सभी डेटा मिटा दें."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो अपने Android TV डिवाइस को तुरंत लॉक करें या इस उपयोगकर्ता का सभी डेटा मिटाएं."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"स्क्रीन को अनलॉक करते समय ध्यान रखें कि कितनी बार गलत पासवर्ड डाला गया है. अगर बहुत ज़्यादा बार गलत पासवर्ड डाला गया है, तो सूचना और मनोरंजन की सुविधा देने वाले डिवाइस को लॉक करें या इस प्रोफ़ाइल का सारा डेटा मिटाएं."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"दूसरा काम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"तीसरा काम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> का क्लोन"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"निजी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन करने से पहले पिन के लिए पूछें"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन करने से पहले लॉक खोलने के पैटर्न के लिए पूछें"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"अनपिन करने से पहले पासवर्ड के लिए पूछें"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index d7f5b4a..4a9dbf5 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -807,7 +807,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Nositelju omogućuje ažuriranje aplikacije koju je prethodno instalirao bez radnje korisnika"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Postavi pravila zaporke"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Upravlja duljinom i znakovima koji su dopušteni u zaporkama i PIN-ovima zaključavanja zaslona."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadziri pokušaje otključavanja zaslona"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Nadzor pokušaja otključavanja zaslona"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Nadziri broj netočnih zaporki unesenih pri otključavanju zaslona i zaključaj tabletno računalo ili izbriši sve podatke na njemu ako je uneseno previše netočnih zaporki."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Prati broj netočnih zaporki unesenih prilikom otključavanja zaslona i zaključava Android TV uređaj ili s njega briše sve podatke ako se unese previše netočnih zaporki."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Prati broj netočnih zaporki unesenih prilikom otključavanja zaslona i zaključava sustav za informiranje i zabavu ili briše sve njegove podatke ako se unese previše netočnih zaporki."</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 59827cb..9190a63 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-րդ աշխատանք <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-րդ աշխատանք <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g>-ի կլոն"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Անձնական <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Հարցնել PIN կոդը"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Հարցնել ապակողպող նախշը"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Հարցնել գաղտնաբառը"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 8603809..3417c2a 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -806,7 +806,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Mengizinkan pemegang mengupdate aplikasi yang sebelumnya diinstal tanpa tindakan pengguna"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Setel aturan sandi"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Mengontrol panjang dan karakter yang diizinkan dalam sandi dan PIN kunci layar."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Pantau upaya pembukaan kunci layar"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Memantau upaya pembukaan kunci layar"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Memantau berapa kali sandi yang dimasukkan salah saat ingin membuka kunci layar, dan mengunci tablet atau menghapus semua data tablet jika terjadi terlalu banyak kesalahan memasukkan sandi."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Memantau banyaknya sandi salah yang diketikkan saat membuka kunci layar, dan mengunci perangkat Android TV atau menghapus semua data perangkat Android TV jika terlalu banyak sandi salah diketikkan."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Memantau berapa kali sandi yang dimasukkan salah saat ingin membuka kunci layar, dan mengunci sistem infotainmen atau menghapus semua data sistem infotainmen jika terlalu banyak kesalahan memasukkan sandi."</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index 7420a25..7b2bf02 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> í vinnu (2)"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> í vinnu (3)"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Afrit af <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Lokað: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Biðja um PIN-númer til að losa"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Biðja um opnunarmynstur til að losa"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Biðja um aðgangsorð til að losa"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 168a161..b0bde08 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -672,13 +672,13 @@
     <string name="fingerprint_icon_content_description" msgid="4741068463175388817">"Icona dell\'impronta"</string>
     <string name="device_unlock_notification_name" msgid="2632928999862915709">"Sblocco dispositivo"</string>
     <string name="alternative_unlock_setup_notification_title" msgid="6241508547901933544">"Prova un\'altra modalità di sblocco"</string>
-    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa lo sblocco con il volto se la tua impronta non viene riconosciuta, ad esempio quando hai le dita bagnate"</string>
-    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa lo sblocco con l\'impronta se il tuo volto non viene riconosciuto, ad esempio quando non c\'è abbastanza luce"</string>
-    <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Sblocco con il volto"</string>
-    <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Sblocco con il volto"</string>
+    <string name="alternative_face_setup_notification_content" msgid="3384959224091897331">"Usa lo Sblocco con il Volto se la tua impronta non viene riconosciuta, ad esempio se hai le dita bagnate"</string>
+    <string name="alternative_fp_setup_notification_content" msgid="7454096947415721639">"Usa lo Sblocco con l\'Impronta se il tuo volto non viene riconosciuto, ad esempio se non c\'è abbastanza luce"</string>
+    <string name="face_recalibrate_notification_name" msgid="7311163114750748686">"Sblocco con il Volto"</string>
+    <string name="face_recalibrate_notification_title" msgid="2524791952735579082">"Problema con Sblocco con il Volto"</string>
     <string name="face_recalibrate_notification_content" msgid="3064513770251355594">"Tocca per eliminare il tuo modello del volto e poi riaggiungi il tuo volto"</string>
-    <string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Per utilizzare lo sblocco con il volto, attiva "<b>"l\'accesso alla fotocamera"</b>" in Impostazioni &gt; Privacy"</string>
-    <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Sblocco con l\'impronta"</string>
+    <string name="face_sensor_privacy_enabled" msgid="7407126963510598508">"Per utilizzare lo Sblocco con il Volto, attiva "<b>"l\'accesso alla fotocamera"</b>" in Impostazioni &gt; Privacy"</string>
+    <string name="fingerprint_recalibrate_notification_name" msgid="1414578431898579354">"Sblocco con l\'Impronta"</string>
     <string name="fingerprint_recalibrate_notification_title" msgid="2406561052064558497">"Impossibile utilizzare il sensore di impronte digitali"</string>
     <string name="fingerprint_recalibrate_notification_content" msgid="8519935717822194943">"Contatta un fornitore di servizi di riparazione."</string>
     <string name="face_acquired_insufficient" msgid="6889245852748492218">"Impossibile creare il modello del volto. Riprova."</string>
@@ -711,20 +711,20 @@
   <string-array name="face_acquired_vendor">
   </string-array>
     <string name="face_error_hw_not_available" msgid="5085202213036026288">"Imposs. verificare volto. Hardware non disponibile."</string>
-    <string name="face_error_timeout" msgid="2598544068593889762">"Riprova lo sblocco con il volto"</string>
+    <string name="face_error_timeout" msgid="2598544068593889762">"Riprova lo Sblocco con il Volto"</string>
     <string name="face_error_no_space" msgid="5649264057026021723">"Imposs. salvare dati nuovi volti. Elimina un volto vecchio."</string>
     <string name="face_error_canceled" msgid="2164434737103802131">"Operazione associata al volto annullata."</string>
-    <string name="face_error_user_canceled" msgid="5766472033202928373">"Sblocco con il volto annullato dall\'utente"</string>
+    <string name="face_error_user_canceled" msgid="5766472033202928373">"Sblocco con il Volto annullato dall\'utente"</string>
     <string name="face_error_lockout" msgid="7864408714994529437">"Troppi tentativi. Riprova più tardi."</string>
-    <string name="face_error_lockout_permanent" msgid="8533257333130473422">"Troppi tentativi. Sblocco con il volto non disponibile."</string>
+    <string name="face_error_lockout_permanent" msgid="8533257333130473422">"Troppi tentativi. Sblocco con il Volto non disponibile."</string>
     <string name="face_error_lockout_screen_lock" msgid="5062609811636860928">"Troppi tentativi. Inserisci il blocco schermo."</string>
     <string name="face_error_unable_to_process" msgid="5723292697366130070">"Impossibile verificare il volto. Riprova."</string>
-    <string name="face_error_not_enrolled" msgid="1134739108536328412">"Non hai configurato lo sblocco con il volto"</string>
-    <string name="face_error_hw_not_present" msgid="7940978724978763011">"Sblocco con il volto non è supportato su questo dispositivo"</string>
+    <string name="face_error_not_enrolled" msgid="1134739108536328412">"Non hai configurato lo Sblocco con il Volto"</string>
+    <string name="face_error_hw_not_present" msgid="7940978724978763011">"Sblocco con il Volto non è supportato su questo dispositivo"</string>
     <string name="face_error_security_update_required" msgid="5076017208528750161">"Sensore temporaneamente disattivato."</string>
     <string name="face_name_template" msgid="3877037340223318119">"Volto <xliff:g id="FACEID">%d</xliff:g>"</string>
-    <string name="face_app_setting_name" msgid="5854024256907828015">"Usa lo sblocco con il volto"</string>
-    <string name="face_or_screen_lock_app_setting_name" msgid="1603149075605709106">"Usa lo sblocco con il volto o il blocco schermo"</string>
+    <string name="face_app_setting_name" msgid="5854024256907828015">"Usa lo Sblocco con il Volto"</string>
+    <string name="face_or_screen_lock_app_setting_name" msgid="1603149075605709106">"Usa lo Sblocco con il Volto o il blocco schermo"</string>
     <string name="face_dialog_default_subtitle" msgid="6620492813371195429">"Usa il tuo volto per continuare"</string>
     <string name="face_or_screen_lock_dialog_default_subtitle" msgid="5006381531158341844">"Per continuare devi usare il tuo volto o il tuo blocco schermo"</string>
   <string-array name="face_error_vendor">
@@ -976,7 +976,7 @@
     <string name="lockscreen_pattern_wrong" msgid="2940138714468358458">"Riprova"</string>
     <string name="lockscreen_password_wrong" msgid="8605355913868947490">"Riprova"</string>
     <string name="lockscreen_storage_locked" msgid="634993789186443380">"Sblocca per accedere a funzioni e dati"</string>
-    <string name="faceunlock_multiple_failures" msgid="681991538434031708">"Numero massimo di tentativi di sblocco con il volto superato"</string>
+    <string name="faceunlock_multiple_failures" msgid="681991538434031708">"Numero massimo di tentativi di Sblocco con il Volto superato"</string>
     <string name="lockscreen_missing_sim_message_short" msgid="1229301273156907613">"Nessuna SIM presente"</string>
     <string name="lockscreen_missing_sim_message" product="tablet" msgid="3986843848305639161">"Nessuna SIM presente nel tablet."</string>
     <string name="lockscreen_missing_sim_message" product="tv" msgid="3903140876952198273">"Nessuna SIM presente nel dispositivo Android TV."</string>
@@ -1046,7 +1046,7 @@
     <string name="keyguard_accessibility_expand_lock_area" msgid="4215280881346033434">"Espandi area di sblocco."</string>
     <string name="keyguard_accessibility_slide_unlock" msgid="2968195219692413046">"Sblocco con scorrimento."</string>
     <string name="keyguard_accessibility_pattern_unlock" msgid="8669128146589233293">"Sblocco con sequenza."</string>
-    <string name="keyguard_accessibility_face_unlock" msgid="4533832120787386728">"Sblocco con il volto."</string>
+    <string name="keyguard_accessibility_face_unlock" msgid="4533832120787386728">"Sblocco con il Volto."</string>
     <string name="keyguard_accessibility_pin_unlock" msgid="4020864007967340068">"Sblocco con PIN."</string>
     <string name="keyguard_accessibility_sim_pin_unlock" msgid="4895939120871890557">"Sblocco tramite PIN della SIM."</string>
     <string name="keyguard_accessibility_sim_puk_unlock" msgid="3459003464041899101">"Sblocco tramite PUK della SIM."</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 1f90994..000adce 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> שני בעבודה"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> שלישי בעבודה"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"שכפול של <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> בפרופיל הפרטי"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"יש לבקש קוד אימות לפני ביטול הצמדה"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"צריך לבקש קו ביטול נעילה לפני ביטול הצמדה"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"יש לבקש סיסמה לפני ביטול הצמדה"</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 1d93a71..bddd15c 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -806,7 +806,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Бұған дейін орнатылған қолданбаның автоматты түрде жаңартылуына мүмкіндік береді."</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Құпия сөз ережелерін тағайындау"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Экран бекітпесінің құпия сөздерінің және PIN кодтарының ұзындығын және оларда рұқсат етілген таңбаларды басқару."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Экран құлпын ашу әркеттерін бақылау"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Экран құлпын ашу әрекеттерін бақылау"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Экран бекітпесін ашқан кезде терілген қате құпия сөздердің санын бақылау және планшетті бекіту немесе тым көп қате құпия сөздер терілген болса, планшеттің бүкіл деректерін өшіру."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Экранның құлпын ашу кезінде қате енгізілген құпия сөздердің санын бақылау, құпия сөз тым көп қате енгізілген жағдайда, Android TV құрылғысын құлыптау және Android TV құрылғыңыздың барлық деректерінен тазарту."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Экран құлпын ашқан кезде, терілген қате құпия сөздердің саны бақыланады, сондай-ақ құпия сөздер бірнеше рет қате терілсе, ақпараттық-сауықтық жүйе құлыпталады немесе оның барлық дерегі жойылады."</string>
@@ -819,7 +819,7 @@
     <string name="policydesc_resetPassword" msgid="4626419138439341851">"Экран құлпын өзгерте алады."</string>
     <string name="policylab_forceLock" msgid="7360335502968476434">"Экранды құлыптау"</string>
     <string name="policydesc_forceLock" msgid="1008844760853899693">"Экранның қашан және қалай құлыпталатынын басқара алады."</string>
-    <string name="policylab_wipeData" msgid="1359485247727537311">"Барлық деректерді өшіру"</string>
+    <string name="policylab_wipeData" msgid="1359485247727537311">"Барлық деректі өшіру"</string>
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Планшет дерекқорын ескертусіз, зауыттық дерекқорын қайта реттеу арқылы өшіру."</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Зауыттық деректерді қалпына келтіру арқылы Android TV құрылғыңыздың деректерін ескертусіз тазартыңыз."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Зауыттық деректерді қалпына келтіру арқылы ақпараттық-сауықтық жүйе дерегі ескертусіз өшіріледі."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-ші жұмыс профилі (<xliff:g id="LABEL">%1$s</xliff:g>)"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-ші жұмыс профилі (<xliff:g id="LABEL">%1$s</xliff:g>)"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> клондау"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Жеке <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Босату алдында PIN кодын сұрау"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Босату алдында бекітпесін ашу өрнегін сұрау"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Босату алдында құпия сөзді сұрау"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 19c6f5d..aa543d8 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -328,7 +328,7 @@
     <string name="permgroupdesc_phone" msgid="270048070781478204">"ಫೋನ್ ಕರೆ ಮಾಡಲು ಹಾಗೂ ನಿರ್ವಹಿಸಲು"</string>
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"ಬಾಡಿ ಸೆನ್ಸರ್‌"</string>
     <string name="permgroupdesc_sensors" msgid="2610631290633747752">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸಾರ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಿ"</string>
-    <string name="permgrouplab_notifications" msgid="5472972361980668884">"ಅಧಿಸೂಚನೆಗಳು"</string>
+    <string name="permgrouplab_notifications" msgid="5472972361980668884">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
     <string name="permgroupdesc_notifications" msgid="4608679556801506580">"ಅಧಿಸೂಚನೆಗಳನ್ನು ತೋರಿಸಿ"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"ವಿಂಡೋ ವಿಷಯವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"ನೀವು ಬಳಸುತ್ತಿರುವ ವಿಂಡೋದ ವಿಷಯ ಪರೀಕ್ಷಿಸುತ್ತದೆ."</string>
@@ -2136,7 +2136,7 @@
     <string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ಹೋಮ್"</string>
     <string name="accessibility_system_action_back_label" msgid="4205361367345537608">"ಹಿಂದಕ್ಕೆ"</string>
     <string name="accessibility_system_action_recents_label" msgid="4782875610281649728">"ಇತ್ತೀಚಿನ ಆ್ಯಪ್‌ಗಳು"</string>
-    <string name="accessibility_system_action_notifications_label" msgid="6083767351772162010">"ಅಧಿಸೂಚನೆಗಳು"</string>
+    <string name="accessibility_system_action_notifications_label" msgid="6083767351772162010">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
     <string name="accessibility_system_action_quick_settings_label" msgid="4583900123506773783">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳು"</string>
     <string name="accessibility_system_action_power_dialog_label" msgid="8095341821683910781">"ಪವರ್ ಡೈಲಾಗ್"</string>
     <string name="accessibility_system_action_lock_screen_label" msgid="5484190691945563838">"ಲಾಕ್ ಸ್ಕ್ರೀನ್"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 335a957..2b50395 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"두 번째 업무용 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"세 번째 업무용<xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> 복사"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"비공개 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"고정 해제 이전에 PIN 요청"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"고정 해제 시 잠금 해제 패턴 요청"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"고정 해제 이전에 비밀번호 요청"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index df4929f..63e4b27 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -765,7 +765,7 @@
     <string name="permlab_readNetworkUsageHistory" msgid="8470402862501573795">"тармактын колдонулуш таржымалын окуу"</string>
     <string name="permdesc_readNetworkUsageHistory" msgid="1112962304941637102">"Колдонмого белгилүү бир тармактарга жана колдонмолорго байланыштуу тармактын колдонулушу жөнүндө таржымалды окуу мүмкүнчүлүгүн берет."</string>
     <string name="permlab_manageNetworkPolicy" msgid="6872549423152175378">"тармак саясатын башкаруу"</string>
-    <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Колдонмого тармак саясаттарын башкаруу жана колдонмого мүнөздүү эрежелерди белгилөө мүмкүнчүлүгүн берет."</string>
+    <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Колдонмого тармак эрежелерин башкаруу жана колдонмого мүнөздүү эрежелерди белгилөө мүмкүнчүлүгүн берет."</string>
     <string name="permlab_modifyNetworkAccounting" msgid="7448790834938749041">"тармактын колдонулуш эсеп-кысабын өзгөртүү"</string>
     <string name="permdesc_modifyNetworkAccounting" msgid="5076042642247205390">"Колдонмого желени башка колдонмолордун пайдалануусун башкарган тууралоолорду киргизүү уруксатын берет. Жөнөкөй колдонмолор үчүн эмес."</string>
     <string name="permlab_accessNotifications" msgid="7130360248191984741">"эскертүүлөр менен иштөө"</string>
@@ -810,7 +810,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн санын текшерип, эгер алардын саны өтө эле көп болсо, планшетти кулпулаңыз же планшеттеги бардык маалыматтарды тазалап салыңыз."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Экрандын кулпусун ачуу учурунда сырсөздөр канча жолу туура эмес терилгенин тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, Android TV түзмөгүңүздү кулпулап же Android TV түзмөгүңүздөгү бардык дайын-даректериңизди тазалап салуу."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн саны текшерилип, эгер алардын саны өтө эле көп болсо, инфозоок тутуму кулпуланып же инфозоок тутумундагы бардык маалыматтар өчүрүлөт."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Экрандын кулпусу ачылып жатканда туура эмес терилген сырсөздөрдүн санын текшерип, эгер алардын саны өтө эле көп болсо, телефонду кулпулаңыз же телефондогу бардык маалыматтарды тазалап салыңыз."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Экрандын кулпусун ачуу аракеттерине көз салып, сырсөз өтө көп жолу туура эмес терилсе, телефонду кулпулайт же андагы бардык нерселерди өчүрүп салат."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Экрандын кулпусун ачуу учурунда туура эмес терилген сырсөздөрдү тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, планшетти кулпулап же бул колдонуучунун бардык дайындарын тазалап салуу."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Экрандын кулпусун ачуу учурунда сырсөздөр канча жолу туура эмес терилгенин тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, Android TV түзмөгүңүздү кулпулап же колдонуучунун бардык дайындарын тазалап салуу."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Экрандын кулпусун ачуу учурунда туура эмес терилген сырсөздөрдү тескөө жана сырсөз өтө көп жолу туура эмес терилген болсо, инфозоок тутуму кулпуланып же бул профилдин бардык дайындары өчүрүлөт."</string>
@@ -1718,7 +1718,7 @@
     <string name="color_inversion_feature_name" msgid="2672824491933264951">"Түстөрдү инверсиялоо"</string>
     <string name="color_correction_feature_name" msgid="7975133554160979214">"Түстөрдү тууралоо"</string>
     <string name="one_handed_mode_feature_name" msgid="2334330034828094891">"Бир кол режими"</string>
-    <string name="reduce_bright_colors_feature_name" msgid="3222994553174604132">"Дагы караңгы"</string>
+    <string name="reduce_bright_colors_feature_name" msgid="3222994553174604132">"Кошумча караңгылатуу"</string>
     <string name="hearing_aids_feature_name" msgid="1125892105105852542">"Угуу түзмөктөрү"</string>
     <string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Үндү катуулатуу/акырындатуу баскычтары басылып, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> күйгүзүлдү."</string>
     <string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Үндү катуулатуу/акырындатуу баскычтары басылып, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> өчүрүлдү."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-жумуш <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-жумуш <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> клону"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Купуя <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Бошотуудан мурун PIN суралсын"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Бошотуудан мурун графикалык ачкыч суралсын"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Бошотуудан мурун сырсөз суралсын"</string>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index cddabaf..0f8ccf5 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"ບ່ອນເຮັດວຽກທີ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"ບ່ອນເຮັດວຽກທີ 3 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"ໂຄລນ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> ສ່ວນຕົວ"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"​ຖາມ​ຫາ PIN ກ່ອນ​ຍົກ​ເລີກ​ການປັກ​ໝຸດ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"​ຖາມ​ຫາ​ຮູບ​ແບບ​ປົດ​ລັອກ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"​ຖາມ​ຫາ​ລະ​ຫັດ​ຜ່ານ​ກ່ອນ​ຍົກ​ເລີກ​ການ​ປັກ​ໝຸດ"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index fb1b7b9..ab6998c 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. darba profils: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. darba profils: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> (klons)"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Privātais <xliff:g id="LABEL">%1$s</xliff:g> profils"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Prasīt PIN kodu pirms atspraušanas"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pirms atspraušanas pieprasīt atbloķēšanas kombināciju"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pirms atspraušanas pieprasīt paroli"</string>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index d2bdb4d..7906fc1 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -810,7 +810,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал таблетыг түгжих болон таблетын бүх датаг арилгана"</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Дэлгэцийн түгжээг тайлахаар буруу оруулсан нууц үгийн тоог хянаж, нууц үгийг хэт олон удаа буруу оруулсан тохиолдолд таны Android TV төхөөрөмжийг түгжиж эсвэл үүний бүх өгөгдлийг устгана."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Дэлгэцийн түгжээг тайлахад буруу бичиж оруулсан нууц үгний тоог хянаж, инфотэйнмент системийг түгжих эсвэл хэт олон удаа нууц үгийг буруу бичиж оруулсан тохиолдолд инфотэйнмент системийн бүх өгөгдлийг устгана."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах, ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал утсыг түгжих болон утасны бүх датаг арилгана"</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Дэлгэц түгжигдсэн үед нууц үг буруу оруулалтын тоог хянах, ба хэрэв хэт олон удаа нууц үгийг буруу оруулбал утсыг түгжиж эсвэл утасны бүх өгөгдлийг арилгана"</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Дэлгэцийн түгжээг тайлахад оруулсан буруу нууц үгийн давтамжийг хянаж таблетыг түгжих эсвэл буруу нууц үгийг хэт олон удаа оруулсан тохиолдолд энэ хэрэглэгчийн мэдээллийг устгах."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Дэлгэцийн түгжээг тайлахаар буруу оруулсан нууц үгийн тоог хянаж, нууц үгийг хэт олон удаа буруу оруулсан тохиолдолд таны Android TV төхөөрөмжийг түгжиж эсвэл энэ хэрэглэгчийн бүх өгөгдлийг устгана."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Дэлгэцийн түгжээг тайлахад буруу бичиж оруулсан нууц үгний тоог хянаж, инфотэйнмент системийг түгжих эсвэл хэт олон удаа нууц үгийг буруу бичиж оруулсан тохиолдолд энэ профайлын бүх өгөгдлийг устгана."</string>
@@ -819,11 +819,11 @@
     <string name="policydesc_resetPassword" msgid="4626419138439341851">"Дэлгэцийн түгжээг өөрчлөх."</string>
     <string name="policylab_forceLock" msgid="7360335502968476434">"Дэлгэц түгжих"</string>
     <string name="policydesc_forceLock" msgid="1008844760853899693">"Дэлгэц хэзээ яаж түгжихийг удирдах"</string>
-    <string name="policylab_wipeData" msgid="1359485247727537311">"Бүх датаг арилгах"</string>
+    <string name="policylab_wipeData" msgid="1359485247727537311">"Бүх өгөгдлийг арилгах"</string>
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Үйлдвэрийн дата утгыг өгсөнөөр таблетын дата шууд арилгагдана."</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Таны Android TV төхөөрөмжийн өгөгдлийг танд анхааруулалгүйгээр үйлдвэрээс гарсан төлөвт шилжүүлэн устгана."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Үйлдвэрийн өгөгдлийн төлөвт үйлдлийг гүйцэтгэснээр инфотэйнмент системийн өгөгдлийг сануулгагүйгээр устгана."</string>
-    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Сануулахгүйгээр утасны бүх мэдээллийг устгаж, үйлдвэрийн өгөгдмөл байдалд шилжүүлнэ"</string>
+    <string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"Сануулахгүйгээр утасны бүх өгөгдлийг арилгаж, үйлдвэрийн өгөгдлийн тохиргоонд шинэчилнэ"</string>
     <string name="policylab_wipeData_secondaryUser" product="automotive" msgid="115034358520328373">"Профайлын өгөгдлийг устгах"</string>
     <string name="policylab_wipeData_secondaryUser" product="default" msgid="413813645323433166">"Хэрэглэгчийн мэдээллийг арилгах"</string>
     <string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"Анхааруулга өгөхгүйгээр энэ хэрэглэгчийн энэ таблет дээрх мэдээллийг устгах."</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 5f7a5c1..7499048 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -806,11 +806,11 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"होल्डरला वापरकर्त्याच्या कृतीशिवाय पूर्वी इंस्टॉल केलेले अ‍ॅप अपडेट करण्याची अनुमती देते"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"पासवर्ड नियम सेट करा"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"स्क्रीन लॉक पासवर्ड आणि पिन मध्ये अनुमती दिलेले लांबी आणि वर्ण नियंत्रित करा."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"स्क्रीन अनलॉक प्रयत्नांचे परीक्षण करा"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"स्क्रीन अनलॉक प्रयत्नांवर लक्ष ठेवा"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"टाइप केलेल्या अयोग्य पासवर्डांच्या अंकांचे परीक्षण करा. स्क्रीन अनलॉक केली जाते, तेव्हा टॅबलेट लॉक करा किंवा बरेच पासवर्ड टाइप केले असल्यास टॅबलेटचा सर्व डेटा मिटवा."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्ड संख्येचे परीक्षण करते आणि Android TV डिव्हाइस लॉक करते किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास Android TV डिव्हाइसचा सर्व डेटा मिटवते."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"टाइप केलेल्या चुकीच्या पासवर्डच्या संख्येचे निरीक्षण करा. स्क्रीन अनलॉक करताना, इंफोटेनमेंट सिस्टीम लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास, इंफोटेनमेंट सिस्टीमचा सर्व डेटा मिटवा."</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"टाइप केलेल्या अयोग्य पासवर्डांच्या अंकांचे परीक्षण करा. स्क्रीन अनलॉक केली जाते, तेव्हा फोन लॉक करा किंवा बरेच पासवर्ड टाइप केले असल्यास फोनचा सर्व डेटा मिटवा."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"स्क्रीन अनलॉक करताना टाइप केलेल्या अयोग्य पासवर्डच्या संख्येवर लक्ष ठेवा. बरेच पासवर्ड टाइप केले असल्यास फोन लॉक करा किंवा फोनचा सर्व डेटा मिटवा."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्डांच्या संख्येचे परीक्षण करा आणि टॅबलेट लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास या वापरकर्त्याचा सर्व डेटा मिटवा."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्ड संख्येचे परीक्षण करते आणि Android TV डिव्हाइस लॉक करते किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास वापरकर्त्याचा सर्व डेटा मिटवते."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"स्क्रीन अनलॉक करताना टाइप केलेल्या चुकीच्या पासवर्डच्या संख्येचे निरीक्षण करा आणि इंफोटेनमेंट सिस्टीम लॉक करा किंवा अनेक चुकीचे पासवर्ड टाइप केले असल्यास, या प्रोफाइलचा सर्व डेटा मिटवा."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2 रे कार्य <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3 रे कार्य <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> क्लोन केलेले"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"खाजगी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन करण्‍यापूर्वी पिन विचारा"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन करण्‍यापूर्वी अनलॉक नमुन्यासाठी विचारा"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"अनपिन करण्‍यापूर्वी संकेतशब्दासाठी विचारा"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 74e904d..3faeb7f 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -2130,7 +2130,7 @@
     <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Bluetooth akan kekal hidup semasa dalam mod pesawat"</string>
     <string name="car_loading_profile" msgid="8219978381196748070">"Memuatkan"</string>
     <string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # fail}other{{file_name} + # fail}}"</string>
-    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Tiada orang yang disyorkan untuk berkongsi"</string>
+    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Tiada orang yang disyorkan untuk membuat perkongsian"</string>
     <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Senarai apl"</string>
     <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Apl ini belum diberikan kebenaran merakam tetapi dapat merakam audio melalui peranti USB ini."</string>
     <string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Skrin Utama"</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 394a74e..5752fa3 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -810,7 +810,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"မျက်နှာပြင်ကို သော့ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက်၊ စကားဝှက် ရိုက်ထည့်မှု သိပ်များနေလျှင် တက်ဘလက်ကို သော့ခတ်ရန် သို့မဟုတ် တက်ဘလက် ဒေတာ အားလုံးကို ဖျက်ရန်။"</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"မျက်နှာပြင်ကို လော့ခ်ဖွင့်သည့်အခါ စကားဝှက်မှားယွင်းစွာ ရိုက်သွင်းသည့်အကြိမ်ရေကို စောင့်ကြည့်ပြီး မှားယွင်းသည့်အကြိမ်ရေ အလွန်များလာပါက သင့် Android TV စက်ပစ္စည်းကို လော့ခ်ချခြင်း သို့မဟုတ် သင့် Android TV ရှိ အသုံးပြုသူဒေတာများအားလုံးကို ဖျက်ခြင်းတို့ ပြုလုပ်သွားပါမည်။"</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"ဖန်သားပြင်လော့ခ်ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက် စကားဝှက် မမှန်မကန် ရိုက်ထည့်မှု များနေလျှင် သတင်းနှင့်ဖျော်ဖြေရေး စနစ်ကို လော့ခ်ချသည် (သို့) ၎င်း၏ ဒေတာအားလုံးကို ဖျက်သည်။"</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"မျက်နှာပြင်ကို သော့ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက်၊ စကားဝှက် ရိုက်ထည့်မှု သိပ်များနေလျှင် ဖုန်းကို သော့ခတ်ရန် သို့မဟုတ် ဖုန်း ဒေတာ အားလုံးကို ဖျက်ရန်။"</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"မျက်နှာပြင်ကို လောခ်ဖွင့်ရန်အတွက် ရိုက်ထည့်သည့် မှားယွင်းသောစကားဝှက် အကြိမ်ရေကို စောင့်ကြည့်ပြီး မမှန်သောစကားဝှက် ရိုက်ထည့်မှု အလွန်များနေလျှင် ဖုန်းကိုလော့ခ်ချသည် (သို့) ဖုန်း ဒေတာအားလုံးကို ဖျက်သည်။"</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"ဖန်မျက်နှာပြင်အား သော့ဖွင့်စဉ် လျှို့ဝှက်ကုဒ်အမှားများ ရိုက်သွင်းမှုအား စောင့်ကြည့်ရန်နှင့်၊ လျှို့ဝှက်ကုဒ်အမှားများ များစွာ ရိုက်သွင်းပါက တက်ဘလက်အား သော့ချခြင်း သို့မဟုတ် တက်ဘလက်၏ အချက်အလက်များအား ဖျက်ပစ်ခြင်းများ ပြုလုပ်မည်။"</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"မျက်နှာပြင်ကို လော့ခ်ဖွင့်သည့်အခါ စကားဝှက်မှားယွင်းစွာ ရိုက်သွင်းသည့်အကြိမ်ရေကို စောင့်ကြည့်ပြီး မှားယွင်းသည့်အကြိမ်ရေ အလွန်များလာပါက သင့် Android TV စက်ပစ္စည်းကို လော့ခ်ချခြင်း သို့မဟုတ် ဤအသုံးပြုသူဒေတာများအားလုံးကို ဖျက်ခြင်းတို့ ပြုလုပ်သွားပါမည်။"</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"ဖန်သားပြင်လော့ခ်ဖွင့်ရန် အတွက် စကားဝှက် မမှန်မကန် ထည့်သွင်းမှု အရေအတွက်ကို စောင့်ကြည့်လျက် စကားဝှက် မမှန်မကန် ရိုက်ထည့်မှု များနေလျှင် သတင်းနှင့်ဖျော်ဖြေရေး စနစ်ကို လော့ခ်ချသည် (သို့) ဤပရိုဖိုင်၏ ဒေတာအားလုံးကို ဖျက်သည်။"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index ffc8bea..0cc55e4 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -806,7 +806,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Lar innehaveren oppdatere appen hen tidligere installerte, uten brukerhandling"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Angi passordregler"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Kontrollerer tillatt lengde og tillatte tegn i passord og PIN-koder for opplåsing av skjermen."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Overvåk forsøk på å låse opp skjermen"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Overvåking av forsøk på å låse opp skjermen"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Overvåk antall feil passordforsøk ved opplåsing av skjerm, og lås nettbrettet eller slett alle data fra nettbrettet ved for mange feil passordforsøk."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Følg med på hvor mange ganger feil passord skrives inn når skjermen skal låses opp, og lås Android TV-enheten eller tøm alle dataene når feil passord skrives inn for mange ganger."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Overvåk antall feil passord som er skrevet inn ved opplåsing av skjermen, og lås infotainment-systemet eller tøm alle dataene i infotainment-systemet hvis feil passord skrives inn for mange ganger."</string>
@@ -1288,13 +1288,13 @@
     <string name="volume_call" msgid="7625321655265747433">"Samtalevolum"</string>
     <string name="volume_bluetooth_call" msgid="2930204618610115061">"Bluetooth-samtalevolum"</string>
     <string name="volume_alarm" msgid="4486241060751798448">"Alarmvolum"</string>
-    <string name="volume_notification" msgid="6864412249031660057">"Varslingsvolum"</string>
+    <string name="volume_notification" msgid="6864412249031660057">"Varselvolum"</string>
     <string name="volume_unknown" msgid="4041914008166576293">"Volum"</string>
     <string name="volume_icon_description_bluetooth" msgid="7540388479345558400">"Bluetooth-volum"</string>
     <string name="volume_icon_description_ringer" msgid="2187800636867423459">"Ringetonevolum"</string>
     <string name="volume_icon_description_incall" msgid="4491255105381227919">"Samtalevolum"</string>
     <string name="volume_icon_description_media" msgid="4997633254078171233">"Medievolum"</string>
-    <string name="volume_icon_description_notification" msgid="579091344110747279">"Varslingsvolum"</string>
+    <string name="volume_icon_description_notification" msgid="579091344110747279">"Varselvolum"</string>
     <string name="ringtone_default" msgid="9118299121288174597">"Standard ringetone"</string>
     <string name="ringtone_default_with_actual" msgid="2709686194556159773">"Standard (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
     <string name="ringtone_silent" msgid="397111123930141876">"Ingen"</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Andre <xliff:g id="LABEL">%1$s</xliff:g> for jobben"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Tredje <xliff:g id="LABEL">%1$s</xliff:g> for jobben"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Privat <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Krev PIN-kode for å løsne app"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Krev opplåsingsmønster for å løsne apper"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Krev passord for å løsne apper"</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index 672cfbc..e38898e 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"कार्यालयको दोस्रो <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"कार्यालयको तेस्रो <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> क्लोन गर्नुहोस्"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"निजी <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"अनपिन गर्नुअघि PIN मागियोस्"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"अनपिन गर्नअघि अनलक प्याटर्न माग्नुहोस्"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"पिन निकाल्नुअघि पासवर्ड सोध्नुहोस्"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 2846b6a..7d48a01 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -329,7 +329,7 @@
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"Lichaamssensoren"</string>
     <string name="permgroupdesc_sensors" msgid="2610631290633747752">"toegang krijgen tot sensorgegevens over je vitale functies"</string>
     <string name="permgrouplab_notifications" msgid="5472972361980668884">"Meldingen"</string>
-    <string name="permgroupdesc_notifications" msgid="4608679556801506580">"meldingen laten zien"</string>
+    <string name="permgroupdesc_notifications" msgid="4608679556801506580">"meldingen tonen"</string>
     <string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"Content van vensters ophalen"</string>
     <string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"De content inspecteren van een venster waarmee je interactie hebt."</string>
     <string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"Verkennen via aanraking aanzetten"</string>
@@ -596,8 +596,8 @@
     <string name="permdesc_disableKeyguard" msgid="3223710003098573038">"Hiermee kan de app de toetsenblokkering en bijbehorende wachtwoordbeveiliging uitzetten. Zo kan de telefoon de toetsenblokkering uitzetten als je wordt gebeld en de toetsenblokkering weer aanzetten als het gesprek is beëindigd."</string>
     <string name="permlab_requestPasswordComplexity" msgid="1808977190557794109">"complexiteit van schermvergrendeling opvragen"</string>
     <string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"Hiermee krijgt de app toestemming om het complexiteitsniveau van de schermvergrendeling te achterhalen (hoog, midden, laag of geen). Dat geeft een indicatie van het mogelijke lengtebereik en type van de schermvergrendeling. De app kan gebruikers ook voorstellen de schermvergrendeling naar een bepaald niveau te updaten, maar gebruikers kunnen dit altijd negeren en de app verlaten. De schermvergrendeling wordt niet opgeslagen als platte tekst, zodat de app het precieze wachtwoord niet weet."</string>
-    <string name="permlab_postNotification" msgid="4875401198597803658">"meldingen laten zien"</string>
-    <string name="permdesc_postNotification" msgid="5974977162462877075">"Hiermee kan de app meldingen laten zien"</string>
+    <string name="permlab_postNotification" msgid="4875401198597803658">"meldingen tonen"</string>
+    <string name="permdesc_postNotification" msgid="5974977162462877075">"Hiermee kan de app meldingen tonen"</string>
     <string name="permlab_turnScreenOn" msgid="219344053664171492">"het scherm aanzetten"</string>
     <string name="permdesc_turnScreenOn" msgid="4394606875897601559">"Hiermee kan de app het scherm aanzetten."</string>
     <string name="permlab_useBiometric" msgid="6314741124749633786">"biometrische hardware gebruiken"</string>
@@ -2100,7 +2100,7 @@
     <string name="nas_upgrade_notification_enable_action" msgid="3046406808378726874">"OK"</string>
     <string name="nas_upgrade_notification_disable_action" msgid="3794833210043497982">"Uitzetten"</string>
     <string name="nas_upgrade_notification_learn_more_action" msgid="7011130656195423947">"Meer informatie"</string>
-    <string name="nas_upgrade_notification_learn_more_content" msgid="3735480566983530650">"In Android 12 hebben verbeterde meldingen aanpasbare Android-meldingen vervangen. Deze functie laat voorgestelde acties en antwoorden zien en ordent je meldingen.\n\nVerbeterde meldingen hebben toegang tot meldingscontent, waaronder persoonlijke informatie zoals contactnamen en berichten. Deze functie kan ook meldingen sluiten of erop reageren, zoals telefoongesprekken aannemen, en Niet storen beheren."</string>
+    <string name="nas_upgrade_notification_learn_more_content" msgid="3735480566983530650">"In Android 12 hebben verbeterde meldingen aanpasbare Android-meldingen vervangen. Deze functie toont voorgestelde acties en antwoorden en ordent je meldingen.\n\nVerbeterde meldingen hebben toegang tot meldingscontent, waaronder persoonlijke informatie zoals contactnamen en berichten. Deze functie kan ook meldingen sluiten of erop reageren, zoals telefoongesprekken aannemen, en Niet storen beheren."</string>
     <string name="dynamic_mode_notification_channel_name" msgid="2986926422100223328">"Informatiemelding voor routinemodus"</string>
     <string name="dynamic_mode_notification_title" msgid="1388718452788985481">"Batterijbesparing staat aan"</string>
     <string name="dynamic_mode_notification_summary" msgid="1639031262484979689">"Het batterijgebruik wordt beperkt om de batterijduur te verlengen"</string>
@@ -2301,7 +2301,7 @@
     <string name="sensor_privacy_start_use_mic_notification_content_title" msgid="2420858361276370367">"Blokkeren van apparaatmicrofoon opheffen"</string>
     <string name="sensor_privacy_start_use_camera_notification_content_title" msgid="7287720213963466672">"Blokkeren van apparaatcamera opheffen"</string>
     <string name="sensor_privacy_start_use_notification_content_text" msgid="7595608891015777346">"Voor &lt;b&gt;<xliff:g id="APP">%s</xliff:g>&lt;/b&gt; en alle andere apps en services"</string>
-    <string name="sensor_privacy_start_use_dialog_turn_on_button" msgid="7089318886628390827">"Blokkeren opheffen"</string>
+    <string name="sensor_privacy_start_use_dialog_turn_on_button" msgid="7089318886628390827">"Niet meer blokkeren"</string>
     <string name="sensor_privacy_notification_channel_label" msgid="936036783155261349">"Sensorprivacy"</string>
     <string name="splash_screen_view_icon_description" msgid="180638751260598187">"App-icoon"</string>
     <string name="splash_screen_view_branding_description" msgid="7911129347402728216">"Merkafbeelding voor app"</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 41d8b50..64736e5 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2ୟ କାର୍ଯ୍ୟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3ୟ କାର୍ଯ୍ୟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> କ୍ଲୋନ"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"ପ୍ରାଇଭେଟ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ PIN ପଚାରନ୍ତୁ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ ଲକ୍‌ ଖୋଲିବା ପାଟର୍ନ ପଚାରନ୍ତୁ"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ଅନପିନ୍‌ କରିବା ପୂର୍ବରୁ ପାସ୍‌ୱର୍ଡ ପଚାରନ୍ତୁ"</string>
@@ -2131,7 +2130,7 @@
     <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ଏୟାରପ୍ଲେନ୍ ମୋଡରେ ବ୍ଲୁଟୁଥ୍ ଚାଲୁ ରହିବ"</string>
     <string name="car_loading_profile" msgid="8219978381196748070">"ଲୋଡ୍ ହେଉଛି"</string>
     <string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + #ଟି ଫାଇଲ}other{{file_name} + #ଟି ଫାଇଲ}}"</string>
-    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ଏହାକୁ ସେୟାର୍ କରିବା ପାଇଁ କୌଣସି ସୁପାରିଶ କରାଯାଇଥିବା ଲୋକ ନାହାଁନ୍ତି"</string>
+    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ଏହାକୁ ସେୟାର କରିବା ପାଇଁ କୌଣସି ସୁପାରିଶ କରାଯାଇଥିବା ଲୋକ ନାହାଁନ୍ତି"</string>
     <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"ଆପ୍ସ ତାଲିକା"</string>
     <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"ଏହି ଆପ୍‌କୁ ରେକର୍ଡ କରିବାକୁ ଅନୁମତି ଦିଆଯାଇ ନାହିଁ କିନ୍ତୁ ଏହି USB ଡିଭାଇସ୍ ଜରିଆରେ ଅଡିଓ କ୍ୟାପ୍‍ଚର୍‍ କରିପାରିବ।"</string>
     <string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ହୋମ"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 8b9934f..8cfc0e4 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"ਦੂਸਰੀ ਕਾਰਜ-ਸਥਾਨ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"ਤੀਸਰੀ ਕਾਰਜ-ਸਥਾਨ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ਦਾ ਕਲੋਨ"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"ਨਿੱਜੀ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ਅਨਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਪਿੰਨ ਮੰਗੋ"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ਅਨਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਅਣਲਾਕ ਪੈਟਰਨ ਵਾਸਤੇ ਪੁੱਛੋ"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ਅਣਪਿੰਨ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ ਪਾਸਵਰਡ ਮੰਗੋ"</string>
@@ -2131,7 +2130,7 @@
     <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ਹਵਾਈ-ਜਹਾਜ਼ ਮੋਡ ਵੇਲੇ ਬਲੂਟੁੱਥ ਹਾਲੇ ਵੀ ਚਾਲੂ ਹੋ ਜਾਵੇਗਾ"</string>
     <string name="car_loading_profile" msgid="8219978381196748070">"ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
     <string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # ਫ਼ਾਈਲ}one{{file_name} + # ਫ਼ਾਈਲ}other{{file_name} + # ਫ਼ਾਈਲਾਂ}}"</string>
-    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ਸਾਂਝਾ ਕਰਨ ਲਈ ਕੋਈ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੇ ਲੋਕ ਨਹੀਂ"</string>
+    <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"ਸਾਂਝਾ ਕਰਨ ਲਈ ਕੋਈ ਸਿਫ਼ਾਰਸ਼ ਕੀਤਾ ਵਿਅਕਤੀ ਨਹੀਂ ਹੈ"</string>
     <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"ਐਪ ਸੂਚੀ"</string>
     <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"ਇਸ ਐਪ ਨੂੰ ਰਿਕਾਰਡ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਨਹੀਂ ਦਿੱਤੀ ਗਈ ਪਰ ਇਹ USB ਡੀਵਾਈਸ ਰਾਹੀਂ ਆਡੀਓ ਕੈਪਚਰ ਕਰ ਸਕਦੀ ਹੈ।"</string>
     <string name="accessibility_system_action_home_label" msgid="3234748160850301870">"ਹੋਮ"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 880892f..a40fae8 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1869,8 +1869,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> – praca 2"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> – praca 3"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klon aplikacji <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Prywatna aplikacja <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Podaj PIN, aby odpiąć"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Aby odpiąć, poproś o wzór odblokowania"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Aby odpiąć, poproś o hasło"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 5dc5463..cf428b7 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1868,8 +1868,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> pentru serviciu (2)"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> pentru serviciu (3)"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Clonă pentru <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Solicită codul PIN înainte de a anula fixarea"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Solicită mai întâi modelul pentru deblocare"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Solicită parola înainte de a anula fixarea"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index e09593e..4986c10 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1865,12 +1865,11 @@
     <string name="select_day" msgid="2060371240117403147">"Выберите месяц и число"</string>
     <string name="select_year" msgid="1868350712095595393">"Выберите год"</string>
     <string name="deleted_key" msgid="9130083334943364001">"Цифра <xliff:g id="KEY">%1$s</xliff:g> удалена"</string>
-    <string name="managed_profile_label_badge" msgid="6762559569999499495">"Рабочий <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+    <string name="managed_profile_label_badge" msgid="6762559569999499495">"<xliff:g id="LABEL">%1$s</xliff:g> (рабочий профиль)"</string>
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Задача 2: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Задача 3: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Клонировать <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (личный профиль)"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Запрашивать PIN-код"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запрашивать графический ключ"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запрашивать пароль"</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 99d90be..1b6230d 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2වන වැඩ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3වන වැඩ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> ක්ලෝන කරන්න"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"පෞද්ගලික <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"ගැලවීමට පෙර PIN විමසන්න"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"ගැලවීමට පෙර අගුළු අරින රටාව සඳහා අසන්න"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"ගැලවීමට පෙර මුරපදය විමසන්න"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index a3ca1a6..9784308 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -808,7 +808,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Povolí vlastníkovi aktualizovať aplikáciu, ktorá bola nainštalovaná bez akcie používateľa"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Nastaviť pravidlá pre heslo"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Nastavte dĺžku hesiel na odomknutie obrazovky aj kódov PIN a v nich používané znaky."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Sledovanie pokusov o odomknutie obrazovky"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Sledovať pokusy o odomknutie obrazovky"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Sledovať počet nesprávnych hesiel zadaných pri odomykaní obrazovky a zamknúť tablet alebo vymazať všetky údaje tabletu v prípade príliš veľkého počtu neplatných pokusov o zadanie hesla."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Sledovanie počtu nesprávnych hesiel zadaných pri odomykaní obrazovky a v prípade, že ich je zadaných príliš mnoho, uzamknutie zariadenia Android TV alebo vymazanie všetkých jeho údajov."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Sledujte počet nesprávnych hesiel zadaných pri odomykaní obrazovky a uzamknite palubný systém alebo vymažte všetky údaje v palubnom systéme v prípade príliš veľkého počtu neplatných pokusov o zadanie hesla."</string>
@@ -1869,8 +1869,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2. <xliff:g id="LABEL">%1$s</xliff:g> do práce"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3. <xliff:g id="LABEL">%1$s</xliff:g> do práce"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klonovať <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Súkromná aplikácia <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Pred odopnutím požiadať o číslo PIN"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Pred uvoľnením požiadať o bezpečnostný vzor"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Pred odopnutím požiadať o heslo"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 5292fc3..16ea77f 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -812,7 +812,7 @@
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Nadzoruje število nepravilno vnesenih gesel pri odklepanju zaslona in zaklene tablični računalnik ali izbriše vse podatke v njem, če je vnesenih preveč nepravilnih gesel."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene napravo Android TV ali izbriše vse podatke v napravi Android TV, če je vnesenih preveč nepravilnih gesel."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Spremljanje števila nepravilno vnesenih gesel pri odklepanju zaslona in zaklenitev informativno-razvedrilnega sistema ali izbris vseh podatkov v njem v primeru preveč vnosov nepravilnih gesel"</string>
-    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Spremljajte število vnesenih napačnih gesel, s katerimi želite odkleniti zaslon. Če je teh vnosov preveč, zaklenite telefon ali izbrišite vse podatke v njem."</string>
+    <string name="policydesc_watchLogin" product="default" msgid="4885030206253600299">"Spremljanje števila vnosov napačnih gesel za odklepanje zaslona ter zaklenitev telefona ali izbris vseh podatkov v njem v primeru prevelikega števila vnosov napačnih gesel."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tablet" msgid="2049038943004297474">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene tablični računalnik ali izbriše vse podatke lastnika, če je vnesenih preveč nepravilnih gesel."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="tv" msgid="8965224107449407052">"Nadzira število vnesenih nepravilnih gesel pri odklepanju zaslona in zaklene napravo Android TV ali izbriše vse podatke tega uporabnika, če je vnesenih preveč nepravilnih gesel."</string>
     <string name="policydesc_watchLogin_secondaryUser" product="automotive" msgid="7180857406058327941">"Spremljanje števila nepravilno vnesenih gesel pri odklepanju zaslona in zaklenitev informativno-razvedrilnega sistema ali izbris vseh podatkov tega profila v primeru preveč vnosov nepravilnih gesel"</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index fd74534..a3d648f 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -983,7 +983,7 @@
     <string name="lockscreen_missing_sim_instructions" msgid="5823469004536805423">"Shto një kartë SIM."</string>
     <string name="lockscreen_missing_sim_instructions_long" msgid="4403843937236648032">"Karta SIM mungon ose është e palexueshme. Shto një kartë SIM."</string>
     <string name="lockscreen_permanent_disabled_sim_message_short" msgid="1925200607820809677">"Kartë SIM e papërdorshme."</string>
-    <string name="lockscreen_permanent_disabled_sim_instructions" msgid="6902979937802238429">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit me valë për një kartë tjetër SIM."</string>
+    <string name="lockscreen_permanent_disabled_sim_instructions" msgid="6902979937802238429">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit wireless për një tjetër kartë SIM."</string>
     <string name="lockscreen_transport_prev_description" msgid="2879469521751181478">"Kënga e mëparshme"</string>
     <string name="lockscreen_transport_next_description" msgid="2931509904881099919">"Kënga tjetër"</string>
     <string name="lockscreen_transport_pause_description" msgid="6705284702135372494">"Pauzë"</string>
@@ -1198,7 +1198,7 @@
     <string name="whichEditApplicationNamed" msgid="8096494987978521514">"Redakto me %1$s"</string>
     <string name="whichEditApplicationLabel" msgid="1463288652070140285">"Redakto"</string>
     <string name="whichSendApplication" msgid="4143847974460792029">"Ndaj"</string>
-    <string name="whichSendApplicationNamed" msgid="4470386782693183461">"Shpërndaj me %1$s"</string>
+    <string name="whichSendApplicationNamed" msgid="4470386782693183461">"Ndaj me %1$s"</string>
     <string name="whichSendApplicationLabel" msgid="7467813004769188515">"Ndaj"</string>
     <string name="whichSendToApplication" msgid="77101541959464018">"Dërgo me"</string>
     <string name="whichSendToApplicationNamed" msgid="3385686512014670003">"Dërgo me %1$s"</string>
@@ -1523,7 +1523,7 @@
     <string name="matches_found" msgid="2296462299979507689">"{count,plural, =1{# përputhje}other{# nga {total}}}"</string>
     <string name="action_mode_done" msgid="2536182504764803222">"U krye"</string>
     <string name="progress_erasing" msgid="6891435992721028004">"Po fshin hapësirën ruajtëse të brendshme…"</string>
-    <string name="share" msgid="4157615043345227321">"Shpërndaj"</string>
+    <string name="share" msgid="4157615043345227321">"Ndaj"</string>
     <string name="find" msgid="5015737188624767706">"Gjej"</string>
     <string name="websearch" msgid="5624340204512793290">"Kërkim në internet"</string>
     <string name="find_next" msgid="5341217051549648153">"Gjej tjetrën"</string>
@@ -1568,8 +1568,8 @@
     <string name="keyboardview_keycode_enter" msgid="168054869339091055">"Enter"</string>
     <string name="activitychooserview_choose_application" msgid="3500574466367891463">"Zgjidh një aplikacion"</string>
     <string name="activitychooserview_choose_application_error" msgid="6937782107559241734">"Nuk mundi ta hapte <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
-    <string name="shareactionprovider_share_with" msgid="2753089758467748982">"Shpërndaj me"</string>
-    <string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Shpërndaj me <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
+    <string name="shareactionprovider_share_with" msgid="2753089758467748982">"Ndaj me"</string>
+    <string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Ndaj me <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
     <string name="content_description_sliding_handle" msgid="982510275422590757">"Dorezë me rrëshqitje. Preke dhe mbaje të shtypur."</string>
     <string name="description_target_unlock_tablet" msgid="7431571180065859551">"Rrëshqit për të shkyçur."</string>
     <string name="action_bar_home_description" msgid="1501655419158631974">"Orientohu për në shtëpi"</string>
@@ -1613,7 +1613,7 @@
     <string name="sha1_fingerprint" msgid="2339915142825390774">"Gjurma e gishtit SHA-1:"</string>
     <string name="activity_chooser_view_see_all" msgid="3917045206812726099">"Shikoji të gjitha"</string>
     <string name="activity_chooser_view_dialog_title_default" msgid="8880731437191978314">"Zgjidh aktivitetin"</string>
-    <string name="share_action_provider_share_with" msgid="1904096863622941880">"Shpërndaj me"</string>
+    <string name="share_action_provider_share_with" msgid="1904096863622941880">"Ndaj me"</string>
     <string name="sending" msgid="206925243621664438">"Po dërgon…"</string>
     <string name="launchBrowserDefault" msgid="6328349989932924119">"Të hapet shfletuesi?"</string>
     <string name="SetupCallDefault" msgid="5581740063237175247">"Dëshiron ta pranosh telefonatën?"</string>
@@ -1629,7 +1629,7 @@
     <string name="default_audio_route_name_usb" msgid="895668743163316932">"USB"</string>
     <string name="default_audio_route_category_name" msgid="5241740395748134483">"Sistemi"</string>
     <string name="bluetooth_a2dp_audio_route_name" msgid="4214648773120426288">"Audioja e \"bluetooth-it\""</string>
-    <string name="wireless_display_route_description" msgid="8297563323032966831">"Ekran pa tel"</string>
+    <string name="wireless_display_route_description" msgid="8297563323032966831">"Ekran wireless"</string>
     <string name="media_route_button_content_description" msgid="2299223698196869956">"Transmeto"</string>
     <string name="media_route_chooser_title" msgid="6646594924991269208">"Lidhu me pajisjen"</string>
     <string name="media_route_chooser_title_for_remote_display" msgid="3105906508794326446">"Transmeto ekranin në pajisje"</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"<xliff:g id="LABEL">%1$s</xliff:g> i dytë i punës"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"<xliff:g id="LABEL">%1$s</xliff:g> i tretë i punës"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klonim i <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> privat"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Zhgozhdimi kërkon PIN-in"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Kërko motivin e shkyçjes para heqjes së gozhdimit"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Kërko fjalëkalim para heqjes nga gozhdimi."</string>
@@ -1889,9 +1888,9 @@
     <string name="zen_mode_duration_minutes_short" msgid="2435756450204526554">"{count,plural, =1{Për 1 min.}other{Për # min.}}"</string>
     <string name="zen_mode_duration_hours" msgid="7841806065034711849">"{count,plural, =1{Për 1 orë}other{Për # orë}}"</string>
     <string name="zen_mode_duration_hours_short" msgid="3666949653933099065">"{count,plural, =1{Për 1 orë}other{Për # orë}}"</string>
-    <string name="zen_mode_until_next_day" msgid="1403042784161725038">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
-    <string name="zen_mode_until" msgid="2250286190237669079">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
-    <string name="zen_mode_alarm" msgid="7046911727540499275">"Deri në <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarmi tjetër)"</string>
+    <string name="zen_mode_until_next_day" msgid="1403042784161725038">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+    <string name="zen_mode_until" msgid="2250286190237669079">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
+    <string name="zen_mode_alarm" msgid="7046911727540499275">"Deri: <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> (alarmi tjetër)"</string>
     <string name="zen_mode_forever" msgid="740585666364912448">"Derisa ta çaktivizosh"</string>
     <string name="zen_mode_forever_dnd" msgid="3423201955704180067">"Deri sa të çaktivizosh gjendjen \"Mos shqetëso\""</string>
     <string name="zen_mode_rule_name_combination" msgid="7174598364351313725">"<xliff:g id="FIRST">%1$s</xliff:g> / <xliff:g id="REST">%2$s</xliff:g>"</string>
@@ -2164,9 +2163,9 @@
     <string name="resolver_personal_tab_accessibility" msgid="5739524949153091224">"Pamja personale"</string>
     <string name="resolver_work_tab_accessibility" msgid="4753168230363802734">"Pamja e punës"</string>
     <string name="resolver_cross_profile_blocked" msgid="3014597376026044840">"Bllokuar nga administratori yt i teknologjisë së informacionit"</string>
-    <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Kjo përmbajtje nuk mund të shpërndahet me aplikacione pune"</string>
+    <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Kjo përmbajtje nuk mund të ndahet me aplikacione pune"</string>
     <string name="resolver_cant_access_work_apps_explanation" msgid="1129960195389373279">"Kjo përmbajtje nuk mund të hapet me aplikacione pune"</string>
-    <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Kjo përmbajtje nuk mund të shpërndahet me aplikacione personale"</string>
+    <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Kjo përmbajtje nuk mund të ndahet me aplikacione personale"</string>
     <string name="resolver_cant_access_personal_apps_explanation" msgid="1679399548862724359">"Kjo përmbajtje nuk mund të hapet me aplikacione personale"</string>
     <string name="resolver_turn_on_work_apps" msgid="1535946298236678122">"Aplikacionet e punës janë vendosur në pauzë"</string>
     <string name="resolver_switch_on_work" msgid="4527096360772311894">"Hiq nga pauza"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 81c1915..712aeb9 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -807,7 +807,7 @@
     <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Дозвољава власнику да ажурира апликацију коју је претходно инсталирала без радњи корисника"</string>
     <string name="policylab_limitPassword" msgid="4851829918814422199">"Подешавање правила за лозинку"</string>
     <string name="policydesc_limitPassword" msgid="4105491021115793793">"Контролише дужину и знакове дозвољене у лозинкама и PIN-овима за закључавање екрана."</string>
-    <string name="policylab_watchLogin" msgid="7599669460083719504">"Надгледајте покушаје откључавања екрана"</string>
+    <string name="policylab_watchLogin" msgid="7599669460083719504">"Надзор покушаја откључавања екрана"</string>
     <string name="policydesc_watchLogin" product="tablet" msgid="2388436408621909298">"Прати број нетачно унетих лозинки приликом откључавања екрана и закључава таблет или брише податке са таблета ако је нетачна лозинка унета превише пута."</string>
     <string name="policydesc_watchLogin" product="tv" msgid="2140588224468517507">"Надгледа број нетачних лозинки унетих при откључавању екрана и закључава Android TV уређај или брише све податке са Android TV уређаја ако се унесе превише нетачних лозинки."</string>
     <string name="policydesc_watchLogin" product="automotive" msgid="7011438994051251521">"Прати број нетачно унетих лозинки при откључавању екрана и закључава систем за инфо-забаву или брише све податке са система за инфо-забаву ако је нетачна лозинка унета превише пута."</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 1ca3e08..3624f71 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Andra <xliff:g id="LABEL">%1$s</xliff:g> för jobbet"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Tredje <xliff:g id="LABEL">%1$s</xliff:g> för jobbet"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Klona <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Privat <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Be om pinkod innan skärmen slutar fästas"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Be om upplåsningsmönster innan skärmen slutar fästas"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Be om lösenord innan skärmen slutar fästas"</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 5b2b2b2..8c2ddb0 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2வது பணி <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3வது பணி <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"குளோன் <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"தனிப்பட்ட <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"அகற்றும் முன் PINஐக் கேள்"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"அகற்றும் முன் அன்லாக் பேட்டர்னைக் கேள்"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"அகற்றும் முன் கடவுச்சொல்லைக் கேள்"</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 5b9e737..4c7835f 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -322,7 +322,7 @@
     <string name="permgroupdesc_camera" msgid="7585150538459320326">"చిత్రాలను తీయడానికి మరియు వీడియోను రికార్డ్ చేయడానికి"</string>
     <string name="permgrouplab_nearby_devices" msgid="5529147543651181991">"సమీపంలోని పరికరాలు"</string>
     <string name="permgroupdesc_nearby_devices" msgid="3213561597116913508">"సమీప పరికరాలను కనుగొనండి అలాగే కనెక్ట్ చేయండి"</string>
-    <string name="permgrouplab_calllog" msgid="7926834372073550288">"కాల్ లాగ్‌లు"</string>
+    <string name="permgrouplab_calllog" msgid="7926834372073550288">"కాల్ లాగ్స్‌"</string>
     <string name="permgroupdesc_calllog" msgid="2026996642917801803">"ఫోన్ కాల్ లాగ్‌ని చదవండి మరియు రాయండి"</string>
     <string name="permgrouplab_phone" msgid="570318944091926620">"ఫోన్"</string>
     <string name="permgroupdesc_phone" msgid="270048070781478204">"ఫోన్ కాల్స్‌ చేయడం మరియు నిర్వహించడం"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 33b050a..ee45ede 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -819,7 +819,7 @@
     <string name="policydesc_resetPassword" msgid="4626419138439341851">"Ekran kilidini değiştirir."</string>
     <string name="policylab_forceLock" msgid="7360335502968476434">"Ekranı kilitleme"</string>
     <string name="policydesc_forceLock" msgid="1008844760853899693">"Ekranın nasıl ve ne zaman kilitleneceğini denetler."</string>
-    <string name="policylab_wipeData" msgid="1359485247727537311">"Tüm verileri silme"</string>
+    <string name="policylab_wipeData" msgid="1359485247727537311">"Tüm verileri sil"</string>
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek tabletteki verileri uyarıda bulunmadan siler."</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek Android TV cihazınızdaki verileri uyarıda bulunmadan siler."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Fabrika verilerine sıfırlama işlemi gerçekleştirerek bilgi-eğlence sistemindeki veriler uyarıda bulunmadan silinir."</string>
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"İş için 2. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"İş için 3. <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> klonu"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"Gizli <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Sabitlemeyi kaldırmadan önce PIN\'i sor"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Sabitlemeyi kaldırmadan önce kilit açma desenini sor"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Sabitlemeyi kaldırmadan önce şifre sor"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index f6d426d..63b7560 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -821,7 +821,7 @@
     <string name="policydesc_resetPassword" msgid="4626419138439341851">"Змінити спосіб розблокування екрана."</string>
     <string name="policylab_forceLock" msgid="7360335502968476434">"Блокувати екран"</string>
     <string name="policydesc_forceLock" msgid="1008844760853899693">"Контролювати, як і коли блокується екран."</string>
-    <string name="policylab_wipeData" msgid="1359485247727537311">"Видалити всі дані"</string>
+    <string name="policylab_wipeData" msgid="1359485247727537311">"Видаляти всі дані"</string>
     <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"Стирати дані планшетного ПК без попередження, відновлюючи заводські налаштування."</string>
     <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"Видаляйте дані пристрою Android TV без попередження шляхом відновлення заводських налаштувань."</string>
     <string name="policydesc_wipeData" product="automotive" msgid="660804547737323300">"Видаляйте всі дані інформаційно-розважальної системи без попередження, відновлюючи заводські налаштування."</string>
@@ -1869,8 +1869,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"2-а робота: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"3-я робота: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Копія додатка <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> (приватний профіль)"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"PIN-код для відкріплення"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Запитувати ключ розблокування перед відкріпленням"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Запитувати пароль перед відкріпленням"</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index c8cd1cb..bd6ea76 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"دوسرا کام <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"تیسرا کام <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"<xliff:g id="LABEL">%1$s</xliff:g> کلون"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"نجی <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"‏پن ہٹانے سے پہلے PIN طلب کریں"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"پن ہٹانے سے پہلے غیر مقفل کرنے کا پیٹرن طلب کریں"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"پن ہٹانے سے پہلے پاس ورڈ طلب کریں"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 5b92609..c02adbc 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1867,8 +1867,7 @@
     <string name="managed_profile_label_badge_2" msgid="5673187309555352550">"Công việc thứ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="managed_profile_label_badge_3" msgid="6882151970556391957">"Công việc thứ 2 <xliff:g id="LABEL">%1$s</xliff:g>"</string>
     <string name="clone_profile_label_badge" msgid="1871997694718793964">"Sao chép <xliff:g id="LABEL">%1$s</xliff:g>"</string>
-    <!-- no translation found for private_profile_label_badge (1712086003787839183) -->
-    <skip />
+    <string name="private_profile_label_badge" msgid="1712086003787839183">"<xliff:g id="LABEL">%1$s</xliff:g> riêng tư"</string>
     <string name="lock_to_app_unlock_pin" msgid="3890940811866290782">"Hỏi mã PIN trước khi bỏ ghim"</string>
     <string name="lock_to_app_unlock_pattern" msgid="2694204070499712503">"Hỏi hình mở khóa trước khi bỏ ghim"</string>
     <string name="lock_to_app_unlock_password" msgid="9126722403506560473">"Hỏi mật khẩu trước khi bỏ ghim"</string>
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml
index b0d9b67..4027f5c 100644
--- a/core/res/res/values-watch/config.xml
+++ b/core/res/res/values-watch/config.xml
@@ -77,4 +77,13 @@
 
     <!-- Default hyphenation frequency setting (0=NONE, 1=NORMAL, 2=FULL). -->
     <item name="config_preferredHyphenationFrequency" format="integer" type="dimen">1</item>
+
+    <!-- Floating windows can be fullscreen (i.e. windowIsFloating can still have fullscreen
+         window that does not wrap content). -->
+    <bool name="config_allowFloatingWindowsFillScreen">true</bool>
+
+    <!-- Whether scroll haptic feedback is enabled for rotary encoder scrolls on
+         {@link MotionEvent#AXIS_SCROLL} generated by {@link InputDevice#SOURCE_ROTARY_ENCODER}
+         devices. -->
+    <bool name="config_viewRotaryEncoderHapticScrollFedbackEnabled">true</bool>
 </resources>
diff --git a/core/res/res/values-watch/dimens_material.xml b/core/res/res/values-watch/dimens_material.xml
index 40673c1..2ab2d91 100644
--- a/core/res/res/values-watch/dimens_material.xml
+++ b/core/res/res/values-watch/dimens_material.xml
@@ -58,4 +58,7 @@
     <dimen name="screen_percentage_10">0dp</dimen>
     <dimen name="screen_percentage_12">0dp</dimen>
     <dimen name="screen_percentage_15">0dp</dimen>
+
+    <!-- dialog elevation [overrides 18dp] -->
+    <dimen name="floating_window_z">2dp</dimen>
   </resources>
diff --git a/core/res/res/values-watch/themes_device_defaults.xml b/core/res/res/values-watch/themes_device_defaults.xml
index c4c1ed9..df8158d 100644
--- a/core/res/res/values-watch/themes_device_defaults.xml
+++ b/core/res/res/values-watch/themes_device_defaults.xml
@@ -52,6 +52,7 @@
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar -->
     <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Material.NoActionBar">
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -70,6 +71,8 @@
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar.  This theme
          sets {@link android.R.attr#windowFullscreen} to true.  -->
     <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Material.NoActionBar.Fullscreen">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -90,6 +93,7 @@
     sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
     to true. -->
     <style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Material.NoActionBar.Overscan">
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -149,8 +153,8 @@
     watch theme is not floating. You can set this theme on an activity if you would like to make
     an activity that looks like a Dialog.-->
     <style name="Theme.DeviceDefault.Dialog" parent="Theme.Material.Dialog" >
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+        <item name="android:windowFullscreen">true</item>
+
         <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
         <item name="windowAnimationStyle">@style/Animation.DeviceDefault.Dialog</item>
 
@@ -175,6 +179,23 @@
         <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
     </style>
 
+    <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
+        <item name="android:windowFullscreen">true</item>
+        <!-- Color palette Dark -->
+        <item name="colorPrimary">@color/primary_device_default_dark</item>
+        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
+        <item name="colorForeground">@color/foreground_device_default_dark</item>
+        <item name="colorAccent">@color/accent_device_default_dark</item>
+        <item name="colorBackground">@color/background_device_default_dark</item>
+        <item name="colorBackgroundFloating">@color/background_floating_device_default_dark</item>
+        <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_device_default</item>
+        <item name="colorButtonNormal">@color/button_normal_device_default_dark</item>
+        <item name="colorError">@color/error_color_device_default_dark</item>
+        <item name="disabledAlpha">@dimen/disabled_alpha_device_default</item>
+        <item name="primaryContentAlpha">@dimen/primary_content_alpha_device_default</item>
+        <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
+    </style>
+
     <!-- DeviceDefault theme for a window that should look like the Settings app.  -->
     <style name="Theme.DeviceDefault.Settings" parent="Theme.DeviceDefault"/>
     <style name="Theme.DeviceDefault.Settings.NoActionBar" parent="Theme.DeviceDefault"/>
@@ -185,9 +206,9 @@
     <style name="Theme.DeviceDefault.Settings.Dialog.Presentation" parent="Theme.DeviceDefault.Dialog.Presentation"/>
     <style name="Theme.DeviceDefault.Settings.SearchBar" parent="Theme.DeviceDefault.SearchBar"/>
 
-    <style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+    <style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.DeviceDefault.Dialog.Alert">
+        <item name="android:windowFullscreen">true</item>
+        <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -204,8 +225,6 @@
     </style>
 
     <style name="Theme.DeviceDefault.Settings.CompactMenu" parent="Theme.Material.CompactMenu">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -224,8 +243,7 @@
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
     regular dialog. -->
     <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Material.Dialog.MinWidth">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+        <item name="android:windowFullscreen">true</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -243,8 +261,8 @@
 
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
     <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Material.Dialog.NoActionBar">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -263,8 +281,8 @@
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
     for a regular dialog. -->
     <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Material.Dialog.NoActionBar.MinWidth">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -302,6 +320,8 @@
     full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
     xlarge). -->
     <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Material.DialogWhenLarge.NoActionBar">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -319,6 +339,7 @@
 
     <!-- DeviceDefault theme for a presentation window on a secondary display. -->
     <style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Material.Dialog.Presentation">
+        <item name="android:windowFullscreen">true</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -338,6 +359,8 @@
     decorations, so you basically have an empty rectangle in which to place your content. It makes
     the window floating, with a transparent background, and turns off dimming behind the window. -->
     <style name="Theme.DeviceDefault.Panel" parent="Theme.Material.Panel">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowActionBar">false</item>
         <!-- Color palette Dark -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
@@ -407,24 +430,6 @@
         <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
     </style>
 
-    <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
-        <item name="windowTitleStyle">@style/DialogWindowTitle.DeviceDefault</item>
-
-        <!-- Color palette Dialog -->
-        <item name="colorPrimary">@color/primary_device_default_dark</item>
-        <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
-        <item name="colorForeground">@color/foreground_device_default_dark</item>
-        <item name="colorAccent">@color/accent_device_default_dark</item>
-        <item name="colorBackground">@color/background_device_default_dark</item>
-        <item name="colorBackgroundFloating">@color/background_floating_device_default_dark</item>
-        <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_device_default</item>
-        <item name="colorButtonNormal">@color/button_normal_device_default_dark</item>
-        <item name="colorError">@color/error_color_device_default_dark</item>
-        <item name="disabledAlpha">@dimen/disabled_alpha_device_default</item>
-        <item name="primaryContentAlpha">@dimen/primary_content_alpha_device_default</item>
-        <item name="secondaryContentAlpha">@dimen/secondary_content_alpha_device_default</item>
-    </style>
-
     <!-- Theme for the dialog shown when an app crashes or ANRs. Override to make it dark. -->
     <style name="Theme.DeviceDefault.Dialog.AppError" parent="Theme.DeviceDefault.Dialog.Alert">
         <item name="alertDialogStyle">@style/BaseErrorDialog.DeviceDefault</item>
@@ -451,8 +456,6 @@
     </style>
 
     <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Material.Dialog.NoFrame">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
         <!-- Color palette Dialog -->
         <item name="colorPrimary">@color/primary_device_default_dark</item>
         <item name="colorPrimaryDark">@color/primary_dark_device_default_dark</item>
diff --git a/core/res/res/values-watch/themes_material.xml b/core/res/res/values-watch/themes_material.xml
index 40a249a..674b3bc 100644
--- a/core/res/res/values-watch/themes_material.xml
+++ b/core/res/res/values-watch/themes_material.xml
@@ -42,26 +42,31 @@
 
     <!-- Override behaviour to set the theme colours for dialogs, keep them the same. -->
     <style name="ThemeOverlay.Material.Dialog" parent="ThemeOverlay.Material.BaseDialog">
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+        <item name="android:windowFullscreen">true</item>
     </style>
 
     <!-- Force the background and floating colours to be the default colours. -->
     <style name="Theme.Material.Dialog" parent="Theme.Material.BaseDialog">
+        <item name="android:windowFullscreen">true</item>
         <item name="colorBackground">@color/background_material_dark</item>
         <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
         <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
+    </style>
+
+    <!-- Force the background and floating colours to be the default colours. -->
+    <style name="Theme.Material.Dialog.Alert" parent="Theme.Material.Dialog.BaseAlert">
+        <item name="android:windowFullscreen">true</item>
+        <item name="colorBackground">@color/background_material_dark</item>
+        <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
+        <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
     </style>
 
     <!-- Force the background and floating colours to be the default colours. -->
     <style name="Theme.Material.Light.Dialog" parent="Theme.Material.Light.BaseDialog">
+        <item name="android:windowFullscreen">true</item>
         <item name="colorBackground">@color/background_material_light</item>
         <item name="colorBackgroundFloating">@color/background_floating_material_light</item>
         <item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
-        <item name="windowIsFloating">false</item>
-        <item name="windowElevation">0dp</item>
     </style>
 
     <!-- Force all settings themes to use normal Material theme. -->
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 7d2690e..d09bf44 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -5717,13 +5717,13 @@
 
     <!-- Blur radius for the Option 3 in R.integer.config_letterboxBackgroundType. Values < 0 are
         ignored and 0 is used. -->
-    <dimen name="config_letterboxBackgroundWallpaperBlurRadius">24dp</dimen>
+    <dimen name="config_letterboxBackgroundWallpaperBlurRadius">38dp</dimen>
 
     <!-- Alpha of a black translucent scrim showed over wallpaper letterbox background when
         the Option 3 is selected for R.integer.config_letterboxBackgroundType.
         Values < 0 or >= 1 are ignored and 0.0 (transparent) is used instead. -->
     <item name="config_letterboxBackgroundWallaperDarkScrimAlpha" format="float" type="dimen">
-        0.75
+        0.54
     </item>
 
     <!-- Corners appearance of the letterbox background.
@@ -6699,6 +6699,10 @@
     <!-- Whether unlocking and waking a device are sequenced -->
     <bool name="config_orderUnlockAndWake">false</bool>
 
+    <!-- Floating windows can be fullscreen (i.e. windowIsFloating can still have fullscreen
+     window that does not wrap content). -->
+    <bool name="config_allowFloatingWindowsFillScreen">false</bool>
+
     <!-- Whether scroll haptic feedback is enabled for rotary encoder scrolls on
          {@link MotionEvent#AXIS_SCROLL} generated by {@link InputDevice#SOURCE_ROTARY_ENCODER}
          devices. -->
diff --git a/core/res/res/values/config_telephony.xml b/core/res/res/values/config_telephony.xml
index 6bb87f3..9bf3ce4 100644
--- a/core/res/res/values/config_telephony.xml
+++ b/core/res/res/values/config_telephony.xml
@@ -151,6 +151,27 @@
     <integer name="config_timeout_to_receive_delivered_ack_millis">300000</integer>
     <java-symbol type="integer" name="config_timeout_to_receive_delivered_ack_millis" />
 
+    <!-- The time duration in millis that the satellite will stay at listening state to wait for the
+         next incoming page before disabling listening and moving to IDLE state. This timeout
+         duration is used when transitioning from sending state to listening state.
+         -->
+    <integer name="config_satellite_stay_at_listening_from_sending_millis">180000</integer>
+    <java-symbol type="integer" name="config_satellite_stay_at_listening_from_sending_millis" />
+
+    <!-- The time duration in millis that the satellite will stay at listening state to wait for the
+         next incoming page before disabling listening and moving to IDLE state. This timeout
+         duration is used when transitioning from receiving state to listening state.
+         -->
+    <integer name="config_satellite_stay_at_listening_from_receiving_millis">30000</integer>
+    <java-symbol type="integer" name="config_satellite_stay_at_listening_from_receiving_millis" />
+
+    <!-- The time duration in millis after which cellular scanning will be enabled and satellite
+         will move to IDLE state. This timeout duration is used for satellite with NB IOT radio
+         technologies.
+         -->
+    <integer name="config_satellite_nb_iot_inactivity_timeout_millis">180000</integer>
+    <java-symbol type="integer" name="config_satellite_nb_iot_inactivity_timeout_millis" />
+
     <!-- Telephony config for services supported by satellite providers. The format of each config
          string in the array is as follows: "PLMN_1:service_1,service_2,..."
          where PLMN is the satellite PLMN of a provider and service is an integer with the
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 80c2fbf..7f1a6f9 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -5226,6 +5226,9 @@
   <!-- Whether we order unlocking and waking -->
   <java-symbol type="bool" name="config_orderUnlockAndWake" />
 
+  <!-- Allow windowIsFloating to fill screen. -->
+  <java-symbol type="bool" name="config_allowFloatingWindowsFillScreen" />
+
   <!-- External TV Input Logging Configs -->
   <java-symbol type="bool" name="config_tvExternalInputLoggingDisplayNameFilterEnabled" />
   <java-symbol type="array" name="config_tvExternalInputLoggingDeviceOnScreenDisplayNames" />
diff --git a/core/tests/BroadcastRadioTests/src/android/hardware/radio/ProgramListTest.java b/core/tests/BroadcastRadioTests/src/android/hardware/radio/ProgramListTest.java
index 7c3d2f2..d638fed 100644
--- a/core/tests/BroadcastRadioTests/src/android/hardware/radio/ProgramListTest.java
+++ b/core/tests/BroadcastRadioTests/src/android/hardware/radio/ProgramListTest.java
@@ -74,18 +74,45 @@
     private static final ProgramSelector.Identifier DAB_ENSEMBLE_IDENTIFIER =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE,
                     /* value= */ 0x1013);
+    private static final ProgramSelector.Identifier DAB_FREQUENCY_IDENTIFIER_1 =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 222_064);
+    private static final ProgramSelector.Identifier DAB_FREQUENCY_IDENTIFIER_2 =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_352);
+
+    private static final ProgramSelector DAB_SELECTOR_1 = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, DAB_DMB_SID_EXT_IDENTIFIER,
+            new ProgramSelector.Identifier[]{DAB_ENSEMBLE_IDENTIFIER, DAB_FREQUENCY_IDENTIFIER_1},
+            /* vendorIds= */ null);
+    private static final ProgramSelector DAB_SELECTOR_2 = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, DAB_DMB_SID_EXT_IDENTIFIER,
+            new ProgramSelector.Identifier[]{DAB_ENSEMBLE_IDENTIFIER, DAB_FREQUENCY_IDENTIFIER_2},
+            /* vendorIds= */ null);
+
+    private static final UniqueProgramIdentifier RDS_UNIQUE_IDENTIFIER =
+            new UniqueProgramIdentifier(RDS_IDENTIFIER);
+    private static final UniqueProgramIdentifier DAB_UNIQUE_IDENTIFIER_1 =
+            new UniqueProgramIdentifier(DAB_SELECTOR_1);
+    private static final UniqueProgramIdentifier DAB_UNIQUE_IDENTIFIER_2 =
+            new UniqueProgramIdentifier(DAB_SELECTOR_2);
+
     private static final RadioManager.ProgramInfo FM_PROGRAM_INFO = createFmProgramInfo(
             createProgramSelector(ProgramSelector.PROGRAM_TYPE_FM, FM_IDENTIFIER));
-    private static final RadioManager.ProgramInfo RDS_PROGRAM_INFO = createFmProgramInfo(
-            createProgramSelector(ProgramSelector.PROGRAM_TYPE_FM, RDS_IDENTIFIER));
+    private static final RadioManager.ProgramInfo DAB_PROGRAM_INFO_1 = createDabProgramInfo(
+            DAB_SELECTOR_1);
+    private static final RadioManager.ProgramInfo DAB_PROGRAM_INFO_2 = createDabProgramInfo(
+            DAB_SELECTOR_2);
 
     private static final Set<Integer> FILTER_IDENTIFIER_TYPES = Set.of(
-            ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, ProgramSelector.IDENTIFIER_TYPE_RDS_PI);
-    private static final Set<ProgramSelector.Identifier> FILTER_IDENTIFIERS = Set.of(FM_IDENTIFIER);
+            ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
+            ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT);
+    private static final Set<ProgramSelector.Identifier> FILTER_IDENTIFIERS = Set.of(
+            FM_IDENTIFIER, DAB_DMB_SID_EXT_IDENTIFIER);
 
-    private static final ProgramList.Chunk FM_RDS_ADD_CHUNK = new ProgramList.Chunk(IS_PURGE,
-            IS_COMPLETE, Set.of(FM_PROGRAM_INFO, RDS_PROGRAM_INFO),
-            Set.of(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER));
+    private static final ProgramList.Chunk FM_DAB_ADD_CHUNK = new ProgramList.Chunk(IS_PURGE,
+            IS_COMPLETE, Set.of(FM_PROGRAM_INFO, DAB_PROGRAM_INFO_1, DAB_PROGRAM_INFO_2),
+            Set.of(RDS_UNIQUE_IDENTIFIER));
     private static final ProgramList.Chunk FM_ADD_INCOMPLETE_CHUNK = new ProgramList.Chunk(IS_PURGE,
             /* complete= */ false, Set.of(FM_PROGRAM_INFO), new ArraySet<>());
     private static final ProgramList.Filter TEST_FILTER = new ProgramList.Filter(
@@ -213,58 +240,44 @@
 
     @Test
     public void isPurge_forChunk() {
-        ProgramList.Chunk chunk = new ProgramList.Chunk(IS_PURGE, IS_COMPLETE,
-                Set.of(FM_PROGRAM_INFO, RDS_PROGRAM_INFO),
-                Set.of(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER));
-
-        assertWithMessage("Puring chunk").that(chunk.isPurge()).isEqualTo(IS_PURGE);
+        assertWithMessage("Puring chunk").that(FM_DAB_ADD_CHUNK.isPurge()).isEqualTo(IS_PURGE);
     }
 
     @Test
     public void isComplete_forChunk() {
-        ProgramList.Chunk chunk = new ProgramList.Chunk(IS_PURGE, IS_COMPLETE,
-                Set.of(FM_PROGRAM_INFO, RDS_PROGRAM_INFO),
-                Set.of(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER));
-
-        assertWithMessage("Complete chunk").that(chunk.isComplete()).isEqualTo(IS_COMPLETE);
+        assertWithMessage("Complete chunk").that(FM_DAB_ADD_CHUNK.isComplete())
+                .isEqualTo(IS_COMPLETE);
     }
 
     @Test
     public void getModified_forChunk() {
-        ProgramList.Chunk chunk = new ProgramList.Chunk(IS_PURGE, IS_COMPLETE,
-                Set.of(FM_PROGRAM_INFO, RDS_PROGRAM_INFO),
-                Set.of(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER));
-
         assertWithMessage("Modified program info in chunk")
-                .that(chunk.getModified()).containsExactly(FM_PROGRAM_INFO, RDS_PROGRAM_INFO);
+                .that(FM_DAB_ADD_CHUNK.getModified())
+                .containsExactly(FM_PROGRAM_INFO, DAB_PROGRAM_INFO_1, DAB_PROGRAM_INFO_2);
     }
 
     @Test
     public void getRemoved_forChunk() {
-        ProgramList.Chunk chunk = new ProgramList.Chunk(IS_PURGE, IS_COMPLETE,
-                Set.of(FM_PROGRAM_INFO, RDS_PROGRAM_INFO),
-                Set.of(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER));
-
-        assertWithMessage("Removed program identifiers in chunk").that(chunk.getRemoved())
-                .containsExactly(DAB_DMB_SID_EXT_IDENTIFIER, DAB_ENSEMBLE_IDENTIFIER);
+        assertWithMessage("Removed program identifiers in chunk")
+                .that(FM_DAB_ADD_CHUNK.getRemoved()).containsExactly(RDS_UNIQUE_IDENTIFIER);
     }
 
     @Test
     public void describeContents_forChunk() {
-        assertWithMessage("Chunk contents").that(FM_RDS_ADD_CHUNK.describeContents()).isEqualTo(0);
+        assertWithMessage("Chunk contents").that(FM_DAB_ADD_CHUNK.describeContents()).isEqualTo(0);
     }
 
     @Test
     public void writeToParcel_forChunk() {
         Parcel parcel = Parcel.obtain();
 
-        FM_RDS_ADD_CHUNK.writeToParcel(parcel, /* flags= */ 0);
+        FM_DAB_ADD_CHUNK.writeToParcel(parcel, /* flags= */ 0);
         parcel.setDataPosition(0);
 
         ProgramList.Chunk chunkFromParcel =
                 ProgramList.Chunk.CREATOR.createFromParcel(parcel);
         assertWithMessage("Chunk created from parcel")
-                .that(chunkFromParcel).isEqualTo(FM_RDS_ADD_CHUNK);
+                .that(chunkFromParcel).isEqualTo(FM_DAB_ADD_CHUNK);
     }
 
     @Test
@@ -336,37 +349,78 @@
     }
 
     @Test
-    public void onProgramListUpdated_withNewIdsAdded_invokesMockedCallbacks() throws Exception {
+    public void onProgramListUpdated_withNewIdsAdded_invokesCallbacks() throws Exception {
         createRadioTuner();
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
         registerListCallbacks(/* numCallbacks= */ 1);
         addOnCompleteListeners(/* numListeners= */ 1);
 
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemChanged(FM_IDENTIFIER);
-        verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemChanged(RDS_IDENTIFIER);
+        verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemChanged(DAB_DMB_SID_EXT_IDENTIFIER);
         verify(mOnCompleteListenerMocks[0], CALLBACK_TIMEOUT).onComplete();
-        assertWithMessage("Program info in program list after adding FM and RDS info")
-                .that(mProgramList.toList()).containsExactly(FM_PROGRAM_INFO, RDS_PROGRAM_INFO);
+        assertWithMessage("Program info in program list after adding FM and DAB info")
+                .that(mProgramList.toList()).containsExactly(FM_PROGRAM_INFO, DAB_PROGRAM_INFO_1,
+                        DAB_PROGRAM_INFO_2);
     }
 
     @Test
-    public void onProgramListUpdated_withIdsRemoved_invokesMockedCallbacks() throws Exception {
+    public void onProgramListUpdated_withFmIdsRemoved_invokesCallbacks() throws Exception {
+        UniqueProgramIdentifier fmUniqueId = new UniqueProgramIdentifier(FM_IDENTIFIER);
         ProgramList.Chunk fmRemovedChunk = new ProgramList.Chunk(/* purge= */ false,
-                /* complete= */ false, new ArraySet<>(), Set.of(FM_IDENTIFIER));
+                /* complete= */ false, new ArraySet<>(), Set.of(fmUniqueId));
         createRadioTuner();
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
         registerListCallbacks(/* numCallbacks= */ 1);
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         mTunerCallback.onProgramListUpdated(fmRemovedChunk);
 
         verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemRemoved(FM_IDENTIFIER);
         assertWithMessage("Program info in program list after removing FM id")
-                .that(mProgramList.toList()).containsExactly(RDS_PROGRAM_INFO);
-        assertWithMessage("Program info FM identifier")
-                .that(mProgramList.get(RDS_IDENTIFIER)).isEqualTo(RDS_PROGRAM_INFO);
+                .that(mProgramList.toList()).containsExactly(DAB_PROGRAM_INFO_1,
+                        DAB_PROGRAM_INFO_2);
+    }
+
+    @Test
+    public void onProgramListUpdated_withPartOfDabIdsRemoved_doesNotInvokeCallbacks()
+            throws Exception {
+        ProgramList.Chunk dabRemovedChunk1 = new ProgramList.Chunk(/* purge= */ false,
+                /* complete= */ false, new ArraySet<>(), Set.of(DAB_UNIQUE_IDENTIFIER_1));
+        createRadioTuner();
+        mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
+        registerListCallbacks(/* numCallbacks= */ 1);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
+
+        mTunerCallback.onProgramListUpdated(dabRemovedChunk1);
+
+        verify(mListCallbackMocks[0], after(TIMEOUT_MS).never()).onItemRemoved(
+                DAB_DMB_SID_EXT_IDENTIFIER);
+        assertWithMessage("Program info in program list after removing part of DAB ids")
+                .that(mProgramList.toList()).containsExactly(FM_PROGRAM_INFO, DAB_PROGRAM_INFO_2);
+    }
+
+    @Test
+    public void onProgramListUpdated_withAllDabIdsRemoved_invokesCallbacks()
+            throws Exception {
+        ProgramList.Chunk dabRemovedChunk1 = new ProgramList.Chunk(/* purge= */ false,
+                /* complete= */ false, new ArraySet<>(), Set.of(DAB_UNIQUE_IDENTIFIER_1));
+        ProgramList.Chunk dabRemovedChunk2 = new ProgramList.Chunk(/* purge= */ false,
+                /* complete= */ false, new ArraySet<>(), Set.of(DAB_UNIQUE_IDENTIFIER_2));
+        createRadioTuner();
+        mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
+        registerListCallbacks(/* numCallbacks= */ 1);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(dabRemovedChunk1);
+        verify(mListCallbackMocks[0], after(TIMEOUT_MS).never()).onItemRemoved(
+                DAB_DMB_SID_EXT_IDENTIFIER);
+
+        mTunerCallback.onProgramListUpdated(dabRemovedChunk2);
+
+        verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemRemoved(DAB_DMB_SID_EXT_IDENTIFIER);
+        assertWithMessage("Program info in program list after removing all DAB ids")
+                .that(mProgramList.toList()).containsExactly(FM_PROGRAM_INFO);
     }
 
     @Test
@@ -388,18 +442,18 @@
         createRadioTuner();
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
         registerListCallbacks(/* numCallbacks= */ 1);
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         mTunerCallback.onProgramListUpdated(purgeChunk);
 
         verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemRemoved(FM_IDENTIFIER);
-        verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemRemoved(RDS_IDENTIFIER);
+        verify(mListCallbackMocks[0], CALLBACK_TIMEOUT).onItemRemoved(DAB_DMB_SID_EXT_IDENTIFIER);
         assertWithMessage("Program list after purge chunk applied")
                 .that(mProgramList.toList()).isEmpty();
     }
 
     @Test
-    public void onProgramListUpdated_afterProgramListClosed_notInvokeMockedCallbacks()
+    public void onProgramListUpdated_afterProgramListClosed_notInvokeCallbacks()
             throws Exception {
         createRadioTuner();
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
@@ -407,7 +461,7 @@
         addOnCompleteListeners(/* numListeners= */ 1);
         mProgramList.close();
 
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         verify(mListCallbackMocks[0], after(TIMEOUT_MS).never()).onItemChanged(any());
         verify(mListCallbackMocks[0], never()).onItemChanged(any());
@@ -462,7 +516,7 @@
             throws Exception {
         createRadioTuner();
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         mTunerCallback.onBackgroundScanComplete();
 
@@ -487,7 +541,7 @@
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
 
         mTunerCallback.onBackgroundScanComplete();
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         verify(mTunerCallbackMock, CALLBACK_TIMEOUT).onBackgroundScanComplete();
     }
@@ -512,7 +566,7 @@
                 mock(ProgramList.OnCompleteListener.class);
 
         mProgramList.addOnCompleteListener(mExecutor, onCompleteListenerMock);
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         verify(onCompleteListenerMock, CALLBACK_TIMEOUT).onComplete();
     }
@@ -524,7 +578,7 @@
         mProgramList = mRadioTuner.getDynamicProgramList(TEST_FILTER);
         addOnCompleteListeners(numListeners);
 
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         for (int index = 0; index < numListeners; index++) {
             verify(mOnCompleteListenerMocks[index], CALLBACK_TIMEOUT).onComplete();
@@ -538,7 +592,7 @@
         addOnCompleteListeners(/* numListeners= */ 1);
 
         mProgramList.removeOnCompleteListener(mOnCompleteListenerMocks[0]);
-        mTunerCallback.onProgramListUpdated(FM_RDS_ADD_CHUNK);
+        mTunerCallback.onProgramListUpdated(FM_DAB_ADD_CHUNK);
 
         verify(mOnCompleteListenerMocks[0], after(TIMEOUT_MS).never()).onComplete();
     }
@@ -566,6 +620,13 @@
                 /* vendorInfo= */ null);
     }
 
+    private static RadioManager.ProgramInfo createDabProgramInfo(ProgramSelector selector) {
+        return new RadioManager.ProgramInfo(selector, selector.getPrimaryId(),
+                DAB_ENSEMBLE_IDENTIFIER, /* relatedContents= */ null, /* infoFlags= */ 0,
+                /* signalQuality= */ 1, new RadioMetadata.Builder().build(),
+                /* vendorInfo= */ null);
+    }
+
     private void createRadioTuner() throws Exception {
         mApplicationInfo.targetSdkVersion = TEST_TARGET_SDK_VERSION;
         when(mContextMock.getApplicationInfo()).thenReturn(mApplicationInfo);
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/AidlTestUtils.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/AidlTestUtils.java
index 6c70192..4f469bb 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/AidlTestUtils.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/AidlTestUtils.java
@@ -25,6 +25,7 @@
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
 import android.hardware.radio.RadioMetadata;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.RemoteException;
 import android.util.ArrayMap;
 import android.util.ArraySet;
@@ -149,12 +150,12 @@
 
     static ProgramList.Chunk makeChunk(boolean purge, boolean complete,
             List<RadioManager.ProgramInfo> modified,
-            List<ProgramSelector.Identifier> removed) throws RemoteException {
+            List<UniqueProgramIdentifier> removed) throws RemoteException {
         ArraySet<RadioManager.ProgramInfo> modifiedSet = new ArraySet<>();
         if (modified != null) {
             modifiedSet.addAll(modified);
         }
-        ArraySet<ProgramSelector.Identifier> removedSet = new ArraySet<>();
+        ArraySet<UniqueProgramIdentifier> removedSet = new ArraySet<>();
         if (removed != null) {
             removedSet.addAll(removed);
         }
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
index 2ef923d..14f268a 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ConversionUtilsTest.java
@@ -25,7 +25,6 @@
 import android.hardware.broadcastradio.IdentifierType;
 import android.hardware.broadcastradio.ProgramIdentifier;
 import android.hardware.broadcastradio.ProgramInfo;
-import android.hardware.broadcastradio.ProgramListChunk;
 import android.hardware.broadcastradio.Properties;
 import android.hardware.broadcastradio.Result;
 import android.hardware.broadcastradio.VendorKeyValue;
@@ -33,6 +32,7 @@
 import android.hardware.radio.ProgramList;
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.ServiceSpecificException;
 
 import com.android.dx.mockito.inline.extended.StaticMockitoSessionBuilder;
@@ -89,9 +89,6 @@
     private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
             new ProgramSelector.Identifier(
                     ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY, TEST_DAB_FREQUENCY_VALUE);
-    private static final ProgramSelector.Identifier TEST_FM_FREQUENCY_ID =
-            new ProgramSelector.Identifier(
-                    ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, TEST_FM_FREQUENCY_VALUE);
     private static final ProgramSelector.Identifier TEST_VENDOR_ID =
             new ProgramSelector.Identifier(
                     ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, TEST_VENDOR_ID_VALUE);
@@ -103,12 +100,6 @@
     private static final ProgramIdentifier TEST_HAL_DAB_FREQUENCY_ID =
             AidlTestUtils.makeHalIdentifier(IdentifierType.DAB_FREQUENCY_KHZ,
                     TEST_DAB_FREQUENCY_VALUE);
-    private static final ProgramIdentifier TEST_HAL_FM_FREQUENCY_ID =
-            AidlTestUtils.makeHalIdentifier(IdentifierType.AMFM_FREQUENCY_KHZ,
-                    TEST_FM_FREQUENCY_VALUE);
-    private static final ProgramIdentifier TEST_HAL_VENDOR_ID =
-            AidlTestUtils.makeHalIdentifier(IdentifierType.VENDOR_START,
-                    TEST_VENDOR_ID_VALUE);
 
     private static final ProgramSelector TEST_DAB_SELECTOR = new ProgramSelector(
             ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_SID_EXT_ID,
@@ -117,6 +108,12 @@
     private static final ProgramSelector TEST_FM_SELECTOR =
             AidlTestUtils.makeFmSelector(TEST_FM_FREQUENCY_VALUE);
 
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID = new UniqueProgramIdentifier(
+            TEST_DAB_SELECTOR);
+
+    private static final UniqueProgramIdentifier TEST_VENDOR_UNIQUE_ID =
+            new UniqueProgramIdentifier(TEST_VENDOR_ID);
+
     private static final int TEST_ENABLED_TYPE = Announcement.TYPE_EMERGENCY;
     private static final int TEST_ANNOUNCEMENT_FREQUENCY = FM_LOWER_LIMIT + FM_SPACING;
 
@@ -251,6 +248,20 @@
     }
 
     @Test
+    public void identifierToHalProgramIdentifier_withDeprecateDabId() {
+        long value = 0x98765ABCDL;
+        ProgramSelector.Identifier dabId = new ProgramSelector.Identifier(
+                        ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT, value);
+        ProgramIdentifier halDabIdExpected = AidlTestUtils.makeHalIdentifier(
+                IdentifierType.DAB_SID_EXT, 0x987650000ABCDL);
+
+        ProgramIdentifier halDabId = ConversionUtils.identifierToHalProgramIdentifier(dabId);
+
+        expect.withMessage("Converted 28-bit DAB identifier for HAL").that(halDabId)
+                .isEqualTo(halDabIdExpected);
+    }
+
+    @Test
     public void identifierFromHalProgramIdentifier_withDabId() {
         ProgramSelector.Identifier dabId =
                 ConversionUtils.identifierFromHalProgramIdentifier(TEST_HAL_DAB_SID_EXT_ID);
@@ -326,57 +337,6 @@
     }
 
     @Test
-    public void chunkFromHalProgramListChunk_withValidChunk() {
-        boolean purge = false;
-        boolean complete = true;
-        android.hardware.broadcastradio.ProgramSelector halDabSelector =
-                AidlTestUtils.makeHalSelector(TEST_HAL_DAB_SID_EXT_ID, new ProgramIdentifier[]{
-                        TEST_HAL_DAB_ENSEMBLE_ID, TEST_HAL_DAB_FREQUENCY_ID});
-        ProgramInfo halDabInfo = AidlTestUtils.makeHalProgramInfo(halDabSelector,
-                TEST_HAL_DAB_SID_EXT_ID, TEST_HAL_DAB_FREQUENCY_ID, TEST_SIGNAL_QUALITY);
-        RadioManager.ProgramInfo dabInfo =
-                ConversionUtils.programInfoFromHalProgramInfo(halDabInfo);
-        ProgramListChunk halChunk = AidlTestUtils.makeHalChunk(purge, complete,
-                new ProgramInfo[]{halDabInfo},
-                new ProgramIdentifier[]{TEST_HAL_VENDOR_ID, TEST_HAL_FM_FREQUENCY_ID});
-
-        ProgramList.Chunk chunk = ConversionUtils.chunkFromHalProgramListChunk(halChunk);
-
-        expect.withMessage("Purged state of the converted valid program list chunk")
-                .that(chunk.isPurge()).isEqualTo(purge);
-        expect.withMessage("Completion state of the converted valid program list chunk")
-                .that(chunk.isComplete()).isEqualTo(complete);
-        expect.withMessage("Modified program info in the converted valid program list chunk")
-                .that(chunk.getModified()).containsExactly(dabInfo);
-        expect.withMessage("Removed program ides in the converted valid program list chunk")
-                .that(chunk.getRemoved()).containsExactly(TEST_VENDOR_ID, TEST_FM_FREQUENCY_ID);
-    }
-
-    @Test
-    public void chunkFromHalProgramListChunk_withInvalidModifiedProgramInfo() {
-        boolean purge = true;
-        boolean complete = false;
-        android.hardware.broadcastradio.ProgramSelector halDabSelector =
-                AidlTestUtils.makeHalSelector(TEST_HAL_DAB_SID_EXT_ID, new ProgramIdentifier[]{
-                        TEST_HAL_DAB_ENSEMBLE_ID, TEST_HAL_DAB_FREQUENCY_ID});
-        ProgramInfo halDabInfo = AidlTestUtils.makeHalProgramInfo(halDabSelector,
-                TEST_HAL_DAB_SID_EXT_ID, TEST_HAL_DAB_ENSEMBLE_ID, TEST_SIGNAL_QUALITY);
-        ProgramListChunk halChunk = AidlTestUtils.makeHalChunk(purge, complete,
-                new ProgramInfo[]{halDabInfo}, new ProgramIdentifier[]{TEST_HAL_FM_FREQUENCY_ID});
-
-        ProgramList.Chunk chunk = ConversionUtils.chunkFromHalProgramListChunk(halChunk);
-
-        expect.withMessage("Purged state of the converted invalid program list chunk")
-                .that(chunk.isPurge()).isEqualTo(purge);
-        expect.withMessage("Completion state of the converted invalid program list chunk")
-                .that(chunk.isComplete()).isEqualTo(complete);
-        expect.withMessage("Modified program info in the converted invalid program list chunk")
-                .that(chunk.getModified()).isEmpty();
-        expect.withMessage("Removed program ids in the converted invalid program list chunk")
-                .that(chunk.getRemoved()).containsExactly(TEST_FM_FREQUENCY_ID);
-    }
-
-    @Test
     public void programSelectorMeetsSdkVersionRequirement_withLowerVersionId_returnsFalse() {
         expect.withMessage("Selector %s without required SDK version", TEST_DAB_SELECTOR)
                 .that(ConversionUtils.programSelectorMeetsSdkVersionRequirement(TEST_DAB_SELECTOR,
@@ -418,7 +378,7 @@
                 TEST_SIGNAL_QUALITY);
         ProgramList.Chunk chunk = new ProgramList.Chunk(/* purge= */ true,
                 /* complete= */ true, Set.of(dabProgramInfo, fmProgramInfo),
-                Set.of(TEST_DAB_SID_EXT_ID, TEST_DAB_ENSEMBLE_ID, TEST_VENDOR_ID));
+                Set.of(TEST_DAB_UNIQUE_ID, TEST_VENDOR_UNIQUE_ID));
 
         ProgramList.Chunk convertedChunk = ConversionUtils.convertChunkToTargetSdkVersion(chunk,
                 T_APP_UID);
@@ -434,8 +394,7 @@
                 .that(convertedChunk.getModified()).containsExactly(fmProgramInfo);
         expect.withMessage(
                 "Removed program ids in the converted program list chunk with lower SDK version")
-                .that(convertedChunk.getRemoved())
-                .containsExactly(TEST_DAB_ENSEMBLE_ID, TEST_VENDOR_ID);
+                .that(convertedChunk.getRemoved()).containsExactly(TEST_VENDOR_UNIQUE_ID);
     }
 
     @Test
@@ -446,7 +405,7 @@
                 TEST_SIGNAL_QUALITY);
         ProgramList.Chunk chunk = new ProgramList.Chunk(/* purge= */ true,
                 /* complete= */ true, Set.of(dabProgramInfo, fmProgramInfo),
-                Set.of(TEST_DAB_SID_EXT_ID, TEST_DAB_ENSEMBLE_ID, TEST_VENDOR_ID));
+                Set.of(TEST_DAB_UNIQUE_ID, TEST_VENDOR_UNIQUE_ID));
 
         ProgramList.Chunk convertedChunk = ConversionUtils.convertChunkToTargetSdkVersion(chunk,
                 U_APP_UID);
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ProgramInfoCacheTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ProgramInfoCacheTest.java
index d54397e..ce27bc1 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ProgramInfoCacheTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/ProgramInfoCacheTest.java
@@ -22,6 +22,7 @@
 import android.hardware.radio.ProgramList;
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.RemoteException;
 import android.util.ArraySet;
 
@@ -32,6 +33,7 @@
 import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
@@ -43,6 +45,9 @@
 
     private static final int TEST_SIGNAL_QUALITY = 90;
 
+    private static final int TEST_MAX_NUM_MODIFIED_PER_CHUNK = 2;
+    private static final int TEST_MAX_NUM_REMOVED_PER_CHUNK = 2;
+
     private static final ProgramSelector.Identifier TEST_FM_FREQUENCY_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
                     /* value= */ 88_500);
@@ -58,6 +63,8 @@
     private static final ProgramSelector.Identifier TEST_AM_FREQUENCY_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
                     /* value= */ 1_700);
+    private static final UniqueProgramIdentifier TEST_AM_UNIQUE_ID = new UniqueProgramIdentifier(
+            TEST_AM_FREQUENCY_ID);
     private static final RadioManager.ProgramInfo TEST_AM_INFO = AidlTestUtils.makeProgramInfo(
             AidlTestUtils.makeProgramSelector(ProgramSelector.PROGRAM_TYPE_FM,
                     TEST_AM_FREQUENCY_ID), TEST_AM_FREQUENCY_ID, TEST_AM_FREQUENCY_ID,
@@ -66,6 +73,8 @@
     private static final ProgramSelector.Identifier TEST_RDS_PI_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI,
                     /* value= */ 15_019);
+    private static final UniqueProgramIdentifier TEST_RDS_PI_UNIQUE_ID =
+            new UniqueProgramIdentifier(TEST_RDS_PI_ID);
     private static final RadioManager.ProgramInfo TEST_RDS_INFO = AidlTestUtils.makeProgramInfo(
             AidlTestUtils.makeProgramSelector(ProgramSelector.PROGRAM_TYPE_FM, TEST_RDS_PI_ID),
             TEST_RDS_PI_ID, new ProgramSelector.Identifier(
@@ -81,11 +90,27 @@
     private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
                     /* value= */ 220_352);
-    private static final RadioManager.ProgramInfo TEST_DAB_INFO = AidlTestUtils.makeProgramInfo(
-            new ProgramSelector(ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_DMB_SID_EXT_ID,
-                    new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID, TEST_DAB_ENSEMBLE_ID},
-                    /* vendorIds= */ null), TEST_DAB_DMB_SID_EXT_ID, TEST_DAB_FREQUENCY_ID,
-            TEST_SIGNAL_QUALITY);
+    private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID_ALTERNATIVE =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_064);
+    private static final ProgramSelector TEST_DAB_SELECTOR = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_DMB_SID_EXT_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID, TEST_DAB_ENSEMBLE_ID},
+            /* vendorIds= */ null);
+    private static final ProgramSelector TEST_DAB_SELECTOR_ALTERNATIVE = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_DMB_SID_EXT_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID_ALTERNATIVE,
+                    TEST_DAB_ENSEMBLE_ID}, /* vendorIds= */ null);
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID = new UniqueProgramIdentifier(
+            TEST_DAB_SELECTOR);
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID_ALTERNATIVE =
+            new UniqueProgramIdentifier(TEST_DAB_SELECTOR_ALTERNATIVE);
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO =
+            AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR, TEST_DAB_DMB_SID_EXT_ID,
+                    TEST_DAB_FREQUENCY_ID, TEST_SIGNAL_QUALITY);
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO_ALTERNATIVE =
+            AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR_ALTERNATIVE, TEST_DAB_DMB_SID_EXT_ID,
+                    TEST_DAB_FREQUENCY_ID_ALTERNATIVE, TEST_SIGNAL_QUALITY);
 
     private static final ProgramSelector.Identifier TEST_VENDOR_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_VENDOR_START,
@@ -95,8 +120,8 @@
                     TEST_VENDOR_ID), TEST_VENDOR_ID, TEST_VENDOR_ID, TEST_SIGNAL_QUALITY);
 
     private static final ProgramInfoCache FULL_PROGRAM_INFO_CACHE = new ProgramInfoCache(
-            /* filter= */ null, /* complete= */ true,
-            TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO, TEST_VENDOR_INFO);
+            /* filter= */ null, /* complete= */ true, TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO,
+            TEST_DAB_INFO, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
 
     @Rule
     public final Expect expect = Expect.create();
@@ -163,6 +188,22 @@
     }
 
     @Test
+    public void updateFromHalProgramListChunk_withInvalidChunk() {
+        RadioManager.ProgramInfo invalidDabInfo = AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR,
+                TEST_DAB_DMB_SID_EXT_ID, TEST_DAB_ENSEMBLE_ID, TEST_SIGNAL_QUALITY);
+        ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null,
+                /* complete= */ false);
+        ProgramListChunk chunk = AidlTestUtils.makeHalChunk(/* purge= */ false,
+                /* complete= */ true, new ProgramInfo[]{AidlTestUtils.programInfoToHalProgramInfo(
+                        invalidDabInfo)}, new ProgramIdentifier[]{});
+
+        cache.updateFromHalProgramListChunk(chunk);
+
+        expect.withMessage("Program cache updated with invalid chunk")
+                .that(cache.toProgramInfoList()).isEmpty();
+    }
+
+    @Test
     public void filterAndUpdateFromInternal_withNullFilter() {
         ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null,
                 /* complete= */ true);
@@ -172,7 +213,7 @@
         expect.withMessage("Program cache filtered by null filter")
                 .that(cache.toProgramInfoList())
                 .containsExactly(TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO,
-                        TEST_VENDOR_INFO);
+                        TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
     }
 
     @Test
@@ -186,21 +227,21 @@
         expect.withMessage("Program cache filtered by empty filter")
                 .that(cache.toProgramInfoList())
                 .containsExactly(TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO,
-                        TEST_VENDOR_INFO);
+                        TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
     }
 
     @Test
     public void filterAndUpdateFromInternal_withFilterByIdentifierType() {
         ProgramInfoCache cache = new ProgramInfoCache(
                 new ProgramList.Filter(Set.of(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
-                        ProgramSelector.IDENTIFIER_TYPE_RDS_PI), new ArraySet<>(),
+                        ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT), new ArraySet<>(),
                         /* includeCategories= */ true, /* excludeModifications= */ false));
 
         cache.filterAndUpdateFromInternal(FULL_PROGRAM_INFO_CACHE, /* purge= */ false);
 
         expect.withMessage("Program cache filtered by identifier type")
-                .that(cache.toProgramInfoList())
-                .containsExactly(TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO);
+                .that(cache.toProgramInfoList()).containsExactly(TEST_FM_INFO, TEST_AM_INFO,
+                        TEST_DAB_INFO, TEST_DAB_INFO_ALTERNATIVE);
     }
 
     @Test
@@ -208,20 +249,60 @@
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(
                 new ArraySet<>(), Set.of(TEST_FM_FREQUENCY_ID, TEST_DAB_DMB_SID_EXT_ID),
                 /* includeCategories= */ true, /* excludeModifications= */ false));
-        int maxNumModifiedPerChunk = 2;
-        int maxNumRemovedPerChunk = 2;
 
         List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(
-                FULL_PROGRAM_INFO_CACHE, /* purge= */ true, maxNumModifiedPerChunk,
-                maxNumRemovedPerChunk);
+                FULL_PROGRAM_INFO_CACHE, /* purge= */ false, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
         expect.withMessage("Program cache filtered by identifier")
-                .that(cache.toProgramInfoList()).containsExactly(TEST_FM_INFO, TEST_DAB_INFO);
+                .that(cache.toProgramInfoList()).containsExactly(TEST_FM_INFO, TEST_DAB_INFO,
+                        TEST_DAB_INFO_ALTERNATIVE);
         verifyChunkListPurge(programListChunks, /* purge= */ true);
-        verifyChunkListComplete(programListChunks, FULL_PROGRAM_INFO_CACHE.isComplete());
+        verifyChunkListComplete(programListChunks, cache.isComplete());
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_FM_INFO,
+                TEST_DAB_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK);
+    }
+
+    @Test
+    public void filterAndUpdateFromInternal_withPurging() {
+        ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new ArraySet<>(),
+                new ArraySet<>(), /* includeCategories= */ true, /* excludeModifications= */ false),
+                /* complete= */ true, TEST_RDS_INFO, TEST_DAB_INFO);
+        ProgramInfoCache otherCache = new ProgramInfoCache(/* filter= */ null, /* complete= */ true,
+                TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO_ALTERNATIVE);
+
+        List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(otherCache,
+                /* purge= */ true, TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_MAX_NUM_REMOVED_PER_CHUNK);
+
+        expect.withMessage("Program cache filtered with purging").that(cache.toProgramInfoList())
+                .containsExactly(TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListPurge(programListChunks, /* purge= */ true);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_FM_INFO,
+                TEST_RDS_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK);
+    }
+
+    @Test
+    public void filterAndUpdateFromInternal_withoutPurging() {
+        ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new ArraySet<>(),
+                new ArraySet<>(), /* includeCategories= */ true, /* excludeModifications= */ false),
+                /* complete= */ true, TEST_RDS_INFO, TEST_DAB_INFO);
+        ProgramInfoCache otherCache = new ProgramInfoCache(/* filter= */ null, /* complete= */ true,
+                TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        int maxNumModifiedPerChunk = 1;
+
+        List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(otherCache,
+                /* purge= */ false, maxNumModifiedPerChunk, TEST_MAX_NUM_REMOVED_PER_CHUNK);
+
+        expect.withMessage("Program cache filtered without puring").that(cache.toProgramInfoList())
+                .containsExactly(TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListPurge(programListChunks, /* purge= */ false);
+        verifyChunkListComplete(programListChunks, cache.isComplete());
         verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_FM_INFO,
-                TEST_DAB_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk);
+                TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK,
+                TEST_DAB_UNIQUE_ID);
     }
 
     @Test
@@ -230,20 +311,19 @@
                 new ArraySet<>(), /* includeCategories= */ false,
                 /* excludeModifications= */ false));
         int maxNumModifiedPerChunk = 3;
-        int maxNumRemovedPerChunk = 2;
 
         List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(
                 FULL_PROGRAM_INFO_CACHE, /* purge= */ false, maxNumModifiedPerChunk,
-                maxNumRemovedPerChunk);
+                TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
         expect.withMessage("Program cache filtered by excluding categories")
-                .that(cache.toProgramInfoList())
-                .containsExactly(TEST_FM_INFO, TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO);
+                .that(cache.toProgramInfoList()).containsExactly(TEST_FM_INFO, TEST_AM_INFO,
+                        TEST_RDS_INFO, TEST_DAB_INFO, TEST_DAB_INFO_ALTERNATIVE);
         verifyChunkListPurge(programListChunks, /* purge= */ true);
-        verifyChunkListComplete(programListChunks, FULL_PROGRAM_INFO_CACHE.isComplete());
+        verifyChunkListComplete(programListChunks, cache.isComplete());
         verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_FM_INFO,
-                TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk);
+                TEST_AM_INFO, TEST_RDS_INFO, TEST_DAB_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @Test
@@ -254,21 +334,21 @@
         ProgramInfoCache cache = new ProgramInfoCache(filterExcludingModifications,
                 /* complete= */ true, TEST_FM_INFO, TEST_RDS_INFO, TEST_AM_INFO, TEST_DAB_INFO);
         ProgramInfoCache halCache = new ProgramInfoCache(/* filter= */ null, /* complete= */ false,
-                TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO);
-        int maxNumModifiedPerChunk = 2;
-        int maxNumRemovedPerChunk = 2;
+                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
 
         List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(halCache,
-                /* purge= */ false, maxNumModifiedPerChunk, maxNumRemovedPerChunk);
+                /* purge= */ false, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
         expect.withMessage("Program cache filtered by excluding modifications")
                 .that(cache.toProgramInfoList())
-                .containsExactly(TEST_FM_INFO, TEST_VENDOR_INFO);
+                .containsExactly(TEST_FM_INFO, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
         verifyChunkListPurge(programListChunks, /* purge= */ false);
         verifyChunkListComplete(programListChunks, halCache.isComplete());
-        verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_VENDOR_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk, TEST_RDS_PI_ID,
-                TEST_AM_FREQUENCY_ID, TEST_DAB_DMB_SID_EXT_ID);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_VENDOR_INFO, TEST_DAB_INFO_ALTERNATIVE);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK,
+                TEST_RDS_PI_UNIQUE_ID, TEST_AM_UNIQUE_ID, TEST_DAB_UNIQUE_ID);
     }
 
     @Test
@@ -276,69 +356,88 @@
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new ArraySet<>(),
                 new ArraySet<>(), /* includeCategories= */ true,
                 /* excludeModifications= */ false),
-                /* complete= */ true, TEST_FM_INFO, TEST_RDS_INFO);
+                /* complete= */ true, TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO);
         ProgramInfoCache halCache = new ProgramInfoCache(/* filter= */ null, /* complete= */ false,
-                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO, TEST_VENDOR_INFO);
-        int maxNumModifiedPerChunk = 2;
-        int maxNumRemovedPerChunk = 2;
+                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
 
         List<ProgramList.Chunk> programListChunks = cache.filterAndUpdateFromInternal(halCache,
-                /* purge= */ true, maxNumModifiedPerChunk, maxNumRemovedPerChunk);
+                /* purge= */ true, TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
         expect.withMessage("Purged program cache").that(cache.toProgramInfoList())
-                .containsExactly(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO, TEST_VENDOR_INFO);
+                .containsExactly(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE,
+                        TEST_VENDOR_INFO);
         verifyChunkListPurge(programListChunks, /* purge= */ true);
         verifyChunkListComplete(programListChunks, halCache.isComplete());
-        verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_FM_INFO_MODIFIED,
-                TEST_DAB_INFO, TEST_VENDOR_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @Test
-    public void filterAndApplyChunkInternal_withPurgingIncompleteChunk() throws RemoteException {
+    public void filterAndApplyChunkInternal_withPurgingAndIncompleteChunk() throws RemoteException {
         ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null,
-                /* complete= */ false, TEST_FM_INFO, TEST_DAB_INFO);
-        ProgramList.Chunk chunk = AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ false,
-                List.of(TEST_FM_INFO_MODIFIED, TEST_RDS_INFO, TEST_VENDOR_INFO),
-                List.of(TEST_DAB_DMB_SID_EXT_ID));
-        int maxNumModifiedPerChunk = 2;
-        int maxNumRemovedPerChunk = 2;
+                /* complete= */ false, TEST_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO);
+        ProgramListChunk halChunk = AidlTestUtils.makeHalChunk(/* purge= */ true,
+                /* complete= */ false, List.of(TEST_FM_INFO_MODIFIED,
+                        TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO), new ArrayList<>());
 
-        List<ProgramList.Chunk> programListChunks = cache.filterAndApplyChunkInternal(chunk,
-                maxNumModifiedPerChunk, maxNumRemovedPerChunk);
+        List<ProgramList.Chunk> programListChunks = cache.filterAndApplyChunkInternal(halChunk,
+                TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
-        expect.withMessage("Program cache applied with non-purging and complete chunk")
-                .that(cache.toProgramInfoList())
-                .containsExactly(TEST_FM_INFO_MODIFIED, TEST_RDS_INFO, TEST_VENDOR_INFO);
+        expect.withMessage("Program cache applied with purge-enabled and complete chunk")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_FM_INFO_MODIFIED,
+                        TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
         verifyChunkListPurge(programListChunks, /* purge= */ true);
         verifyChunkListComplete(programListChunks, /* complete= */ false);
-        verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_FM_INFO_MODIFIED,
-                TEST_RDS_INFO, TEST_VENDOR_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @Test
-    public void filterAndApplyChunk_withNonPurgingCompleteChunk() throws RemoteException {
-        ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null,
-                /* complete= */ false, TEST_FM_INFO, TEST_RDS_INFO, TEST_AM_INFO, TEST_DAB_INFO);
-        ProgramList.Chunk chunk = AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                List.of(TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO),
+    public void filterAndApplyChunk_withNonPurgingAndIncompleteChunk() throws RemoteException {
+        ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null, /* complete= */ false,
+                TEST_FM_INFO, TEST_RDS_INFO, TEST_AM_INFO, TEST_DAB_INFO);
+        ProgramListChunk halChunk = AidlTestUtils.makeHalChunk(/* purge= */ false,
+                /* complete= */ false, List.of(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE,
+                        TEST_VENDOR_INFO), List.of(TEST_RDS_PI_ID, TEST_AM_FREQUENCY_ID));
+
+        List<ProgramList.Chunk> programListChunks = cache.filterAndApplyChunkInternal(halChunk,
+                TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_MAX_NUM_REMOVED_PER_CHUNK);
+
+        expect.withMessage("Program cache applied with non-purging and incomplete chunk")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_DAB_INFO,
+                        TEST_DAB_INFO_ALTERNATIVE, TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO);
+        verifyChunkListPurge(programListChunks, /* purge= */ false);
+        verifyChunkListComplete(programListChunks, /* complete= */ false);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALTERNATIVE, TEST_VENDOR_INFO);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK,
+                TEST_RDS_PI_UNIQUE_ID, TEST_AM_UNIQUE_ID);
+    }
+
+    @Test
+    public void filterAndApplyChunk_withNonPurgingAndCompleteChunk() throws RemoteException {
+        ProgramInfoCache cache = new ProgramInfoCache(/* filter= */ null, /* complete= */ false,
+                TEST_FM_INFO, TEST_RDS_INFO, TEST_AM_INFO, TEST_DAB_INFO,
+                TEST_DAB_INFO_ALTERNATIVE);
+        ProgramListChunk halChunk = AidlTestUtils.makeHalChunk(/* purge= */ false,
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO),
                 List.of(TEST_RDS_PI_ID, TEST_AM_FREQUENCY_ID, TEST_DAB_DMB_SID_EXT_ID));
-        int maxNumModifiedPerChunk = 2;
-        int maxNumRemovedPerChunk = 2;
 
-        List<ProgramList.Chunk> programListChunks = cache.filterAndApplyChunkInternal(chunk,
-                maxNumModifiedPerChunk, maxNumRemovedPerChunk);
+        List<ProgramList.Chunk> programListChunks = cache.filterAndApplyChunkInternal(halChunk,
+                TEST_MAX_NUM_MODIFIED_PER_CHUNK, TEST_MAX_NUM_REMOVED_PER_CHUNK);
 
-        expect.withMessage("Program cache applied with purge-enabled complete chunk")
+        expect.withMessage("Program cache applied with non-purging and complete chunk")
                 .that(cache.toProgramInfoList())
                 .containsExactly(TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO);
         verifyChunkListPurge(programListChunks, /* purge= */ false);
         verifyChunkListComplete(programListChunks, /* complete= */ true);
-        verifyChunkListModified(programListChunks, maxNumModifiedPerChunk, TEST_FM_INFO_MODIFIED,
-                TEST_VENDOR_INFO);
-        verifyChunkListRemoved(programListChunks, maxNumRemovedPerChunk, TEST_RDS_PI_ID,
-                TEST_AM_FREQUENCY_ID, TEST_DAB_DMB_SID_EXT_ID);
+        verifyChunkListModified(programListChunks, TEST_MAX_NUM_MODIFIED_PER_CHUNK,
+                TEST_FM_INFO_MODIFIED, TEST_VENDOR_INFO);
+        verifyChunkListRemoved(programListChunks, TEST_MAX_NUM_REMOVED_PER_CHUNK,
+                TEST_RDS_PI_UNIQUE_ID, TEST_AM_UNIQUE_ID, TEST_DAB_UNIQUE_ID,
+                TEST_DAB_UNIQUE_ID_ALTERNATIVE);
     }
 
     private void verifyChunkListPurge(List<ProgramList.Chunk> chunks, boolean purge) {
@@ -387,17 +486,17 @@
                 .that(actualSet).containsExactlyElementsIn(expectedProgramInfos);
     }
 
-    private void verifyChunkListRemoved(List<ProgramList.Chunk> chunks,
-            int maxRemovedPerChunk, ProgramSelector.Identifier... expectedIdentifiers) {
+    private void verifyChunkListRemoved(List<ProgramList.Chunk> chunks, int maxRemovedPerChunk,
+            UniqueProgramIdentifier... expectedIdentifiers) {
         if (chunks.isEmpty()) {
             expect.withMessage("Empty program info list")
                     .that(expectedIdentifiers.length).isEqualTo(0);
             return;
         }
 
-        ArraySet<ProgramSelector.Identifier> actualSet = new ArraySet<>();
+        ArraySet<UniqueProgramIdentifier> actualSet = new ArraySet<>();
         for (int i = 0; i < chunks.size(); i++) {
-            Set<ProgramSelector.Identifier> chunkRemoved = chunks.get(i).getRemoved();
+            Set<UniqueProgramIdentifier> chunkRemoved = chunks.get(i).getRemoved();
             actualSet.addAll(chunkRemoved);
 
             expect.withMessage("Chunk %s removed identifier array size ", i)
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java
index 84aa864..a195228 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java
@@ -18,8 +18,6 @@
 
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
 
-import static com.google.common.truth.Truth.assertWithMessage;
-
 import static org.junit.Assert.assertThrows;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -47,6 +45,7 @@
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
 import android.hardware.radio.RadioTuner;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.Binder;
 import android.os.ParcelableException;
 import android.os.RemoteException;
@@ -59,13 +58,18 @@
 import com.android.server.broadcastradio.ExtendedRadioMockitoTestCase;
 import com.android.server.broadcastradio.RadioServiceUserController;
 
+import com.google.common.truth.Expect;
+
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
+import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.verification.VerificationWithTimeout;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -94,10 +98,6 @@
     private static final ProgramSelector.Identifier TEST_FM_FREQUENCY_ID =
             new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
                     /* value= */ 88_500);
-    private static final ProgramSelector.Identifier TEST_RDS_PI_ID =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI,
-                    /* value= */ 15_019);
-
     private static final RadioManager.ProgramInfo TEST_FM_INFO = AidlTestUtils.makeProgramInfo(
             AidlTestUtils.makeProgramSelector(ProgramSelector.PROGRAM_TYPE_FM,
                     TEST_FM_FREQUENCY_ID), TEST_FM_FREQUENCY_ID, TEST_FM_FREQUENCY_ID,
@@ -106,11 +106,37 @@
             AidlTestUtils.makeProgramInfo(AidlTestUtils.makeProgramSelector(
                     ProgramSelector.PROGRAM_TYPE_FM, TEST_FM_FREQUENCY_ID), TEST_FM_FREQUENCY_ID,
                     TEST_FM_FREQUENCY_ID, /* signalQuality= */ 100);
-    private static final RadioManager.ProgramInfo TEST_RDS_INFO = AidlTestUtils.makeProgramInfo(
-            AidlTestUtils.makeProgramSelector(ProgramSelector.PROGRAM_TYPE_FM, TEST_RDS_PI_ID),
-            TEST_RDS_PI_ID, new ProgramSelector.Identifier(
-                    ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, /* value= */ 89_500),
-            SIGNAL_QUALITY);
+
+    private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_352);
+    private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID_ALT =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_064);
+    private static final ProgramSelector.Identifier TEST_DAB_SID_EXT_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT,
+                    /* value= */ 0xA000000111L);
+    private static final ProgramSelector.Identifier TEST_DAB_ENSEMBLE_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE,
+                    /* value= */ 0x1001);
+    private static final ProgramSelector TEST_DAB_SELECTOR = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_SID_EXT_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID, TEST_DAB_ENSEMBLE_ID},
+            /* vendorIds= */ null);
+    private static final ProgramSelector TEST_DAB_SELECTOR_ALT = new ProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_SID_EXT_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID_ALT, TEST_DAB_ENSEMBLE_ID},
+            /* vendorIds= */ null);
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID = new UniqueProgramIdentifier(
+            TEST_DAB_SELECTOR);
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID_ALT =
+            new UniqueProgramIdentifier(TEST_DAB_SELECTOR_ALT);
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO =
+            AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR, TEST_DAB_SID_EXT_ID,
+                    TEST_DAB_FREQUENCY_ID, SIGNAL_QUALITY);
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO_ALT =
+            AidlTestUtils.makeProgramInfo(TEST_DAB_SELECTOR_ALT, TEST_DAB_SID_EXT_ID,
+                    TEST_DAB_FREQUENCY_ID_ALT, SIGNAL_QUALITY);
 
     // Mocks
     @Mock
@@ -129,6 +155,9 @@
 
     private TunerSession[] mTunerSessions;
 
+    @Rule
+    public final Expect expect = Expect.create();
+
     @Override
     protected void initializeSession(StaticMockitoSessionBuilder builder) {
         builder.spyStatic(RadioServiceUserController.class).spyStatic(CompatChanges.class)
@@ -225,7 +254,7 @@
         openAidlClients(numSessions);
 
         for (int index = 0; index < numSessions; index++) {
-            assertWithMessage("Session of index %s close state", index)
+            expect.withMessage("Session of index %s close state", index)
                     .that(mTunerSessions[index].isClosed()).isFalse();
         }
     }
@@ -257,7 +286,7 @@
 
         RadioManager.BandConfig config = mTunerSessions[0].getConfiguration();
 
-        assertWithMessage("Session configuration").that(config)
+        expect.withMessage("Session configuration").that(config)
                 .isEqualTo(FM_BAND_CONFIG);
     }
 
@@ -267,7 +296,7 @@
 
         mTunerSessions[0].setMuted(/* mute= */ false);
 
-        assertWithMessage("Session mute state after setting unmuted")
+        expect.withMessage("Session mute state after setting unmuted")
                 .that(mTunerSessions[0].isMuted()).isFalse();
     }
 
@@ -277,7 +306,7 @@
 
         mTunerSessions[0].setMuted(/* mute= */ true);
 
-        assertWithMessage("Session mute state after setting muted")
+        expect.withMessage("Session mute state after setting muted")
                 .that(mTunerSessions[0].isMuted()).isTrue();
     }
 
@@ -287,7 +316,7 @@
 
         mTunerSessions[0].close();
 
-        assertWithMessage("Close state of broadcast radio service session")
+        expect.withMessage("Close state of broadcast radio service session")
                 .that(mTunerSessions[0].isClosed()).isTrue();
     }
 
@@ -301,11 +330,11 @@
 
         for (int index = 0; index < numSessions; index++) {
             if (index == closeIdx) {
-                assertWithMessage(
+                expect.withMessage(
                         "Close state of broadcast radio service session of index %s", index)
                         .that(mTunerSessions[index].isClosed()).isTrue();
             } else {
-                assertWithMessage(
+                expect.withMessage(
                         "Close state of broadcast radio service session of index %s", index)
                         .that(mTunerSessions[index].isClosed()).isFalse();
             }
@@ -320,7 +349,7 @@
         mTunerSessions[0].close(errorCode);
 
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onError(errorCode);
-        assertWithMessage("Close state of broadcast radio service session")
+        expect.withMessage("Close state of broadcast radio service session")
                 .that(mTunerSessions[0].isClosed()).isTrue();
     }
 
@@ -334,7 +363,7 @@
 
         for (int index = 0; index < numSessions; index++) {
             verify(mAidlTunerCallbackMocks[index], CALLBACK_TIMEOUT).onError(errorCode);
-            assertWithMessage("Close state of broadcast radio service session of index %s", index)
+            expect.withMessage("Close state of broadcast radio service session of index %s", index)
                     .that(mTunerSessions[index].isClosed()).isTrue();
         }
     }
@@ -383,22 +412,12 @@
 
     @Test
     public void tune_withUnsupportedSelector_throwsException() throws Exception {
-        ProgramSelector.Identifier dabPrimaryId =
-                new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT,
-                        /* value= */ 0xA000000111L);
-        ProgramSelector.Identifier[] dabSecondaryIds =  new ProgramSelector.Identifier[]{
-                new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE,
-                        /* value= */ 1337),
-                new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
-                        /* value= */ 225648)};
-        ProgramSelector unsupportedSelector = new ProgramSelector(ProgramSelector.PROGRAM_TYPE_DAB,
-                dabPrimaryId, dabSecondaryIds, /* vendorIds= */ null);
         openAidlClients(/* numClients= */ 1);
 
         UnsupportedOperationException thrown = assertThrows(UnsupportedOperationException.class,
-                () -> mTunerSessions[0].tune(unsupportedSelector));
+                () -> mTunerSessions[0].tune(TEST_DAB_SELECTOR));
 
-        assertWithMessage("Exception for tuning on unsupported program selector")
+        expect.withMessage("Exception for tuning on unsupported program selector")
                 .that(thrown).hasMessageThat().contains("tune: NOT_SUPPORTED");
     }
 
@@ -413,7 +432,7 @@
         IllegalArgumentException thrown = assertThrows(IllegalArgumentException.class,
                 () -> mTunerSessions[0].tune(invalidSel));
 
-        assertWithMessage("Exception for tuning on DAB selector without DAB_SID_EXT primary id")
+        expect.withMessage("Exception for tuning on DAB selector without DAB_SID_EXT primary id")
                 .that(thrown).hasMessageThat().contains("tune: INVALID_ARGUMENTS");
     }
 
@@ -457,7 +476,7 @@
             mTunerSessions[0].tune(sel);
         });
 
-        assertWithMessage("Unknown error HAL exception when tuning")
+        expect.withMessage("Unknown error HAL exception when tuning")
                 .that(thrown).hasMessageThat().contains("UNKNOWN_ERROR");
     }
 
@@ -520,7 +539,7 @@
             mTunerSessions[0].step(/* directionDown= */ true, /* skipSubChannel= */ false);
         });
 
-        assertWithMessage("Exception for stepping when HAL is in invalid state")
+        expect.withMessage("Exception for stepping when HAL is in invalid state")
                 .that(thrown).hasMessageThat().contains("INVALID_STATE");
     }
 
@@ -599,7 +618,7 @@
             mTunerSessions[0].seek(/* directionDown= */ true, /* skipSubChannel= */ false);
         });
 
-        assertWithMessage("Internal error HAL exception when seeking")
+        expect.withMessage("Internal error HAL exception when seeking")
                 .that(thrown).hasMessageThat().contains("INTERNAL_ERROR");
     }
 
@@ -636,7 +655,7 @@
             mTunerSessions[0].cancel();
         });
 
-        assertWithMessage("Exception for canceling when HAL throws remote exception")
+        expect.withMessage("Exception for canceling when HAL throws remote exception")
                 .that(thrown).hasMessageThat().contains(exceptionMessage);
     }
 
@@ -649,7 +668,7 @@
             mTunerSessions[0].getImage(imageId);
         });
 
-        assertWithMessage("Get image exception")
+        expect.withMessage("Get image exception")
                 .that(thrown).hasMessageThat().contains("Image ID is missing");
     }
 
@@ -660,7 +679,7 @@
 
         Bitmap imageTest = mTunerSessions[0].getImage(imageId);
 
-        assertWithMessage("Null image").that(imageTest).isEqualTo(null);
+        expect.withMessage("Null image").that(imageTest).isEqualTo(null);
     }
 
     @Test
@@ -674,7 +693,7 @@
             mTunerSessions[0].getImage(/* id= */ 1);
         });
 
-        assertWithMessage("Exception for getting image when HAL throws remote exception")
+        expect.withMessage("Exception for getting image when HAL throws remote exception")
                 .that(thrown).hasMessageThat().contains(exceptionMessage);
     }
 
@@ -702,18 +721,19 @@
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter filter = new ProgramList.Filter(new ArraySet<>(), new ArraySet<>(),
                 /* includeCategories= */ true, /* excludeModifications= */ false);
-        ProgramFilter halFilter = ConversionUtils.filterToHalProgramFilter(filter);
-        List<RadioManager.ProgramInfo> modified = List.of(TEST_FM_INFO, TEST_RDS_INFO);
-        List<ProgramSelector.Identifier> removed = new ArrayList<>();
+        List<RadioManager.ProgramInfo> modified = List.of(TEST_FM_INFO, TEST_DAB_INFO,
+                TEST_DAB_INFO_ALT);
+        List<ProgramSelector.Identifier> halRemoved = new ArrayList<>();
+        List<UniqueProgramIdentifier> removed = new ArrayList<>();
         ProgramListChunk halProgramList = AidlTestUtils.makeHalChunk(/* purge= */ true,
-                /* complete= */ true, modified, removed);
+                /* complete= */ true, modified, halRemoved);
         ProgramList.Chunk expectedProgramList =
                 AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true, modified, removed);
 
         mTunerSessions[0].startProgramListUpdates(filter);
         mHalTunerCallback.onProgramListUpdated(halProgramList);
 
-        verify(mBroadcastRadioMock).startProgramListUpdates(halFilter);
+        verifyHalProgramListUpdatesInvocation(filter);
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT)
                 .onProgramListUpdated(expectedProgramList);
     }
@@ -723,19 +743,23 @@
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter filter = new ProgramList.Filter(new ArraySet<>(), new ArraySet<>(),
                 /* includeCategories= */ true, /* excludeModifications= */ false);
+        List<RadioManager.ProgramInfo> modifiedInfo = List.of(TEST_FM_INFO, TEST_DAB_INFO,
+                TEST_DAB_INFO_ALT);
         mTunerSessions[0].startProgramListUpdates(filter);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ true,
-                /* complete= */ true, List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                /* complete= */ true, modifiedInfo, new ArrayList<>()));
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
-                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true,
-                        List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true, modifiedInfo,
+                        new ArrayList<>()));
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED),
+                List.of(TEST_DAB_SID_EXT_ID)));
 
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                        List.of(TEST_FM_INFO_MODIFIED),
+                        List.of(TEST_DAB_UNIQUE_ID, TEST_DAB_UNIQUE_ID_ALT)));
     }
 
     @Test
@@ -743,17 +767,21 @@
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter filter = new ProgramList.Filter(new ArraySet<>(), new ArraySet<>(),
                 /* includeCategories= */ true, /* excludeModifications= */ false);
+        List<RadioManager.ProgramInfo> modifiedInfo = List.of(TEST_FM_INFO, TEST_DAB_INFO,
+                TEST_DAB_INFO_ALT);
         mTunerSessions[0].startProgramListUpdates(filter);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ true,
-                /* complete= */ true, List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                /* complete= */ true, modifiedInfo, new ArrayList<>()));
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
-                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true,
-                        List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true, modifiedInfo,
+                        new ArrayList<>()));
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED),
+                List.of(TEST_DAB_SID_EXT_ID)));
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                        List.of(TEST_FM_INFO_MODIFIED),
+                        List.of(TEST_DAB_UNIQUE_ID, TEST_DAB_UNIQUE_ID_ALT)));
 
         mTunerSessions[0].startProgramListUpdates(filter);
 
@@ -766,40 +794,44 @@
     @Test
     public void startProgramListUpdates_withNullFilter() throws Exception {
         openAidlClients(/* numClients= */ 1);
+        List<RadioManager.ProgramInfo> modifiedInfo = List.of(TEST_FM_INFO, TEST_DAB_INFO,
+                TEST_DAB_INFO_ALT);
 
         mTunerSessions[0].startProgramListUpdates(/* filter= */ null);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ true,
-                /* complete= */ true, List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                /* complete= */ true, modifiedInfo, new ArrayList<>()));
 
         verify(mBroadcastRadioMock).startProgramListUpdates(any());
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
-                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true,
-                        List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                AidlTestUtils.makeChunk(/* purge= */ true, /* complete= */ true, modifiedInfo,
+                        new ArrayList<>()));
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED),
+                List.of(TEST_DAB_SID_EXT_ID)));
 
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO_MODIFIED), List.of(TEST_RDS_PI_ID)));
+                        List.of(TEST_FM_INFO_MODIFIED),
+                        List.of(TEST_DAB_UNIQUE_ID, TEST_DAB_UNIQUE_ID_ALT)));
     }
 
     @Test
     public void startProgramListUpdates_withIdFilter() throws Exception {
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter idFilter = new ProgramList.Filter(new ArraySet<>(),
-                Set.of(TEST_RDS_PI_ID), /* includeCategories= */ true,
+                Set.of(TEST_DAB_SID_EXT_ID), /* includeCategories= */ true,
                 /* excludeModifications= */ true);
-        ProgramFilter halFilter = ConversionUtils.filterToHalProgramFilter(idFilter);
 
         mTunerSessions[0].startProgramListUpdates(idFilter);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_RDS_INFO), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_DAB_INFO, TEST_DAB_INFO_ALT),
+                new ArrayList<>()));
 
-        verify(mBroadcastRadioMock).startProgramListUpdates(halFilter);
+        verifyHalProgramListUpdatesInvocation(idFilter);
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_RDS_INFO), new ArrayList<>()));
+                        List.of(TEST_DAB_INFO, TEST_DAB_INFO_ALT), new ArrayList<>()));
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
                 /* complete= */ true, List.of(TEST_FM_INFO), new ArrayList<>()));
@@ -811,50 +843,52 @@
     public void startProgramListUpdates_withFilterExcludingModifications() throws Exception {
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter filterExcludingModifications = new ProgramList.Filter(
-                Set.of(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY), new ArraySet<>(),
+                Set.of(ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT,
+                        ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY), new ArraySet<>(),
                 /* includeCategories= */ true, /* excludeModifications= */ true);
-        ProgramFilter halFilter =
-                ConversionUtils.filterToHalProgramFilter(filterExcludingModifications);
 
         mTunerSessions[0].startProgramListUpdates(filterExcludingModifications);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_FM_INFO, TEST_DAB_INFO), new ArrayList<>()));
 
-        verify(mBroadcastRadioMock).startProgramListUpdates(halFilter);
+        verifyHalProgramListUpdatesInvocation(filterExcludingModifications);
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO), new ArrayList<>()));
+                        List.of(TEST_FM_INFO, TEST_DAB_INFO), new ArrayList<>()));
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALT),
+                new ArrayList<>()));
 
-        verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(any());
+        verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
+                AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
+                        List.of(TEST_DAB_INFO_ALT), new ArrayList<>()));
     }
 
     @Test
     public void startProgramListUpdates_withFilterIncludingModifications() throws Exception {
         openAidlClients(/* numClients= */ 1);
         ProgramList.Filter filterIncludingModifications = new ProgramList.Filter(
-                Set.of(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY), new ArraySet<>(),
+                Set.of(ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT,
+                        ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY), new ArraySet<>(),
                 /* includeCategories= */ true, /* excludeModifications= */ false);
-        ProgramFilter halFilter =
-                ConversionUtils.filterToHalProgramFilter(filterIncludingModifications);
 
         mTunerSessions[0].startProgramListUpdates(filterIncludingModifications);
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_FM_INFO, TEST_DAB_INFO), new ArrayList<>()));
 
-        verify(mBroadcastRadioMock).startProgramListUpdates(halFilter);
+        verifyHalProgramListUpdatesInvocation(filterIncludingModifications);
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO), new ArrayList<>()));
+                        List.of(TEST_FM_INFO, TEST_DAB_INFO), new ArrayList<>()));
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALT),
+                new ArrayList<>()));
 
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onProgramListUpdated(
                 AidlTestUtils.makeChunk(/* purge= */ false, /* complete= */ true,
-                        List.of(TEST_FM_INFO_MODIFIED), new ArrayList<>()));
+                        List.of(TEST_FM_INFO_MODIFIED, TEST_DAB_INFO_ALT), new ArrayList<>()));
     }
 
     @Test
@@ -910,7 +944,7 @@
         int numSessions = 3;
         openAidlClients(numSessions);
         List<ProgramList.Filter> filters = List.of(new ProgramList.Filter(
-                        Set.of(ProgramSelector.IDENTIFIER_TYPE_RDS_PI), new ArraySet<>(),
+                        Set.of(ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT), new ArraySet<>(),
                         /* includeCategories= */ true, /* excludeModifications= */ false),
                 new ProgramList.Filter(new ArraySet<>(), Set.of(TEST_FM_FREQUENCY_ID),
                         /* includeCategories= */ false, /* excludeModifications= */ true),
@@ -922,18 +956,20 @@
         }
 
         mHalTunerCallback.onProgramListUpdated(AidlTestUtils.makeHalChunk(/* purge= */ false,
-                /* complete= */ true, List.of(TEST_FM_INFO, TEST_RDS_INFO), new ArrayList<>()));
+                /* complete= */ true, List.of(TEST_FM_INFO, TEST_DAB_INFO, TEST_DAB_INFO_ALT),
+                new ArrayList<>()));
 
         verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT)
                 .onProgramListUpdated(AidlTestUtils.makeChunk(/* purge= */ false,
-                        /* complete= */ true, List.of(TEST_RDS_INFO), new ArrayList<>()));
+                        /* complete= */ true, List.of(TEST_DAB_INFO, TEST_DAB_INFO_ALT),
+                        new ArrayList<>()));
         verify(mAidlTunerCallbackMocks[1], CALLBACK_TIMEOUT)
                 .onProgramListUpdated(AidlTestUtils.makeChunk(/* purge= */ false,
                         /* complete= */ true, List.of(TEST_FM_INFO), new ArrayList<>()));
         verify(mAidlTunerCallbackMocks[2], CALLBACK_TIMEOUT)
                 .onProgramListUpdated(AidlTestUtils.makeChunk(/* purge= */ false,
-                        /* complete= */ true, List.of(TEST_RDS_INFO, TEST_FM_INFO),
-                        new ArrayList<>()));
+                        /* complete= */ true, List.of(TEST_DAB_INFO, TEST_DAB_INFO_ALT,
+                                TEST_FM_INFO), new ArrayList<>()));
     }
 
     @Test
@@ -958,7 +994,7 @@
             mTunerSessions[0].startProgramListUpdates(/* filter= */ null);
         });
 
-        assertWithMessage("Unknown error HAL exception when updating program list")
+        expect.withMessage("Unknown error HAL exception when updating program list")
                 .that(thrown).hasMessageThat().contains("UNKNOWN_ERROR");
     }
 
@@ -995,7 +1031,7 @@
         boolean isSupported = mTunerSessions[0].isConfigFlagSupported(flag);
 
         verify(mBroadcastRadioMock).isConfigFlagSet(flag);
-        assertWithMessage("Config flag %s is supported", flag).that(isSupported).isFalse();
+        expect.withMessage("Config flag %s is supported", flag).that(isSupported).isFalse();
     }
 
     @Test
@@ -1006,7 +1042,7 @@
         boolean isSupported = mTunerSessions[0].isConfigFlagSupported(flag);
 
         verify(mBroadcastRadioMock).isConfigFlagSet(flag);
-        assertWithMessage("Config flag %s is supported", flag).that(isSupported).isTrue();
+        expect.withMessage("Config flag %s is supported", flag).that(isSupported).isTrue();
     }
 
     @Test
@@ -1018,7 +1054,7 @@
             mTunerSessions[0].setConfigFlag(flag, /* value= */ true);
         });
 
-        assertWithMessage("Exception for setting unsupported flag %s", flag)
+        expect.withMessage("Exception for setting unsupported flag %s", flag)
                 .that(thrown).hasMessageThat().contains("setConfigFlag: NOT_SUPPORTED");
     }
 
@@ -1063,7 +1099,7 @@
             mTunerSessions[0].isConfigFlagSet(flag);
         });
 
-        assertWithMessage("Exception for checking if unsupported flag %s is set", flag)
+        expect.withMessage("Exception for checking if unsupported flag %s is set", flag)
                 .that(thrown).hasMessageThat().contains("isConfigFlagSet: NOT_SUPPORTED");
     }
 
@@ -1076,7 +1112,7 @@
 
         boolean isSet = mTunerSessions[0].isConfigFlagSet(flag);
 
-        assertWithMessage("Config flag %s is set", flag)
+        expect.withMessage("Config flag %s is set", flag)
                 .that(isSet).isEqualTo(expectedConfigFlagValue);
     }
 
@@ -1090,7 +1126,7 @@
             mTunerSessions[0].isConfigFlagSet(flag);
         });
 
-        assertWithMessage("Exception for checking config flag when HAL throws remote exception")
+        expect.withMessage("Exception for checking config flag when HAL throws remote exception")
                 .that(thrown).hasMessageThat().contains("Failed to check flag");
     }
 
@@ -1131,7 +1167,7 @@
             mTunerSessions[0].setParameters(parametersSet);
         });
 
-        assertWithMessage("Exception for setting parameters when HAL throws remote exception")
+        expect.withMessage("Exception for setting parameters when HAL throws remote exception")
                 .that(thrown).hasMessageThat().contains(exceptionMessage);
     }
 
@@ -1157,7 +1193,7 @@
             mTunerSessions[0].getParameters(parameterKeys);
         });
 
-        assertWithMessage("Exception for getting parameters when HAL throws remote exception")
+        expect.withMessage("Exception for getting parameters when HAL throws remote exception")
                 .that(thrown).hasMessageThat().contains(exceptionMessage);
     }
 
@@ -1264,4 +1300,24 @@
         }
         return seekFrequency;
     }
+
+    private void verifyHalProgramListUpdatesInvocation(ProgramList.Filter filter) throws Exception {
+        ProgramFilter halFilterExpected = ConversionUtils.filterToHalProgramFilter(filter);
+        ArgumentCaptor<ProgramFilter> halFilterCaptor = ArgumentCaptor.forClass(
+                ProgramFilter.class);
+        verify(mBroadcastRadioMock).startProgramListUpdates(halFilterCaptor.capture());
+        ProgramFilter halFilterInvoked = halFilterCaptor.getValue();
+        expect.withMessage("Filtered identifier types").that(
+                halFilterInvoked.identifierTypes).asList().containsExactlyElementsIn(Arrays.stream(
+                        halFilterExpected.identifierTypes).boxed().toArray(Integer[]::new));
+        expect.withMessage("Filtered identifiers").that(
+                halFilterInvoked.identifiers).asList()
+                .containsExactlyElementsIn(halFilterExpected.identifiers);
+        expect.withMessage("Categories-included filter")
+                .that(halFilterInvoked.includeCategories)
+                .isEqualTo(halFilterExpected.includeCategories);
+        expect.withMessage("Modifications-excluded filter")
+                .that(halFilterInvoked.excludeModifications)
+                .isEqualTo(halFilterExpected.excludeModifications);
+    }
 }
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ProgramInfoCacheTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ProgramInfoCacheTest.java
index ec55ddb..fbb446b 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ProgramInfoCacheTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ProgramInfoCacheTest.java
@@ -21,12 +21,16 @@
 import android.hardware.radio.ProgramList;
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.test.suitebuilder.annotation.MediumTest;
 
 import androidx.test.runner.AndroidJUnit4;
 
 import com.android.server.broadcastradio.ExtendedRadioMockitoTestCase;
 
+import com.google.common.truth.Expect;
+
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -40,188 +44,221 @@
 @RunWith(AndroidJUnit4.class)
 @MediumTest
 public class ProgramInfoCacheTest extends ExtendedRadioMockitoTestCase {
-    private static final String TAG = "BroadcastRadioTests.ProgramInfoCache";
+    private static final int TEST_QUALITY = 1;
 
-    private final ProgramSelector.Identifier mAmFmIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, 88500);
-    private final RadioManager.ProgramInfo mAmFmInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_FM, mAmFmIdentifier, 0);
+    private static final ProgramSelector.Identifier TEST_AM_FM_ID = new ProgramSelector.Identifier(
+            ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, /* value= */ 88500);
+    private static final ProgramSelector TEST_AM_FM_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_FM, TEST_AM_FM_ID);
+    private static final RadioManager.ProgramInfo TEST_AM_FM_INFO = TestUtils.makeProgramInfo(
+            TEST_AM_FM_SELECTOR, TEST_QUALITY);
 
-    private final ProgramSelector.Identifier mRdsIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI, 15019);
-    private final RadioManager.ProgramInfo mRdsInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 0);
+    private static final ProgramSelector.Identifier TEST_RDS_ID = new ProgramSelector.Identifier(
+            ProgramSelector.IDENTIFIER_TYPE_RDS_PI, /* value= */ 15019);
+    private static final ProgramSelector TEST_RDS_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_FM, TEST_RDS_ID);
+    private static final RadioManager.ProgramInfo TEST_RDS_INFO = TestUtils.makeProgramInfo(
+            TEST_RDS_SELECTOR, TEST_QUALITY);
 
-    private final ProgramSelector.Identifier mDabEnsembleIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE, 1337);
-    private final RadioManager.ProgramInfo mDabEnsembleInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_DAB, mDabEnsembleIdentifier, 0);
+    private static final ProgramSelector TEST_HD_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_FM_HD, new ProgramSelector.Identifier(
+                    ProgramSelector.IDENTIFIER_TYPE_HD_STATION_ID_EXT,
+                    /* value= */ 0x17C14100000001L));
 
-    private final ProgramSelector.Identifier mVendorCustomIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, 9001);
-    private final RadioManager.ProgramInfo mVendorCustomInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_VENDOR_START, mVendorCustomIdentifier, 0);
+    private static final ProgramSelector.Identifier TEST_DAB_SID_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT,
+                    /* value= */ 0xA000000111L);
+    private static final ProgramSelector.Identifier TEST_DAB_ENSEMBLE_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE,
+                    /* value= */ 0x1001);
+    private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_352);
+    private static final ProgramSelector TEST_DAB_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_SID_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID, TEST_DAB_ENSEMBLE_ID});
+    private static final UniqueProgramIdentifier TEST_DAB_UNIQUE_ID =
+            new UniqueProgramIdentifier(TEST_DAB_SELECTOR);
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO = TestUtils.makeProgramInfo(
+            TEST_DAB_SELECTOR, TEST_QUALITY);
+    private static final ProgramSelector.Identifier TEST_VENDOR_ID = new ProgramSelector.Identifier(
+            ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, /* value= */ 9001);
+    private static final ProgramSelector TEST_VENDOR_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_VENDOR_START, TEST_VENDOR_ID);
+    private static final UniqueProgramIdentifier TEST_VENDOR_UNIQUE_ID =
+            new UniqueProgramIdentifier(TEST_VENDOR_SELECTOR);
+    private static final RadioManager.ProgramInfo TEST_VENDOR_INFO = TestUtils.makeProgramInfo(
+            TEST_VENDOR_SELECTOR, TEST_QUALITY);
 
-    // HAL-side ProgramInfoCache containing all of the above ProgramInfos.
-    private final ProgramInfoCache mAllProgramInfos = new ProgramInfoCache(null, true, mAmFmInfo,
-            mRdsInfo, mDabEnsembleInfo, mVendorCustomInfo);
+    private static final ProgramInfoCache FULL_PROGRAM_INFO_CACHE = new ProgramInfoCache(
+            /* filter= */ null, /* complete= */ true, TEST_AM_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO,
+            TEST_VENDOR_INFO);
+
+    @Rule
+    public final Expect expect = Expect.create();
 
     @Test
     public void testUpdateFromHal() {
         // First test updating an incomplete cache with a purging, complete chunk.
-        ProgramInfoCache cache = new ProgramInfoCache(null, false, mAmFmInfo);
+        ProgramInfoCache cache = new ProgramInfoCache(null, false, TEST_AM_FM_INFO);
         ProgramListChunk chunk = new ProgramListChunk();
         chunk.purge = true;
         chunk.complete = true;
-        chunk.modified.add(TestUtils.programInfoToHal(mRdsInfo));
-        chunk.modified.add(TestUtils.programInfoToHal(mDabEnsembleInfo));
+        chunk.modified.add(TestUtils.programInfoToHal(TEST_RDS_INFO));
+        chunk.modified.add(TestUtils.programInfoToHal(TEST_DAB_INFO));
         cache.updateFromHalProgramListChunk(chunk);
-        assertTrue(cache.programInfosAreExactly(mRdsInfo, mDabEnsembleInfo));
+        expect.withMessage("Program info cache updated with a purging complete chunk")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_RDS_INFO, TEST_DAB_INFO);
         assertTrue(cache.isComplete());
 
         // Then test a non-purging, incomplete chunk.
         chunk.purge = false;
         chunk.complete = false;
         chunk.modified.clear();
-        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(
-                ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 1);
+        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(TEST_RDS_SELECTOR, 1);
         chunk.modified.add(TestUtils.programInfoToHal(updatedRdsInfo));
-        chunk.modified.add(TestUtils.programInfoToHal(mVendorCustomInfo));
-        chunk.removed.add(Convert.programIdentifierToHal(mDabEnsembleIdentifier));
+        chunk.modified.add(TestUtils.programInfoToHal(TEST_VENDOR_INFO));
+        chunk.removed.add(Convert.programIdentifierToHal(TEST_DAB_SID_ID));
         cache.updateFromHalProgramListChunk(chunk);
-        assertTrue(cache.programInfosAreExactly(updatedRdsInfo, mVendorCustomInfo));
+        expect.withMessage("Program info cache updated with non-puring incomplete chunk")
+                .that(cache.toProgramInfoList()).containsExactly(updatedRdsInfo, TEST_VENDOR_INFO);
         assertFalse(cache.isComplete());
     }
 
     @Test
     public void testNullFilter() {
         ProgramInfoCache cache = new ProgramInfoCache(null, true);
-        cache.filterAndUpdateFrom(mAllProgramInfos, false);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, mRdsInfo, mDabEnsembleInfo,
-                  mVendorCustomInfo));
+        cache.filterAndUpdateFrom(FULL_PROGRAM_INFO_CACHE, false);
+        expect.withMessage("Program info cache with null filter")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, TEST_RDS_INFO,
+                        TEST_DAB_INFO, TEST_VENDOR_INFO);
     }
 
     @Test
     public void testEmptyFilter() {
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new HashSet<Integer>(),
                   new HashSet<ProgramSelector.Identifier>(), true, false));
-        cache.filterAndUpdateFrom(mAllProgramInfos, false);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, mRdsInfo, mDabEnsembleInfo,
-                  mVendorCustomInfo));
+        cache.filterAndUpdateFrom(FULL_PROGRAM_INFO_CACHE, false);
+        expect.withMessage("Program info cache with empty filter")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, TEST_RDS_INFO,
+                        TEST_DAB_INFO, TEST_VENDOR_INFO);
     }
 
     @Test
     public void testFilterByType() {
         HashSet<Integer> filterTypes = new HashSet<>();
         filterTypes.add(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY);
-        filterTypes.add(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE);
+        filterTypes.add(ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT);
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(filterTypes,
                   new HashSet<ProgramSelector.Identifier>(), true, false));
-        cache.filterAndUpdateFrom(mAllProgramInfos, false);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, mDabEnsembleInfo));
+        cache.filterAndUpdateFrom(FULL_PROGRAM_INFO_CACHE, false);
+        expect.withMessage("Program info cache with type filter")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, TEST_DAB_INFO);
     }
 
     @Test
     public void testFilterByIdentifier() {
         HashSet<ProgramSelector.Identifier> filterIds = new HashSet<>();
-        filterIds.add(mRdsIdentifier);
-        filterIds.add(mVendorCustomIdentifier);
+        filterIds.add(TEST_RDS_ID);
+        filterIds.add(TEST_VENDOR_ID);
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new HashSet<Integer>(),
                   filterIds, true, false));
-        cache.filterAndUpdateFrom(mAllProgramInfos, false);
-        assertTrue(cache.programInfosAreExactly(mRdsInfo, mVendorCustomInfo));
+        cache.filterAndUpdateFrom(FULL_PROGRAM_INFO_CACHE, false);
+        expect.withMessage("Program info cache with identifier filter")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_RDS_INFO, TEST_VENDOR_INFO);
     }
 
     @Test
     public void testFilterExcludeCategories() {
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new HashSet<Integer>(),
                   new HashSet<ProgramSelector.Identifier>(), false, false));
-        cache.filterAndUpdateFrom(mAllProgramInfos, false);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, mRdsInfo));
+        cache.filterAndUpdateFrom(FULL_PROGRAM_INFO_CACHE, false);
+        expect.withMessage("Program info cache with filter excluding categories")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, TEST_RDS_INFO,
+                        TEST_DAB_INFO);
     }
 
     @Test
     public void testPurgeUpdateChunks() {
-        ProgramInfoCache cache = new ProgramInfoCache(null, false, mAmFmInfo);
+        ProgramInfoCache cache = new ProgramInfoCache(null, false, TEST_AM_FM_INFO);
         List<ProgramList.Chunk> chunks =
-                cache.filterAndUpdateFromInternal(mAllProgramInfos, true, 3, 3);
+                cache.filterAndUpdateFromInternal(FULL_PROGRAM_INFO_CACHE, true, 3, 3);
         assertEquals(2, chunks.size());
         verifyChunkListFlags(chunks, true, true);
-        verifyChunkListModified(chunks, 3, mAmFmInfo, mRdsInfo, mDabEnsembleInfo,
-                mVendorCustomInfo);
+        verifyChunkListModified(chunks, 3, TEST_AM_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO,
+                TEST_VENDOR_INFO);
         verifyChunkListRemoved(chunks, 0);
     }
 
     @Test
     public void testDeltaUpdateChunksModificationsIncluded() {
         // Create a cache with a filter that allows modifications, and set its contents to
-        // mAmFmInfo, mRdsInfo, mDabEnsembleInfo, and mVendorCustomInfo.
-        ProgramInfoCache cache = new ProgramInfoCache(null, true, mAmFmInfo, mRdsInfo,
-                mDabEnsembleInfo, mVendorCustomInfo);
+        // TEST_AM_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO, and TEST_VENDOR_INFO.
+        ProgramInfoCache cache = new ProgramInfoCache(null, true, TEST_AM_FM_INFO, TEST_RDS_INFO,
+                TEST_DAB_INFO, TEST_VENDOR_INFO);
 
         // Create a HAL cache that:
         // - Is complete.
-        // - Retains mAmFmInfo.
-        // - Replaces mRdsInfo with updatedRdsInfo.
-        // - Drops mDabEnsembleInfo and mVendorCustomInfo.
-        // - Introduces a new SXM info.
-        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(
-                ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 1);
-        RadioManager.ProgramInfo newSxmInfo = TestUtils.makeProgramInfo(
-                ProgramSelector.PROGRAM_TYPE_SXM,
-                new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_SXM_CHANNEL, 12345),
-                0);
-        ProgramInfoCache halCache = new ProgramInfoCache(null, true, mAmFmInfo, updatedRdsInfo,
-                newSxmInfo);
+        // - Retains TEST_AM_FM_INFO.
+        // - Replaces TEST_RDS_INFO with updatedRdsInfo.
+        // - Drops TEST_DAB_INFO and TEST_VENDOR_INFO.
+        // - Introduces a new HD info.
+        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(TEST_RDS_SELECTOR,
+                TEST_QUALITY + 1);
+        RadioManager.ProgramInfo newHdInfo = TestUtils.makeProgramInfo(TEST_HD_SELECTOR,
+                TEST_QUALITY);
+        ProgramInfoCache halCache = new ProgramInfoCache(null, true, TEST_AM_FM_INFO,
+                updatedRdsInfo, newHdInfo);
 
         // Update the cache and verify:
         // - The final chunk's complete flag is set.
-        // - mAmFmInfo is retained and not reported in the chunks.
-        // - updatedRdsInfo should appear as an update to mRdsInfo.
-        // - newSxmInfo should appear as a new entry.
-        // - mDabEnsembleInfo and mVendorCustomInfo should be reported as removed.
+        // - TEST_AM_FM_INFO is retained and not reported in the chunks.
+        // - updatedRdsInfo should appear as an update to TEST_RDS_INFO.
+        // - newHdInfo should appear as a new entry.
+        // - TEST_DAB_INFO and TEST_VENDOR_INFO should be reported as removed.
         List<ProgramList.Chunk> chunks = cache.filterAndUpdateFromInternal(halCache, false, 5, 1);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, updatedRdsInfo, newSxmInfo));
+        expect.withMessage("Program info cache with modification included")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, updatedRdsInfo,
+                        newHdInfo);
         assertEquals(2, chunks.size());
         verifyChunkListFlags(chunks, false, true);
-        verifyChunkListModified(chunks, 5, updatedRdsInfo, newSxmInfo);
-        verifyChunkListRemoved(chunks, 1, mDabEnsembleIdentifier, mVendorCustomIdentifier);
+        verifyChunkListModified(chunks, 5, updatedRdsInfo, newHdInfo);
+        verifyChunkListRemoved(chunks, 1, TEST_DAB_UNIQUE_ID, TEST_VENDOR_UNIQUE_ID);
     }
 
     @Test
     public void testDeltaUpdateChunksModificationsExcluded() {
         // Create a cache with a filter that excludes modifications, and set its contents to
-        // mAmFmInfo, mRdsInfo, mDabEnsembleInfo, and mVendorCustomInfo.
+        // TEST_AM_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO, and TEST_VENDOR_INFO.
         ProgramInfoCache cache = new ProgramInfoCache(new ProgramList.Filter(new HashSet<Integer>(),
-                new HashSet<ProgramSelector.Identifier>(), true, true), true, mAmFmInfo, mRdsInfo,
-                mDabEnsembleInfo, mVendorCustomInfo);
+                new HashSet<ProgramSelector.Identifier>(), true, true), true,
+                TEST_AM_FM_INFO, TEST_RDS_INFO, TEST_DAB_INFO, TEST_VENDOR_INFO);
 
         // Create a HAL cache that:
         // - Is incomplete.
-        // - Retains mAmFmInfo.
-        // - Replaces mRdsInfo with updatedRdsInfo.
-        // - Drops mDabEnsembleInfo and mVendorCustomInfo.
-        // - Introduces a new SXM info.
-        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(
-                ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 1);
-        RadioManager.ProgramInfo newSxmInfo = TestUtils.makeProgramInfo(
-                ProgramSelector.PROGRAM_TYPE_SXM,
-                new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_SXM_CHANNEL, 12345),
-                0);
-        ProgramInfoCache halCache = new ProgramInfoCache(null, false, mAmFmInfo, updatedRdsInfo,
-                newSxmInfo);
+        // - Retains TEST_AM_FM_INFO.
+        // - Replaces TEST_RDS_INFO with updatedRdsInfo.
+        // - Drops TEST_DAB_INFO and TEST_VENDOR_INFO.
+        // - Introduces a new HD info.
+        RadioManager.ProgramInfo updatedRdsInfo = TestUtils.makeProgramInfo(TEST_RDS_SELECTOR, 1);
+        RadioManager.ProgramInfo newHdInfo = TestUtils.makeProgramInfo(TEST_HD_SELECTOR,
+                TEST_QUALITY);
+        ProgramInfoCache halCache = new ProgramInfoCache(null, false, TEST_AM_FM_INFO,
+                updatedRdsInfo, newHdInfo);
 
         // Update the cache and verify:
         // - All complete flags are false.
-        // - mAmFmInfo and mRdsInfo are retained and not reported in the chunks.
-        // - newSxmInfo should appear as a new entry.
-        // - mDabEnsembleInfo and mVendorCustomInfo should be reported as removed.
+        // - TEST_AM_FM_INFO and TEST_RDS_INFO are retained and not reported in the chunks.
+        // - newHdInfo should appear as a new entry.
+        // - TEST_DAB_INFO and TEST_VENDOR_INFO should be reported as removed.
         List<ProgramList.Chunk> chunks = cache.filterAndUpdateFromInternal(halCache, false, 5, 1);
-        assertTrue(cache.programInfosAreExactly(mAmFmInfo, mRdsInfo, newSxmInfo));
+        expect.withMessage("Program info cache with modification excluded")
+                .that(cache.toProgramInfoList()).containsExactly(TEST_AM_FM_INFO, TEST_RDS_INFO,
+                        newHdInfo);
         assertEquals(2, chunks.size());
         verifyChunkListFlags(chunks, false, false);
-        verifyChunkListModified(chunks, 5, newSxmInfo);
-        verifyChunkListRemoved(chunks, 1, mDabEnsembleIdentifier, mVendorCustomIdentifier);
+        verifyChunkListModified(chunks, 5, newHdInfo);
+        verifyChunkListRemoved(chunks, 1, TEST_DAB_UNIQUE_ID, TEST_VENDOR_UNIQUE_ID);
     }
 
     // Verifies that:
@@ -271,20 +308,21 @@
     // - Each chunk's removed array has a similar number of elements.
     // - Each element of expectedIdentifiers appears in a chunk.
     private static void verifyChunkListRemoved(List<ProgramList.Chunk> chunks,
-            int maxRemovedPerChunk, ProgramSelector.Identifier... expectedIdentifiers) {
+            int maxRemovedPerChunk,
+            UniqueProgramIdentifier... expectedIdentifiers) {
         if (chunks.isEmpty()) {
             assertEquals(0, expectedIdentifiers.length);
             return;
         }
-        HashSet<ProgramSelector.Identifier> expectedSet = new HashSet<>();
-        for (ProgramSelector.Identifier identifier : expectedIdentifiers) {
+        HashSet<UniqueProgramIdentifier> expectedSet = new HashSet<>();
+        for (UniqueProgramIdentifier identifier : expectedIdentifiers) {
             expectedSet.add(identifier);
         }
 
-        HashSet<ProgramSelector.Identifier> actualSet = new HashSet<>();
+        HashSet<UniqueProgramIdentifier> actualSet = new HashSet<>();
         int chunk0NumRemoved = chunks.get(0).getRemoved().size();
         for (ProgramList.Chunk chunk : chunks) {
-            Set<ProgramSelector.Identifier> chunkRemoved = chunk.getRemoved();
+            Set<UniqueProgramIdentifier> chunkRemoved = chunk.getRemoved();
             assertTrue(chunkRemoved.size() <= maxRemovedPerChunk);
             assertTrue(Math.abs(chunkRemoved.size() - chunk0NumRemoved) <= 1);
             actualSet.addAll(chunkRemoved);
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/StartProgramListUpdatesFanoutTest.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/StartProgramListUpdatesFanoutTest.java
index 7d604d4..8c16d79 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/StartProgramListUpdatesFanoutTest.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/StartProgramListUpdatesFanoutTest.java
@@ -35,6 +35,7 @@
 import android.hardware.radio.ProgramList;
 import android.hardware.radio.ProgramSelector;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.RemoteException;
 
 import com.android.dx.mockito.inline.extended.StaticMockitoSessionBuilder;
@@ -72,22 +73,42 @@
     private TunerSession[] mTunerSessions;
 
     // Data objects used during tests
-    private final ProgramSelector.Identifier mAmFmIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, 88500);
-    private final RadioManager.ProgramInfo mAmFmInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_FM, mAmFmIdentifier, 0);
-    private final RadioManager.ProgramInfo mModifiedAmFmInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_FM, mAmFmIdentifier, 1);
+    private static final int TEST_QUALITY = 0;
+    private static final ProgramSelector.Identifier TEST_AM_FM_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY,
+                    /* value= */ 88_500);
+    private static final ProgramSelector TEST_AM_FM_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_FM, TEST_AM_FM_ID);
+    private static final RadioManager.ProgramInfo TEST_AM_FM_INFO = TestUtils.makeProgramInfo(
+            TEST_AM_FM_SELECTOR, TEST_QUALITY);
+    private static final RadioManager.ProgramInfo TEST_AM_FM_MODIFIED_INFO =
+            TestUtils.makeProgramInfo(TEST_AM_FM_SELECTOR, TEST_QUALITY + 1);
 
-    private final ProgramSelector.Identifier mRdsIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI, 15019);
-    private final RadioManager.ProgramInfo mRdsInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_FM, mRdsIdentifier, 0);
+    private static final ProgramSelector.Identifier TEST_RDS_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_RDS_PI,
+                    /* value= */ 15_019);
+    private static final ProgramSelector TEST_RDS_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_FM, TEST_RDS_ID);
 
-    private final ProgramSelector.Identifier mDabEnsembleIdentifier =
-            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE, 1337);
-    private final RadioManager.ProgramInfo mDabEnsembleInfo = TestUtils.makeProgramInfo(
-            ProgramSelector.PROGRAM_TYPE_DAB, mDabEnsembleIdentifier, 0);
+    private static final UniqueProgramIdentifier TEST_RDS_UNIQUE_ID = new UniqueProgramIdentifier(
+            TEST_RDS_ID);
+    private static final RadioManager.ProgramInfo TEST_RDS_INFO = TestUtils.makeProgramInfo(
+            TEST_RDS_SELECTOR, TEST_QUALITY);
+
+    private static final ProgramSelector.Identifier TEST_DAB_SID_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT,
+                    /* value= */ 0xA000000111L);
+    private static final ProgramSelector.Identifier TEST_DAB_ENSEMBLE_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE,
+                    /* value= */ 0x1001);
+    private static final ProgramSelector.Identifier TEST_DAB_FREQUENCY_ID =
+            new ProgramSelector.Identifier(ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY,
+                    /* value= */ 220_352);
+    private static final ProgramSelector TEST_DAB_SELECTOR = TestUtils.makeProgramSelector(
+            ProgramSelector.PROGRAM_TYPE_DAB, TEST_DAB_SID_ID,
+            new ProgramSelector.Identifier[]{TEST_DAB_FREQUENCY_ID, TEST_DAB_ENSEMBLE_ID});
+    private static final RadioManager.ProgramInfo TEST_DAB_INFO = TestUtils.makeProgramInfo(
+            TEST_DAB_SELECTOR, TEST_QUALITY);
 
     @Override
     protected void initializeSession(StaticMockitoSessionBuilder builder) {
@@ -126,18 +147,18 @@
 
         // Initiate a program list update from the HAL side and verify both connected AIDL clients
         // receive the update.
-        updateHalProgramInfo(true, Arrays.asList(mAmFmInfo, mRdsInfo), null);
+        updateHalProgramInfo(true, Arrays.asList(TEST_AM_FM_INFO, TEST_RDS_INFO), null);
         for (int i = 0; i < 2; i++) {
             verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[i], true, Arrays.asList(
-                    mAmFmInfo, mRdsInfo), null);
+                    TEST_AM_FM_INFO, TEST_RDS_INFO), null);
         }
 
         // Repeat with a non-purging update.
-        updateHalProgramInfo(false, Arrays.asList(mModifiedAmFmInfo),
-                Arrays.asList(mRdsIdentifier));
+        updateHalProgramInfo(false, Arrays.asList(TEST_AM_FM_MODIFIED_INFO),
+                Arrays.asList(TEST_RDS_ID));
         for (int i = 0; i < 2; i++) {
             verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[i], false,
-                    Arrays.asList(mModifiedAmFmInfo), Arrays.asList(mRdsIdentifier));
+                    Arrays.asList(TEST_AM_FM_MODIFIED_INFO), Arrays.asList(TEST_RDS_UNIQUE_ID));
         }
 
         // Now start updates on the 3rd client. Verify the HAL function has not been called again
@@ -145,19 +166,19 @@
         mTunerSessions[2].startProgramListUpdates(aidlFilter);
         verify(mHalTunerSessionMock, times(1)).startProgramListUpdates(any());
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[2], true,
-                Arrays.asList(mModifiedAmFmInfo), null);
+                Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
     }
 
     @Test
     public void testFiltering() throws RemoteException {
         // Open 4 clients that will use the following filters:
-        // [0]: ID mRdsIdentifier, modifications excluded
+        // [0]: ID TEST_RDS_ID, modifications excluded
         // [1]: No categories, modifications excluded
         // [2]: Type IDENTIFIER_TYPE_AMFM_FREQUENCY, modifications excluded
         // [3]: Type IDENTIFIER_TYPE_AMFM_FREQUENCY, modifications included
         openAidlClients(4);
         ProgramList.Filter idFilter = new ProgramList.Filter(new HashSet<Integer>(),
-                new HashSet<ProgramSelector.Identifier>(Arrays.asList(mRdsIdentifier)), true, true);
+                new HashSet<ProgramSelector.Identifier>(Arrays.asList(TEST_RDS_ID)), true, true);
         ProgramList.Filter categoryFilter = new ProgramList.Filter(new HashSet<Integer>(),
                 new HashSet<ProgramSelector.Identifier>(), false, true);
         ProgramList.Filter typeFilterWithoutModifications = new ProgramList.Filter(
@@ -188,41 +209,40 @@
         halFilter.excludeModifications = false;
         verify(mHalTunerSessionMock, times(1)).startProgramListUpdates(halFilter);
 
-        // Adding mRdsInfo should update clients [0] and [1].
-        updateHalProgramInfo(false, Arrays.asList(mRdsInfo), null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], false, Arrays.asList(mRdsInfo),
-                null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], false, Arrays.asList(mRdsInfo),
-                null);
+        // Adding TEST_RDS_INFO should update clients [0] and [1].
+        updateHalProgramInfo(false, Arrays.asList(TEST_RDS_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], false,
+                Arrays.asList(TEST_RDS_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], false,
+                Arrays.asList(TEST_RDS_INFO), null);
 
-        // Adding mAmFmInfo should update clients [1], [2], and [3].
-        updateHalProgramInfo(false, Arrays.asList(mAmFmInfo), null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], false, Arrays.asList(mAmFmInfo),
-                null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[2], false, Arrays.asList(mAmFmInfo),
-                null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[3], false, Arrays.asList(mAmFmInfo),
-                null);
-
-        // Modifying mAmFmInfo to mModifiedAmFmInfo should update only [3].
-        updateHalProgramInfo(false, Arrays.asList(mModifiedAmFmInfo), null);
+        // Adding TEST_AM_FM_INFO should update clients [1], [2], and [3].
+        updateHalProgramInfo(false, Arrays.asList(TEST_AM_FM_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], false,
+                Arrays.asList(TEST_AM_FM_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[2], false,
+                Arrays.asList(TEST_AM_FM_INFO), null);
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[3], false,
-                Arrays.asList(mModifiedAmFmInfo), null);
+                Arrays.asList(TEST_AM_FM_INFO), null);
 
-        // Adding mDabEnsembleInfo should not update any client.
-        updateHalProgramInfo(false, Arrays.asList(mDabEnsembleInfo), null);
+        // Modifying TEST_AM_FM_INFO to TEST_AM_FM_MODIFIED_INFO should update only [3].
+        updateHalProgramInfo(false, Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[3], false,
+                Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
+
+        updateHalProgramInfo(false, Arrays.asList(TEST_DAB_INFO), null);
         verify(mAidlTunerCallbackMocks[0], CB_TIMEOUT.times(1)).onProgramListUpdated(any());
-        verify(mAidlTunerCallbackMocks[1], CB_TIMEOUT.times(2)).onProgramListUpdated(any());
+        verify(mAidlTunerCallbackMocks[1], CB_TIMEOUT.times(3)).onProgramListUpdated(any());
         verify(mAidlTunerCallbackMocks[2], CB_TIMEOUT.times(2)).onProgramListUpdated(any());
         verify(mAidlTunerCallbackMocks[3], CB_TIMEOUT.times(2)).onProgramListUpdated(any());
     }
 
     @Test
     public void testClientClosing() throws RemoteException {
-        // Open 2 clients that use different filters that are both sensitive to mAmFmIdentifier.
+        // Open 2 clients that use different filters that are both sensitive to TEST_AM_FM_ID.
         openAidlClients(2);
         ProgramList.Filter idFilter = new ProgramList.Filter(new HashSet<Integer>(),
-                new HashSet<ProgramSelector.Identifier>(Arrays.asList(mAmFmIdentifier)), true,
+                new HashSet<ProgramSelector.Identifier>(Arrays.asList(TEST_AM_FM_ID)), true,
                 false);
         ProgramList.Filter typeFilter = new ProgramList.Filter(
                 new HashSet<Integer>(Arrays.asList(ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY)),
@@ -237,23 +257,24 @@
         halFilter.identifiers.clear();
         verify(mHalTunerSessionMock, times(1)).startProgramListUpdates(halFilter);
 
-        // Update the HAL with mAmFmInfo, and verify both clients are updated.
-        updateHalProgramInfo(true, Arrays.asList(mAmFmInfo), null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], true, Arrays.asList(mAmFmInfo),
-                null);
-        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], true, Arrays.asList(mAmFmInfo),
-                null);
+        // Update the HAL with TEST_AM_FM_INFO, and verify both clients are updated.
+        updateHalProgramInfo(true, Arrays.asList(TEST_AM_FM_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], true,
+                Arrays.asList(TEST_AM_FM_INFO), null);
+        verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], true,
+                Arrays.asList(TEST_AM_FM_INFO), null);
 
         // Stop updates on the first client and verify the HAL filter is updated.
         mTunerSessions[0].stopProgramListUpdates();
         verify(mHalTunerSessionMock, times(1)).startProgramListUpdates(Convert.programFilterToHal(
                 typeFilter));
 
-        // Update the HAL with mModifiedAmFmInfo, and verify only the remaining client is updated.
-        updateHalProgramInfo(true, Arrays.asList(mModifiedAmFmInfo), null);
+        // Update the HAL with TEST_AM_FM_MODIFIED_INFO, and verify only the remaining client is
+        // updated.
+        updateHalProgramInfo(true, Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
         verify(mAidlTunerCallbackMocks[0], CB_TIMEOUT.times(1)).onProgramListUpdated(any());
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[1], true,
-                Arrays.asList(mModifiedAmFmInfo), null);
+                Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
 
         // Close the other client without explicitly stopping updates, and verify HAL updates are
         // stopped as well.
@@ -269,15 +290,15 @@
 
         // Verify the AIDL client receives all types of updates (e.g. a new program, an update to
         // that program, and a category).
-        updateHalProgramInfo(true, Arrays.asList(mAmFmInfo, mRdsInfo), null);
+        updateHalProgramInfo(true, Arrays.asList(TEST_AM_FM_INFO, TEST_RDS_INFO), null);
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], true, Arrays.asList(
-                mAmFmInfo, mRdsInfo), null);
-        updateHalProgramInfo(false, Arrays.asList(mModifiedAmFmInfo), null);
+                TEST_AM_FM_INFO, TEST_RDS_INFO), null);
+        updateHalProgramInfo(false, Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], false,
-                Arrays.asList(mModifiedAmFmInfo), null);
-        updateHalProgramInfo(false, Arrays.asList(mDabEnsembleInfo), null);
+                Arrays.asList(TEST_AM_FM_MODIFIED_INFO), null);
+        updateHalProgramInfo(false, Arrays.asList(TEST_DAB_INFO), null);
         verifyAidlClientReceivedChunk(mAidlTunerCallbackMocks[0], false,
-                Arrays.asList(mDabEnsembleInfo), null);
+                Arrays.asList(TEST_DAB_INFO), null);
 
         // Verify closing the AIDL session also stops HAL updates.
         mTunerSessions[0].close();
@@ -313,12 +334,12 @@
 
     private void verifyAidlClientReceivedChunk(android.hardware.radio.ITunerCallback clientMock,
             boolean purge, List<RadioManager.ProgramInfo> modified,
-            List<ProgramSelector.Identifier> removed) throws RemoteException {
+            List<UniqueProgramIdentifier> removed) throws RemoteException {
         HashSet<RadioManager.ProgramInfo> modifiedSet = new HashSet<>();
         if (modified != null) {
             modifiedSet.addAll(modified);
         }
-        HashSet<ProgramSelector.Identifier> removedSet = new HashSet<>();
+        HashSet<UniqueProgramIdentifier> removedSet = new HashSet<>();
         if (removed != null) {
             removedSet.addAll(removed);
         }
diff --git a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/TestUtils.java b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/TestUtils.java
index d4ca8d4..0b16141 100644
--- a/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/TestUtils.java
+++ b/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/TestUtils.java
@@ -45,6 +45,23 @@
     static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector,
             ProgramSelector.Identifier logicallyTunedTo,
             ProgramSelector.Identifier physicallyTunedTo, int signalQuality) {
+        if (logicallyTunedTo == null) {
+            logicallyTunedTo = selector.getPrimaryId();
+        }
+        if (physicallyTunedTo == null) {
+            if (selector.getPrimaryId().getType()
+                    == ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT) {
+                for (int i = 0; i < selector.getSecondaryIds().length; i++) {
+                    if (selector.getSecondaryIds()[i].getType()
+                            == ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY) {
+                        physicallyTunedTo = selector.getSecondaryIds()[i];
+                        break;
+                    }
+                }
+            } else {
+                physicallyTunedTo = selector.getPrimaryId();
+            }
+        }
         return new RadioManager.ProgramInfo(selector,
                 logicallyTunedTo, physicallyTunedTo, /* relatedContents= */ null,
                 /* infoFlags= */ 0, signalQuality,
@@ -52,14 +69,8 @@
     }
 
     static RadioManager.ProgramInfo makeProgramInfo(ProgramSelector selector, int signalQuality) {
-        return makeProgramInfo(selector, selector.getPrimaryId(), selector.getPrimaryId(),
-                signalQuality);
-    }
-
-    static RadioManager.ProgramInfo makeProgramInfo(int programType,
-            ProgramSelector.Identifier identifier, int signalQuality) {
-        return makeProgramInfo(makeProgramSelector(programType, identifier),
-                /* logicallyTunedTo= */ null, /* physicallyTunedTo= */ null, signalQuality);
+        return makeProgramInfo(selector, /* logicallyTunedTo= */ null,
+                /* physicallyTunedTo= */ null, signalQuality);
     }
 
     static ProgramSelector makeFmSelector(long freq) {
@@ -70,8 +81,12 @@
 
     static ProgramSelector makeProgramSelector(int programType,
             ProgramSelector.Identifier identifier) {
-        return new ProgramSelector(programType, identifier, /* secondaryIds= */ null,
-                /* vendorIds= */ null);
+        return makeProgramSelector(programType, identifier, /* secondaryIds= */ null);
+    }
+
+    static ProgramSelector makeProgramSelector(int programType,
+            ProgramSelector.Identifier primaryId, ProgramSelector.Identifier[] secondaryIds) {
+        return new ProgramSelector(programType, primaryId, secondaryIds, /* vendorIds= */ null);
     }
 
     static ProgramInfo programInfoToHal(RadioManager.ProgramInfo info) {
@@ -79,6 +94,21 @@
         // function only copies fields that are set by makeProgramInfo().
         ProgramInfo hwInfo = new ProgramInfo();
         hwInfo.selector = Convert.programSelectorToHal(info.getSelector());
+        hwInfo.logicallyTunedTo = hwInfo.selector.primaryId;
+        if (info.getSelector().getPrimaryId().getType()
+                == ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT) {
+            for (int i = 0; i < info.getSelector().getSecondaryIds().length; i++) {
+                if (info.getSelector().getSecondaryIds()[i].getType()
+                        == ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY) {
+                    hwInfo.physicallyTunedTo = Convert.programIdentifierToHal(info.getSelector()
+                            .getSecondaryIds()[i]);
+                    break;
+                }
+            }
+        } else {
+            hwInfo.physicallyTunedTo = Convert.programIdentifierToHal(info.getSelector()
+                    .getPrimaryId());
+        }
         hwInfo.signalQuality = info.getSignalStrength();
         return hwInfo;
     }
diff --git a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
index 0778311..8935507 100644
--- a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
+++ b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
@@ -99,7 +99,7 @@
 
     // The first sequence number to try with. Use a large number to avoid conflicts with the first a
     // few sequence numbers the framework used to launch the test activity.
-    private static final int BASE_SEQ = 10000;
+    private static final int BASE_SEQ = 10000000;
 
     @Rule
     public final ActivityTestRule<TestActivity> mActivityTestRule =
@@ -245,7 +245,7 @@
             newConfig.smallestScreenWidthDp++;
             transaction = newTransaction(activityThread, activity.getActivityToken());
             transaction.addCallback(ActivityConfigurationChangeItem.obtain(
-                    new Configuration(newConfig)));
+                    activity.getActivityToken(), new Configuration(newConfig)));
             appThread.scheduleTransaction(transaction);
             InstrumentationRegistry.getInstrumentation().waitForIdleSync();
 
@@ -450,10 +450,12 @@
         appThread.scheduleTransaction(transaction);
 
         transaction = newTransaction(activityThread, activity.getActivityToken());
-        transaction.addCallback(ActivityConfigurationChangeItem.obtain(activityConfigLandscape));
+        transaction.addCallback(ActivityConfigurationChangeItem.obtain(
+                activity.getActivityToken(), activityConfigLandscape));
         transaction.addCallback(ConfigurationChangeItem.obtain(
                 processConfigPortrait, DEVICE_ID_INVALID));
-        transaction.addCallback(ActivityConfigurationChangeItem.obtain(activityConfigPortrait));
+        transaction.addCallback(ActivityConfigurationChangeItem.obtain(
+                activity.getActivityToken(), activityConfigPortrait));
         appThread.scheduleTransaction(transaction);
 
         activity.mTestLatch.await(TIMEOUT_SEC, TimeUnit.SECONDS);
@@ -829,11 +831,12 @@
 
     private static ClientTransaction newRelaunchResumeTransaction(Activity activity) {
         final Configuration currentConfig = activity.getResources().getConfiguration();
-        final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(null,
-                null, 0, new MergedConfiguration(currentConfig, currentConfig),
+        final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(
+                activity.getActivityToken(), null, null, 0,
+                new MergedConfiguration(currentConfig, currentConfig),
                 false /* preserveWindow */);
         final ResumeActivityItem resumeStateRequest =
-                ResumeActivityItem.obtain(true /* isForward */,
+                ResumeActivityItem.obtain(activity.getActivityToken(), true /* isForward */,
                         false /* shouldSendCompatFakeFocus*/);
 
         final ClientTransaction transaction = newTransaction(activity);
@@ -845,7 +848,7 @@
 
     private static ClientTransaction newResumeTransaction(Activity activity) {
         final ResumeActivityItem resumeStateRequest =
-                ResumeActivityItem.obtain(true /* isForward */,
+                ResumeActivityItem.obtain(activity.getActivityToken(), true /* isForward */,
                         false /* shouldSendCompatFakeFocus */);
 
         final ClientTransaction transaction = newTransaction(activity);
@@ -855,7 +858,8 @@
     }
 
     private static ClientTransaction newStopTransaction(Activity activity) {
-        final StopActivityItem stopStateRequest = StopActivityItem.obtain(0 /* configChanges */);
+        final StopActivityItem stopStateRequest = StopActivityItem.obtain(
+                activity.getActivityToken(), 0 /* configChanges */);
 
         final ClientTransaction transaction = newTransaction(activity);
         transaction.setLifecycleStateRequest(stopStateRequest);
@@ -865,7 +869,8 @@
 
     private static ClientTransaction newActivityConfigTransaction(Activity activity,
             Configuration config) {
-        final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config);
+        final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+                activity.getActivityToken(), config);
 
         final ClientTransaction transaction = newTransaction(activity);
         transaction.addCallback(item);
@@ -875,7 +880,8 @@
 
     private static ClientTransaction newNewIntentTransaction(Activity activity,
             List<ReferrerIntent> intents, boolean resume) {
-        final NewIntentItem item = NewIntentItem.obtain(intents, resume);
+        final NewIntentItem item = NewIntentItem.obtain(activity.getActivityToken(), intents,
+                resume);
 
         final ClientTransaction transaction = newTransaction(activity);
         transaction.addCallback(item);
diff --git a/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java b/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
index 1560c0c..08033cc 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ActivityConfigurationChangeItemTest.java
@@ -65,7 +65,7 @@
         doReturn(mActivity).when(mHandler).getActivity(mToken);
 
         final ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem
-                .obtain(mConfiguration);
+                .obtain(mToken, mConfiguration);
         final Context context = item.getContextToUpdate(mHandler, mToken);
 
         assertEquals(mActivity, context);
diff --git a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
index ca6735b..c8d8f4b 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
@@ -22,7 +22,6 @@
 import static android.app.servertransaction.TestUtils.resultInfoList;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertSame;
@@ -61,39 +60,44 @@
 @Presubmit
 public class ObjectPoolTests {
 
+    private final IBinder mActivityToken = new Binder();
+
     // 1. Check if two obtained objects from pool are not the same.
     // 2. Check if the state of the object is cleared after recycling.
     // 3. Check if the same object is obtained from pool after recycling.
 
     @Test
     public void testRecycleActivityConfigurationChangeItem() {
-        ActivityConfigurationChangeItem emptyItem =
-                ActivityConfigurationChangeItem.obtain(Configuration.EMPTY);
-        ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config());
+        ActivityConfigurationChangeItem emptyItem = ActivityConfigurationChangeItem.obtain(
+                null /* activityToken */, Configuration.EMPTY);
+        ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+                mActivityToken, config());
         assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
+        assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
-        ActivityConfigurationChangeItem item2 = ActivityConfigurationChangeItem.obtain(config());
+        ActivityConfigurationChangeItem item2 = ActivityConfigurationChangeItem.obtain(
+                mActivityToken, config());
         assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
+        assertNotEquals(item2, emptyItem);
     }
 
     @Test
     public void testRecycleActivityResultItem() {
-        ActivityResultItem emptyItem = ActivityResultItem.obtain(null);
-        ActivityResultItem item = ActivityResultItem.obtain(resultInfoList());
+        ActivityResultItem emptyItem = ActivityResultItem.obtain(
+                null /* activityToken */, null /* resultInfoList */);
+        ActivityResultItem item = ActivityResultItem.obtain(mActivityToken, resultInfoList());
         assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
+        assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
-        ActivityResultItem item2 = ActivityResultItem.obtain(resultInfoList());
+        ActivityResultItem item2 = ActivityResultItem.obtain(mActivityToken, resultInfoList());
         assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
+        assertNotEquals(item2, emptyItem);
     }
 
     @Test
@@ -101,166 +105,188 @@
         ConfigurationChangeItem emptyItem = ConfigurationChangeItem.obtain(null, 0);
         ConfigurationChangeItem item = ConfigurationChangeItem.obtain(config(), 1);
         assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
+        assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
         ConfigurationChangeItem item2 = ConfigurationChangeItem.obtain(config(), 1);
         assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
+        assertNotEquals(item2, emptyItem);
     }
 
     @Test
     public void testRecycleDestroyActivityItem() {
-        DestroyActivityItem emptyItem = DestroyActivityItem.obtain(false, 0);
-        DestroyActivityItem item = DestroyActivityItem.obtain(true, 117);
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        DestroyActivityItem item2 = DestroyActivityItem.obtain(true, 14);
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleLaunchActivityItem() {
-        Intent intent = new Intent("action");
-        int ident = 57;
-        ActivityInfo activityInfo = new ActivityInfo();
-        activityInfo.flags = 42;
-        activityInfo.setMaxAspectRatio(2.4f);
-        activityInfo.launchToken = "token";
-        activityInfo.applicationInfo = new ApplicationInfo();
-        activityInfo.packageName = "packageName";
-        activityInfo.name = "name";
-        Configuration overrideConfig = new Configuration();
-        overrideConfig.assetsSeq = 5;
-        String referrer = "referrer";
-        int procState = 4;
-        Bundle bundle = new Bundle();
-        bundle.putString("key", "value");
-        PersistableBundle persistableBundle = new PersistableBundle();
-        persistableBundle.putInt("k", 4);
-        IBinder assistToken = new Binder();
-        IBinder shareableActivityToken = new Binder();
-        int deviceId = 3;
-
-        Supplier<LaunchActivityItem> itemSupplier = () -> new LaunchActivityItemBuilder()
-                .setIntent(intent).setIdent(ident).setInfo(activityInfo).setCurConfig(config())
-                .setOverrideConfig(overrideConfig).setReferrer(referrer)
-                .setProcState(procState).setState(bundle).setPersistentState(persistableBundle)
-                .setPendingResults(resultInfoList()).setPendingNewIntents(referrerIntentList())
-                .setIsForward(true).setAssistToken(assistToken)
-                .setShareableActivityToken(shareableActivityToken)
-                .setTaskFragmentToken(new Binder()).setDeviceId(deviceId).build();
-
-        LaunchActivityItem emptyItem = new LaunchActivityItemBuilder().build();
-        LaunchActivityItem item = itemSupplier.get();
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        LaunchActivityItem item2 = itemSupplier.get();
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleActivityRelaunchItem() {
-        ActivityRelaunchItem emptyItem = ActivityRelaunchItem.obtain(null, null, 0, null, false);
-        Configuration overrideConfig = new Configuration();
-        overrideConfig.assetsSeq = 5;
-        ActivityRelaunchItem item = ActivityRelaunchItem.obtain(resultInfoList(),
-                referrerIntentList(), 42, mergedConfig(), true);
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        ActivityRelaunchItem item2 = ActivityRelaunchItem.obtain(resultInfoList(),
-                referrerIntentList(), 42, mergedConfig(), true);
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleMoveToDisplayItem() {
-        MoveToDisplayItem emptyItem = MoveToDisplayItem.obtain(0, Configuration.EMPTY);
-        MoveToDisplayItem item = MoveToDisplayItem.obtain(4, config());
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        MoveToDisplayItem item2 = MoveToDisplayItem.obtain(3, config());
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleNewIntentItem() {
-        NewIntentItem emptyItem = NewIntentItem.obtain(null, false);
-        NewIntentItem item = NewIntentItem.obtain(referrerIntentList(), false);
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        NewIntentItem item2 = NewIntentItem.obtain(referrerIntentList(), false);
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecyclePauseActivityItemItem() {
-        PauseActivityItem emptyItem = PauseActivityItem.obtain(false, false, 0, false, false);
-        PauseActivityItem item = PauseActivityItem.obtain(true, true, 5, true, true);
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        PauseActivityItem item2 = PauseActivityItem.obtain(true, false, 5, true, true);
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleResumeActivityItem() {
-        ResumeActivityItem emptyItem = ResumeActivityItem.obtain(false, false);
-        ResumeActivityItem item = ResumeActivityItem.obtain(3, true, false);
-        assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
-
-        item.recycle();
-        assertEquals(item, emptyItem);
-
-        ResumeActivityItem item2 = ResumeActivityItem.obtain(2, true, false);
-        assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
-    }
-
-    @Test
-    public void testRecycleStartActivityItem() {
-        StartActivityItem emptyItem = StartActivityItem.obtain(null /* activityOptions */);
-        StartActivityItem item = StartActivityItem.obtain(ActivityOptions.makeBasic());
+        DestroyActivityItem emptyItem = DestroyActivityItem.obtain(
+                null /* activityToken */, false, 0);
+        DestroyActivityItem item = DestroyActivityItem.obtain(mActivityToken, true, 117);
         assertNotSame(item, emptyItem);
         assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
-        StartActivityItem item2 = StartActivityItem.obtain(
+        DestroyActivityItem item2 = DestroyActivityItem.obtain(mActivityToken, true, 14);
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleLaunchActivityItem() {
+        final IBinder activityToken = new Binder();
+        final Intent intent = new Intent("action");
+        int ident = 57;
+        final ActivityInfo activityInfo = new ActivityInfo();
+        activityInfo.flags = 42;
+        activityInfo.setMaxAspectRatio(2.4f);
+        activityInfo.launchToken = "token";
+        activityInfo.applicationInfo = new ApplicationInfo();
+        activityInfo.packageName = "packageName";
+        activityInfo.name = "name";
+        final Configuration overrideConfig = new Configuration();
+        overrideConfig.assetsSeq = 5;
+        final String referrer = "referrer";
+        int procState = 4;
+        final Bundle bundle = new Bundle();
+        bundle.putString("key", "value");
+        final PersistableBundle persistableBundle = new PersistableBundle();
+        persistableBundle.putInt("k", 4);
+        final IBinder assistToken = new Binder();
+        final IBinder shareableActivityToken = new Binder();
+        int deviceId = 3;
+
+        final Supplier<LaunchActivityItem> itemSupplier = () -> new LaunchActivityItemBuilder()
+                .setActivityToken(activityToken)
+                .setIntent(intent)
+                .setIdent(ident)
+                .setInfo(activityInfo)
+                .setCurConfig(config())
+                .setOverrideConfig(overrideConfig)
+                .setReferrer(referrer)
+                .setProcState(procState)
+                .setState(bundle)
+                .setPersistentState(persistableBundle)
+                .setPendingResults(resultInfoList())
+                .setPendingNewIntents(referrerIntentList())
+                .setIsForward(true)
+                .setAssistToken(assistToken)
+                .setShareableActivityToken(shareableActivityToken)
+                .setTaskFragmentToken(new Binder())
+                .setDeviceId(deviceId)
+                .build();
+
+        LaunchActivityItem emptyItem = new LaunchActivityItemBuilder().build();
+        LaunchActivityItem item = itemSupplier.get();
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        LaunchActivityItem item2 = itemSupplier.get();
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleActivityRelaunchItem() {
+        ActivityRelaunchItem emptyItem = ActivityRelaunchItem.obtain(
+                null /* activityToken */, null, null, 0, null, false);
+        Configuration overrideConfig = new Configuration();
+        overrideConfig.assetsSeq = 5;
+        ActivityRelaunchItem item = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
+                referrerIntentList(), 42, mergedConfig(), true);
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        ActivityRelaunchItem item2 = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
+                referrerIntentList(), 42, mergedConfig(), true);
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleMoveToDisplayItem() {
+        MoveToDisplayItem emptyItem = MoveToDisplayItem.obtain(
+                null /* activityToken */, 0, Configuration.EMPTY);
+        MoveToDisplayItem item = MoveToDisplayItem.obtain(mActivityToken, 4, config());
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        MoveToDisplayItem item2 = MoveToDisplayItem.obtain(mActivityToken, 3, config());
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleNewIntentItem() {
+        NewIntentItem emptyItem = NewIntentItem.obtain(
+                null /* activityToken */, null /* intents */, false /* resume */);
+        NewIntentItem item = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        NewIntentItem item2 = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecyclePauseActivityItemItem() {
+        PauseActivityItem emptyItem = PauseActivityItem.obtain(
+                null /* activityToken */, false, false, 0, false, false);
+        PauseActivityItem item = PauseActivityItem.obtain(
+                mActivityToken, true, true, 5, true, true);
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        PauseActivityItem item2 = PauseActivityItem.obtain(
+                mActivityToken, true, false, 5, true, true);
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleResumeActivityItem() {
+        ResumeActivityItem emptyItem = ResumeActivityItem.obtain(
+                null /* activityToken */, false, false);
+        ResumeActivityItem item = ResumeActivityItem.obtain(mActivityToken, 3, true, false);
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        ResumeActivityItem item2 = ResumeActivityItem.obtain(mActivityToken, 2, true, false);
+        assertSame(item, item2);
+        assertNotEquals(item2, emptyItem);
+    }
+
+    @Test
+    public void testRecycleStartActivityItem() {
+        StartActivityItem emptyItem = StartActivityItem.obtain(
+                null /* activityToken */, null /* activityOptions */);
+        StartActivityItem item = StartActivityItem.obtain(mActivityToken,
+                ActivityOptions.makeBasic());
+        assertNotSame(item, emptyItem);
+        assertNotEquals(item, emptyItem);
+
+        item.recycle();
+        assertEquals(item, emptyItem);
+
+        StartActivityItem item2 = StartActivityItem.obtain(mActivityToken,
                 ActivityOptions.makeBasic().setLaunchDisplayId(10));
         assertSame(item, item2);
         assertNotEquals(item2, emptyItem);
@@ -268,17 +294,17 @@
 
     @Test
     public void testRecycleStopItem() {
-        StopActivityItem emptyItem = StopActivityItem.obtain(0);
-        StopActivityItem item = StopActivityItem.obtain(4);
+        StopActivityItem emptyItem = StopActivityItem.obtain(null /* activityToken */, 0);
+        StopActivityItem item = StopActivityItem.obtain(mActivityToken, 4);
         assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
+        assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
-        StopActivityItem item2 = StopActivityItem.obtain(3);
+        StopActivityItem item2 = StopActivityItem.obtain(mActivityToken, 3);
         assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
+        assertNotEquals(item2, emptyItem);
     }
 
     @Test
@@ -286,13 +312,13 @@
         ClientTransaction emptyItem = ClientTransaction.obtain(null, null);
         ClientTransaction item = ClientTransaction.obtain(null, new Binder());
         assertNotSame(item, emptyItem);
-        assertFalse(item.equals(emptyItem));
+        assertNotEquals(item, emptyItem);
 
         item.recycle();
         assertEquals(item, emptyItem);
 
         ClientTransaction item2 = ClientTransaction.obtain(null, new Binder());
         assertSame(item, item2);
-        assertFalse(item2.equals(emptyItem));
+        assertNotEquals(item2, emptyItem);
     }
 }
diff --git a/core/tests/coretests/src/android/app/servertransaction/TestUtils.java b/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
index 0ed6a29..5a88bad 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TestUtils.java
@@ -18,6 +18,8 @@
 
 import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityOptions;
 import android.app.ProfilerInfo;
 import android.app.ResultInfo;
@@ -90,129 +92,175 @@
     }
 
     static class LaunchActivityItemBuilder {
+        @Nullable
+        private IBinder mActivityToken;
+        @Nullable
         private Intent mIntent;
         private int mIdent;
+        @Nullable
         private ActivityInfo mInfo;
+        @Nullable
         private Configuration mCurConfig;
+        @Nullable
         private Configuration mOverrideConfig;
         private int mDeviceId;
+        @Nullable
         private String mReferrer;
+        @Nullable
         private IVoiceInteractor mVoiceInteractor;
         private int mProcState;
+        @Nullable
         private Bundle mState;
+        @Nullable
         private PersistableBundle mPersistentState;
+        @Nullable
         private List<ResultInfo> mPendingResults;
+        @Nullable
         private List<ReferrerIntent> mPendingNewIntents;
+        @Nullable
         private ActivityOptions mActivityOptions;
         private boolean mIsForward;
+        @Nullable
         private ProfilerInfo mProfilerInfo;
+        @Nullable
         private IBinder mAssistToken;
+        @Nullable
         private IBinder mShareableActivityToken;
         private boolean mLaunchedFromBubble;
+        @Nullable
         private IBinder mTaskFragmentToken;
 
-        LaunchActivityItemBuilder setIntent(Intent intent) {
+        @NonNull
+        LaunchActivityItemBuilder setActivityToken(@Nullable IBinder activityToken) {
+            mActivityToken = activityToken;
+            return this;
+        }
+
+        @NonNull
+        LaunchActivityItemBuilder setIntent(@Nullable Intent intent) {
             mIntent = intent;
             return this;
         }
 
+        @NonNull
         LaunchActivityItemBuilder setIdent(int ident) {
             mIdent = ident;
             return this;
         }
 
-        LaunchActivityItemBuilder setInfo(ActivityInfo info) {
+        @NonNull
+        LaunchActivityItemBuilder setInfo(@Nullable ActivityInfo info) {
             mInfo = info;
             return this;
         }
 
-        LaunchActivityItemBuilder setCurConfig(Configuration curConfig) {
+        @NonNull
+        LaunchActivityItemBuilder setCurConfig(@Nullable Configuration curConfig) {
             mCurConfig = curConfig;
             return this;
         }
 
-        LaunchActivityItemBuilder setOverrideConfig(Configuration overrideConfig) {
+        @NonNull
+        LaunchActivityItemBuilder setOverrideConfig(@Nullable Configuration overrideConfig) {
             mOverrideConfig = overrideConfig;
             return this;
         }
 
+        @NonNull
         LaunchActivityItemBuilder setDeviceId(int deviceId) {
             mDeviceId = deviceId;
             return this;
         }
 
-        LaunchActivityItemBuilder setReferrer(String referrer) {
+        @NonNull
+        LaunchActivityItemBuilder setReferrer(@Nullable String referrer) {
             mReferrer = referrer;
             return this;
         }
 
-        LaunchActivityItemBuilder setVoiceInteractor(IVoiceInteractor voiceInteractor) {
+        @NonNull
+        LaunchActivityItemBuilder setVoiceInteractor(@Nullable IVoiceInteractor voiceInteractor) {
             mVoiceInteractor = voiceInteractor;
             return this;
         }
 
+        @NonNull
         LaunchActivityItemBuilder setProcState(int procState) {
             mProcState = procState;
             return this;
         }
 
-        LaunchActivityItemBuilder setState(Bundle state) {
+        @NonNull
+        LaunchActivityItemBuilder setState(@Nullable Bundle state) {
             mState = state;
             return this;
         }
 
-        LaunchActivityItemBuilder setPersistentState(PersistableBundle persistentState) {
+        @NonNull
+        LaunchActivityItemBuilder setPersistentState(@Nullable PersistableBundle persistentState) {
             mPersistentState = persistentState;
             return this;
         }
 
-        LaunchActivityItemBuilder setPendingResults(List<ResultInfo> pendingResults) {
+        @NonNull
+        LaunchActivityItemBuilder setPendingResults(@Nullable List<ResultInfo> pendingResults) {
             mPendingResults = pendingResults;
             return this;
         }
 
-        LaunchActivityItemBuilder setPendingNewIntents(List<ReferrerIntent> pendingNewIntents) {
+        @NonNull
+        LaunchActivityItemBuilder setPendingNewIntents(
+                @Nullable List<ReferrerIntent> pendingNewIntents) {
             mPendingNewIntents = pendingNewIntents;
             return this;
         }
 
-        LaunchActivityItemBuilder setActivityOptions(ActivityOptions activityOptions) {
+        @NonNull
+        LaunchActivityItemBuilder setActivityOptions(@Nullable ActivityOptions activityOptions) {
             mActivityOptions = activityOptions;
             return this;
         }
 
+        @NonNull
         LaunchActivityItemBuilder setIsForward(boolean isForward) {
             mIsForward = isForward;
             return this;
         }
 
-        LaunchActivityItemBuilder setProfilerInfo(ProfilerInfo profilerInfo) {
+        @NonNull
+        LaunchActivityItemBuilder setProfilerInfo(@Nullable ProfilerInfo profilerInfo) {
             mProfilerInfo = profilerInfo;
             return this;
         }
 
-        LaunchActivityItemBuilder setAssistToken(IBinder assistToken) {
+        @NonNull
+        LaunchActivityItemBuilder setAssistToken(@Nullable IBinder assistToken) {
             mAssistToken = assistToken;
             return this;
         }
 
-        LaunchActivityItemBuilder setShareableActivityToken(IBinder shareableActivityToken) {
+        @NonNull
+        LaunchActivityItemBuilder setShareableActivityToken(
+                @Nullable IBinder shareableActivityToken) {
             mShareableActivityToken = shareableActivityToken;
             return this;
         }
 
+        @NonNull
         LaunchActivityItemBuilder setLaunchedFromBubble(boolean launchedFromBubble) {
             mLaunchedFromBubble = launchedFromBubble;
             return this;
         }
 
-        LaunchActivityItemBuilder setTaskFragmentToken(IBinder taskFragmentToken) {
+        @NonNull
+        LaunchActivityItemBuilder setTaskFragmentToken(@Nullable IBinder taskFragmentToken) {
             mTaskFragmentToken = taskFragmentToken;
             return this;
         }
 
+        @NonNull
         LaunchActivityItem build() {
-            return LaunchActivityItem.obtain(mIntent, mIdent, mInfo,
+            return LaunchActivityItem.obtain(mActivityToken, mIntent, mIdent, mInfo,
                     mCurConfig, mOverrideConfig, mDeviceId, mReferrer, mVoiceInteractor,
                     mProcState, mState, mPersistentState, mPendingResults, mPendingNewIntents,
                     mActivityOptions, mIsForward, mProfilerInfo, mAssistToken,
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
index 32f8929..a998b26 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
@@ -227,6 +227,7 @@
         when(callback2.getPostExecutionState()).thenReturn(UNDEFINED);
         ActivityLifecycleItem stateRequest = mock(ActivityLifecycleItem.class);
         IBinder token = mock(IBinder.class);
+        when(stateRequest.getActivityToken()).thenReturn(token);
         when(mTransactionHandler.getActivity(token)).thenReturn(mock(Activity.class));
 
         ClientTransaction transaction = ClientTransaction.obtain(null /* client */,
@@ -256,7 +257,7 @@
         final ClientTransaction destroyTransaction = ClientTransaction.obtain(null /* client */,
                 token /* activityToken */);
         destroyTransaction.setLifecycleStateRequest(
-                DestroyActivityItem.obtain(false /* finished */, 0 /* configChanges */));
+                DestroyActivityItem.obtain(token, false /* finished */, 0 /* configChanges */));
         destroyTransaction.preExecute(mTransactionHandler);
         // The activity should be added to to-be-destroyed container.
         assertEquals(1, mTransactionHandler.getActivitiesToBeDestroyed().size());
@@ -264,7 +265,8 @@
         // A previous queued launch transaction runs on main thread (execute).
         final ClientTransaction launchTransaction = ClientTransaction.obtain(null /* client */,
                 token /* activityToken */);
-        final LaunchActivityItem launchItem = spy(new LaunchActivityItemBuilder().build());
+        final LaunchActivityItem launchItem =
+                spy(new LaunchActivityItemBuilder().setActivityToken(token).build());
         launchTransaction.addCallback(launchItem);
         mExecutor.execute(launchTransaction);
 
@@ -450,9 +452,11 @@
         final ClientTransaction transaction = ClientTransaction.obtain(null /* client */, token);
         final ActivityTransactionItem activityItem = mock(ActivityTransactionItem.class);
         when(activityItem.getPostExecutionState()).thenReturn(UNDEFINED);
+        when(activityItem.getActivityToken()).thenReturn(token);
         transaction.addCallback(activityItem);
         final ActivityLifecycleItem stateRequest = mock(ActivityLifecycleItem.class);
         transaction.setLifecycleStateRequest(stateRequest);
+        when(stateRequest.getActivityToken()).thenReturn(token);
         when(mTransactionHandler.getActivity(token)).thenReturn(mock(Activity.class));
 
         mExecutor.execute(transaction);
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
index 48a8249..abc5d6b 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionParcelTests.java
@@ -22,7 +22,6 @@
 import static android.app.servertransaction.TestUtils.resultInfoList;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import android.app.ActivityOptions;
 import android.app.servertransaction.TestUtils.LaunchActivityItemBuilder;
@@ -32,6 +31,7 @@
 import android.content.res.Configuration;
 import android.os.Binder;
 import android.os.Bundle;
+import android.os.IBinder;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.PersistableBundle;
@@ -61,10 +61,12 @@
 public class TransactionParcelTests {
 
     private Parcel mParcel;
+    private IBinder mActivityToken;
 
     @Before
     public void setUp() throws Exception {
         mParcel = Parcel.obtain();
+        mActivityToken = new Binder();
     }
 
     @Test
@@ -77,13 +79,14 @@
         ConfigurationChangeItem result = ConfigurationChangeItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testActivityConfigChange() {
         // Write to parcel
-        ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(config());
+        ActivityConfigurationChangeItem item = ActivityConfigurationChangeItem.obtain(
+                mActivityToken, config());
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
@@ -91,51 +94,52 @@
                 ActivityConfigurationChangeItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testMoveToDisplay() {
         // Write to parcel
-        MoveToDisplayItem item = MoveToDisplayItem.obtain(4 /* targetDisplayId */, config());
+        MoveToDisplayItem item = MoveToDisplayItem.obtain(mActivityToken, 4 /* targetDisplayId */,
+                config());
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
         MoveToDisplayItem result = MoveToDisplayItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testNewIntent() {
         // Write to parcel
-        NewIntentItem item = NewIntentItem.obtain(referrerIntentList(), false);
+        NewIntentItem item = NewIntentItem.obtain(mActivityToken, referrerIntentList(), false);
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
         NewIntentItem result = NewIntentItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testActivityResult() {
         // Write to parcel
-        ActivityResultItem item = ActivityResultItem.obtain(resultInfoList());
+        ActivityResultItem item = ActivityResultItem.obtain(mActivityToken, resultInfoList());
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
         ActivityResultItem result = ActivityResultItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testDestroy() {
-        DestroyActivityItem item = DestroyActivityItem.obtain(true /* finished */,
+        DestroyActivityItem item = DestroyActivityItem.obtain(mActivityToken, true /* finished */,
                 135 /* configChanges */);
         writeAndPrepareForReading(item);
 
@@ -143,48 +147,59 @@
         DestroyActivityItem result = DestroyActivityItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testLaunch() {
         // Write to parcel
-        Intent intent = new Intent("action");
+        final IBinder activityToken = new Binder();
+        final Intent intent = new Intent("action");
         int ident = 57;
-        ActivityInfo activityInfo = new ActivityInfo();
+        final ActivityInfo activityInfo = new ActivityInfo();
         activityInfo.flags = 42;
         activityInfo.setMaxAspectRatio(2.4f);
         activityInfo.launchToken = "token";
         activityInfo.applicationInfo = new ApplicationInfo();
         activityInfo.packageName = "packageName";
         activityInfo.name = "name";
-        Configuration overrideConfig = new Configuration();
+        final Configuration overrideConfig = new Configuration();
         overrideConfig.assetsSeq = 5;
-        String referrer = "referrer";
+        final String referrer = "referrer";
         int procState = 4;
-        Bundle bundle = new Bundle();
+        final Bundle bundle = new Bundle();
         bundle.putString("key", "value");
         bundle.putParcelable("data", new ParcelableData(1));
-        PersistableBundle persistableBundle = new PersistableBundle();
+        final PersistableBundle persistableBundle = new PersistableBundle();
         persistableBundle.putInt("k", 4);
 
-        LaunchActivityItem item = new LaunchActivityItemBuilder()
-                .setIntent(intent).setIdent(ident).setInfo(activityInfo).setCurConfig(config())
-                .setOverrideConfig(overrideConfig).setReferrer(referrer)
-                .setProcState(procState).setState(bundle).setPersistentState(persistableBundle)
-                .setPendingResults(resultInfoList()).setActivityOptions(ActivityOptions.makeBasic())
-                .setPendingNewIntents(referrerIntentList()).setIsForward(true)
-                .setAssistToken(new Binder()).setShareableActivityToken(new Binder())
+        final LaunchActivityItem item = new LaunchActivityItemBuilder()
+                .setActivityToken(activityToken)
+                .setIntent(intent)
+                .setIdent(ident)
+                .setInfo(activityInfo)
+                .setCurConfig(config())
+                .setOverrideConfig(overrideConfig)
+                .setReferrer(referrer)
+                .setProcState(procState)
+                .setState(bundle)
+                .setPersistentState(persistableBundle)
+                .setPendingResults(resultInfoList())
+                .setActivityOptions(ActivityOptions.makeBasic())
+                .setPendingNewIntents(referrerIntentList())
+                .setIsForward(true)
+                .setAssistToken(new Binder())
+                .setShareableActivityToken(new Binder())
                 .setTaskFragmentToken(new Binder())
                 .build();
 
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
-        LaunchActivityItem result = LaunchActivityItem.CREATOR.createFromParcel(mParcel);
+        final LaunchActivityItem result = LaunchActivityItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
@@ -192,7 +207,7 @@
         // Write to parcel
         Configuration overrideConfig = new Configuration();
         overrideConfig.assetsSeq = 5;
-        ActivityRelaunchItem item = ActivityRelaunchItem.obtain(resultInfoList(),
+        ActivityRelaunchItem item = ActivityRelaunchItem.obtain(mActivityToken, resultInfoList(),
                 referrerIntentList(), 35, mergedConfig(), true);
         writeAndPrepareForReading(item);
 
@@ -200,13 +215,13 @@
         ActivityRelaunchItem result = ActivityRelaunchItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testPause() {
         // Write to parcel
-        PauseActivityItem item = PauseActivityItem.obtain(true /* finished */,
+        PauseActivityItem item = PauseActivityItem.obtain(mActivityToken, true /* finished */,
                 true /* userLeaving */, 135 /* configChanges */, true /* dontReport */,
                 true /* autoEnteringPip */);
         writeAndPrepareForReading(item);
@@ -215,13 +230,13 @@
         PauseActivityItem result = PauseActivityItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testResume() {
         // Write to parcel
-        ResumeActivityItem item = ResumeActivityItem.obtain(27 /* procState */,
+        ResumeActivityItem item = ResumeActivityItem.obtain(mActivityToken, 27 /* procState */,
                 true /* isForward */, false /* shouldSendCompatFakeFocus */);
         writeAndPrepareForReading(item);
 
@@ -229,26 +244,27 @@
         ResumeActivityItem result = ResumeActivityItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testStop() {
         // Write to parcel
-        StopActivityItem item = StopActivityItem.obtain(14 /* configChanges */);
+        StopActivityItem item = StopActivityItem.obtain(mActivityToken, 14 /* configChanges */);
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
         StopActivityItem result = StopActivityItem.CREATOR.createFromParcel(mParcel);
 
         assertEquals(item.hashCode(), result.hashCode());
-        assertTrue(item.equals(result));
+        assertEquals(item, result);
     }
 
     @Test
     public void testStart() {
         // Write to parcel
-        StartActivityItem item = StartActivityItem.obtain(ActivityOptions.makeBasic());
+        StartActivityItem item = StartActivityItem.obtain(mActivityToken,
+                ActivityOptions.makeBasic());
         writeAndPrepareForReading(item);
 
         // Read from parcel and assert
@@ -261,11 +277,12 @@
     @Test
     public void testClientTransaction() {
         // Write to parcel
-        NewIntentItem callback1 = NewIntentItem.obtain(new ArrayList<>(), true);
+        NewIntentItem callback1 = NewIntentItem.obtain(mActivityToken, new ArrayList<>(), true);
         ActivityConfigurationChangeItem callback2 = ActivityConfigurationChangeItem.obtain(
-                config());
+                mActivityToken, config());
 
-        StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
+        StopActivityItem lifecycleRequest = StopActivityItem.obtain(mActivityToken,
+                78 /* configChanges */);
 
         Binder activityToken = new Binder();
 
@@ -280,15 +297,15 @@
         ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
 
         assertEquals(transaction.hashCode(), result.hashCode());
-        assertTrue(transaction.equals(result));
+        assertEquals(transaction, result);
     }
 
     @Test
     public void testClientTransactionCallbacksOnly() {
         // Write to parcel
-        NewIntentItem callback1 = NewIntentItem.obtain(new ArrayList<>(), true);
+        NewIntentItem callback1 = NewIntentItem.obtain(mActivityToken, new ArrayList<>(), true);
         ActivityConfigurationChangeItem callback2 = ActivityConfigurationChangeItem.obtain(
-                config());
+                mActivityToken, config());
 
         Binder activityToken = new Binder();
 
@@ -302,13 +319,14 @@
         ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
 
         assertEquals(transaction.hashCode(), result.hashCode());
-        assertTrue(transaction.equals(result));
+        assertEquals(transaction, result);
     }
 
     @Test
     public void testClientTransactionLifecycleOnly() {
         // Write to parcel
-        StopActivityItem lifecycleRequest = StopActivityItem.obtain(78 /* configChanges */);
+        StopActivityItem lifecycleRequest = StopActivityItem.obtain(mActivityToken,
+                78 /* configChanges */);
 
         Binder activityToken = new Binder();
 
@@ -321,7 +339,7 @@
         ClientTransaction result = ClientTransaction.CREATOR.createFromParcel(mParcel);
 
         assertEquals(transaction.hashCode(), result.hashCode());
-        assertTrue(transaction.equals(result));
+        assertEquals(transaction, result);
     }
 
     /** Write to {@link #mParcel} and reset its position to prepare for reading from the start. */
diff --git a/core/tests/coretests/src/android/content/pm/SignatureTest.java b/core/tests/coretests/src/android/content/pm/SignatureTest.java
index fb0a435..4dd7b40 100644
--- a/core/tests/coretests/src/android/content/pm/SignatureTest.java
+++ b/core/tests/coretests/src/android/content/pm/SignatureTest.java
@@ -33,28 +33,44 @@
     /** Cert B with valid syntax */
     private static final Signature B = new Signature("308204a830820390a003020102020900a1573d0f45bea193300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3131303931393138343232355a170d3339303230343138343232355a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100de1b51336afc909d8bcca5920fcdc8940578ec5c253898930e985481cfdea75ba6fc54b1f7bb492a03d98db471ab4200103a8314e60ee25fef6c8b83bc1b2b45b084874cffef148fa2001bb25c672b6beba50b7ac026b546da762ea223829a22b80ef286131f059d2c9b4ca71d54e515a8a3fd6bf5f12a2493dfc2619b337b032a7cf8bbd34b833f2b93aeab3d325549a93272093943bb59dfc0197ae4861ff514e019b73f5cf10023ad1a032adb4b9bbaeb4debecb4941d6a02381f1165e1ac884c1fca9525c5854dce2ad8ec839b8ce78442c16367efc07778a337d3ca2cdf9792ac722b95d67c345f1c00976ec372f02bfcbef0262cc512a6845e71cfea0d020103a381fc3081f9301d0603551d0e0416041478a0fc4517fb70ff52210df33c8d32290a44b2bb3081c90603551d230481c13081be801478a0fc4517fb70ff52210df33c8d32290a44b2bba1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900a1573d0f45bea193300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100977302dfbf668d7c61841c9c78d2563bcda1b199e95e6275a799939981416909722713531157f3cdcfea94eea7bb79ca3ca972bd8058a36ad1919291df42d7190678d4ea47a4b9552c9dfb260e6d0d9129b44615cd641c1080580e8a990dd768c6ab500c3b964e185874e4105109d94c5bd8c405deb3cf0f7960a563bfab58169a956372167a7e2674a04c4f80015d8f7869a7a4139aecbbdca2abc294144ee01e4109f0e47a518363cf6e9bf41f7560e94bdd4a5d085234796b05c7a1389adfd489feec2a107955129d7991daa49afb3d327dc0dc4fe959789372b093a89c8dbfa41554f771c18015a6cb242a17e04d19d55d3b4664eae12caf2a11cd2b836e");
 
+    private boolean areExactMatch(Signature[] a, Signature[] b) throws Exception {
+        SigningDetails ad1 = new SigningDetails(a,
+                SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3);
+        SigningDetails bd1 = new SigningDetails(b,
+                SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3);
+        return Signature.areExactMatch(ad1, bd1);
+    }
+
     public void testExactlyEqual() throws Exception {
-        assertTrue(Signature.areExactMatch(asArray(A), asArray(A)));
-        assertTrue(Signature.areExactMatch(asArray(M), asArray(M)));
+        assertTrue(areExactMatch(asArray(A), asArray(A)));
+        assertTrue(areExactMatch(asArray(M), asArray(M)));
 
-        assertFalse(Signature.areExactMatch(asArray(A), asArray(B)));
-        assertFalse(Signature.areExactMatch(asArray(A), asArray(M)));
-        assertFalse(Signature.areExactMatch(asArray(M), asArray(A)));
+        assertFalse(areExactMatch(asArray(A), asArray(B)));
+        assertFalse(areExactMatch(asArray(A), asArray(M)));
+        assertFalse(areExactMatch(asArray(M), asArray(A)));
 
-        assertTrue(Signature.areExactMatch(asArray(A, M), asArray(M, A)));
+        assertTrue(areExactMatch(asArray(A, M), asArray(M, A)));
+    }
+
+    private boolean areEffectiveMatch(Signature[] a, Signature[] b) throws Exception {
+        SigningDetails ad1 = new SigningDetails(a,
+                SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3);
+        SigningDetails bd1 = new SigningDetails(b,
+                SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3);
+        return Signature.areEffectiveMatch(ad1, bd1);
     }
 
     public void testEffectiveMatch() throws Exception {
-        assertTrue(Signature.areEffectiveMatch(asArray(A), asArray(A)));
-        assertTrue(Signature.areEffectiveMatch(asArray(M), asArray(M)));
+        assertTrue(areEffectiveMatch(asArray(A), asArray(A)));
+        assertTrue(areEffectiveMatch(asArray(M), asArray(M)));
 
-        assertFalse(Signature.areEffectiveMatch(asArray(A), asArray(B)));
-        assertTrue(Signature.areEffectiveMatch(asArray(A), asArray(M)));
-        assertTrue(Signature.areEffectiveMatch(asArray(M), asArray(A)));
+        assertFalse(areEffectiveMatch(asArray(A), asArray(B)));
+        assertTrue(areEffectiveMatch(asArray(A), asArray(M)));
+        assertTrue(areEffectiveMatch(asArray(M), asArray(A)));
 
-        assertTrue(Signature.areEffectiveMatch(asArray(A, M), asArray(M, A)));
-        assertTrue(Signature.areEffectiveMatch(asArray(A, B), asArray(M, B)));
-        assertFalse(Signature.areEffectiveMatch(asArray(A, M), asArray(A, B)));
+        assertTrue(areEffectiveMatch(asArray(A, M), asArray(M, A)));
+        assertTrue(areEffectiveMatch(asArray(A, B), asArray(M, B)));
+        assertFalse(areEffectiveMatch(asArray(A, M), asArray(A, B)));
     }
 
     public void testHashCode_doesNotIncludeFlags() throws Exception {
diff --git a/core/tests/coretests/src/android/database/DatabaseUtilsTest.java b/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
index be156c8..13ce253 100644
--- a/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
+++ b/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
@@ -17,6 +17,15 @@
 package android.database;
 
 import static android.database.DatabaseUtils.bindSelection;
+import static android.database.DatabaseUtils.getSqlStatementType;
+import static android.database.DatabaseUtils.getSqlStatementTypeExtended;
+import static android.database.DatabaseUtils.STATEMENT_COMMENT;
+import static android.database.DatabaseUtils.STATEMENT_CREATE;
+import static android.database.DatabaseUtils.STATEMENT_DDL;
+import static android.database.DatabaseUtils.STATEMENT_OTHER;
+import static android.database.DatabaseUtils.STATEMENT_SELECT;
+import static android.database.DatabaseUtils.STATEMENT_UPDATE;
+import static android.database.DatabaseUtils.STATEMENT_WITH;
 
 import static org.junit.Assert.assertEquals;
 
@@ -63,4 +72,39 @@
                 bindSelection("foo=?10 AND bar=? AND meow=?1",
                         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12));
     }
+
+    @Test
+    public void testStatementType() {
+        final int sel = STATEMENT_SELECT;
+        assertEquals(sel, getSqlStatementType("SELECT"));
+        assertEquals(sel, getSqlStatementType("  SELECT"));
+        assertEquals(sel, getSqlStatementType(" \n SELECT"));
+
+        final int upd = STATEMENT_UPDATE;
+        assertEquals(upd, getSqlStatementType("UPDATE"));
+        assertEquals(upd, getSqlStatementType("  UPDATE"));
+        assertEquals(upd, getSqlStatementType(" \n UPDATE"));
+
+        final int ddl = STATEMENT_DDL;
+        assertEquals(ddl, getSqlStatementType("ALTER TABLE t1 ADD COLUMN j int"));
+        assertEquals(ddl, getSqlStatementType("CREATE TABLE t1 (i int)"));
+
+        // Short statements, leading comments, and WITH are decoded to "other" in the public API.
+        final int othr = STATEMENT_OTHER;
+        assertEquals(othr, getSqlStatementType("SE"));
+        assertEquals(othr, getSqlStatementType("SE LECT"));
+        assertEquals(othr, getSqlStatementType("-- cmt\n SE"));
+        assertEquals(othr, getSqlStatementType("WITH"));
+
+        // Test the extended statement types.
+
+        final int wit = STATEMENT_WITH;
+        assertEquals(wit, getSqlStatementTypeExtended("WITH"));
+
+        final int cmt = STATEMENT_COMMENT;
+        assertEquals(cmt, getSqlStatementTypeExtended("-- cmt\n SELECT"));
+
+        final int cre = STATEMENT_CREATE;
+        assertEquals(cre, getSqlStatementTypeExtended("CREATE TABLE t1 (i int)"));
+    }
 }
diff --git a/core/tests/coretests/src/android/provider/DeviceConfigTest.java b/core/tests/coretests/src/android/provider/DeviceConfigTest.java
index 349fe7b..9840e15 100644
--- a/core/tests/coretests/src/android/provider/DeviceConfigTest.java
+++ b/core/tests/coretests/src/android/provider/DeviceConfigTest.java
@@ -20,6 +20,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.junit.Assert.assertTrue;
 import static org.testng.Assert.assertThrows;
 
 import android.app.ActivityThread;
@@ -28,6 +29,7 @@
 import android.platform.test.annotations.Presubmit;
 
 import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.FlakyTest;
 import androidx.test.filters.SmallTest;
 import androidx.test.runner.AndroidJUnit4;
 
@@ -625,6 +627,7 @@
     }
 
     @Test
+    @FlakyTest(bugId = 299483542)
     public void setProperties_multipleNamespaces() throws DeviceConfig.BadConfigException {
         final String namespace2 = "namespace2";
         Properties properties1 = new Properties.Builder(NAMESPACE).setString(KEY, VALUE)
@@ -632,8 +635,8 @@
         Properties properties2 = new Properties.Builder(namespace2).setString(KEY2, VALUE)
                 .setString(KEY3, VALUE2).build();
 
-        DeviceConfig.setProperties(properties1);
-        DeviceConfig.setProperties(properties2);
+        assertTrue(DeviceConfig.setProperties(properties1));
+        assertTrue(DeviceConfig.setProperties(properties2));
 
         Properties properties = DeviceConfig.getProperties(NAMESPACE);
         assertThat(properties.getKeyset()).containsExactly(KEY, KEY2);
diff --git a/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java b/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
index a2c41e4..d2af2a7 100644
--- a/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
+++ b/core/tests/coretests/src/android/view/HapticScrollFeedbackProviderTest.java
@@ -47,7 +47,6 @@
     private static final int INPUT_DEVICE_2 = 2;
 
     private TestView mView;
-    private long mCurrentTimeMillis = 1000; // arbitrary starting time value
 
     @Mock ViewConfiguration mMockViewConfig;
 
@@ -67,24 +66,15 @@
         setHapticScrollFeedbackEnabled(false);
         // Call different types scroll feedback methods; non of them should produce feedback because
         // feedback has been disabled.
-        mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
         mProvider.onSnapToItem(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
         mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-        mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ true);
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
         mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ -9);
-        mProvider.onScrollProgress(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* deltaInPixels= */ 300);
         mProvider.onScrollProgress(
@@ -95,14 +85,7 @@
     }
 
     @Test
-    public void testSnapToItem_withMotionEvent() {
-        mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_ITEM_FOCUS);
-    }
-
-    @Test
-    public void testSnapToItem_withDeviceIdAndSource() {
+    public void testSnapToItem() {
         mProvider.onSnapToItem(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
 
@@ -110,15 +93,7 @@
     }
 
     @Test
-    public void testScrollLimit_start_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
-    }
-
-    @Test
-    public void testScrollLimit_start_withDeviceIdAndSource() {
+    public void testScrollLimit_start() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ true);
@@ -127,15 +102,7 @@
     }
 
     @Test
-    public void testScrollLimit_stop_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
-    }
-
-    @Test
-    public void testScrollLimit_stop_withDeviceIdAndSource() {
+    public void testScrollLimit_stop() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -144,21 +111,7 @@
     }
 
     @Test
-    public void testScrollProgress_zeroTickInterval_withMotionEvent() {
-        setHapticScrollTickInterval(0);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
-
-        assertNoFeedback(mView);
-    }
-
-    @Test
-    public void testScrollProgress_zeroTickInterval_withDeviceIdAndSource() {
+    public void testScrollProgress_zeroTickInterval() {
         setHapticScrollTickInterval(0);
 
         mProvider.onScrollProgress(
@@ -172,30 +125,7 @@
     }
 
     @Test
-    public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold_withMotionEvent() {
-        setHapticScrollTickInterval(100);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 20);
-
-        assertNoFeedback(mView);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
-    }
-
-    @Test
-    public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold_withDeviceIdAndSrc() {
+    public void testScrollProgress_progressEqualsOrExceedsPositiveThreshold() {
         setHapticScrollTickInterval(100);
         mProvider.onScrollProgress(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
@@ -217,37 +147,7 @@
     }
 
     @Test
-    public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold_withMotionEvent() {
-        setHapticScrollTickInterval(100);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -20);
-
-        assertNoFeedback(mView);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -80);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -70);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -40);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
-    }
-
-    @Test
-    public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold_withDeviceIdAndSrc() {
+    public void testScrollProgress_progressEqualsOrExceedsNegativeThreshold() {
         setHapticScrollTickInterval(100);
 
         mProvider.onScrollProgress(
@@ -273,42 +173,7 @@
     }
 
     @Test
-    public void testScrollProgress_positiveAndNegativeProgresses_withMotionEvent() {
-        setHapticScrollTickInterval(100);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 20);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -90);
-
-        assertNoFeedback(mView);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 10);
-
-        assertNoFeedback(mView);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ -50);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 50);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 60);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 2);
-    }
-
-    @Test
-    public void testScrollProgress_positiveAndNegativeProgresses_withDeviceIdAndSource() {
+    public void testScrollProgress_positiveAndNegativeProgresses() {
         setHapticScrollTickInterval(100);
 
         mProvider.onScrollProgress(
@@ -348,19 +213,7 @@
     }
 
     @Test
-    public void testScrollProgress_singleProgressExceedsThreshold_withMotionEvent() {
-        setHapticScrollTickInterval(100);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(),
-                MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ 1000);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-    }
-
-    @Test
-    public void testScrollProgress_singleProgressExceedsThreshold_withDeviceIdAndSource() {
+    public void testScrollProgress_singleProgressExceedsThreshold() {
         setHapticScrollTickInterval(100);
 
         mProvider.onScrollProgress(
@@ -371,17 +224,7 @@
     }
 
     @Test
-    public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
-    }
-
-    @Test
-    public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+    public void testScrollLimit_startAndEndLimit_playsOnlyOneFeedback() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -393,17 +236,7 @@
     }
 
     @Test
-    public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
-    }
-
-    @Test
-    public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+    public void testScrollLimit_doubleStartLimit_playsOnlyOneFeedback() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ true);
@@ -415,17 +248,7 @@
     }
 
     @Test
-    public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT);
-    }
-
-    @Test
-    public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback_withDeviceIdAndSource() {
+    public void testScrollLimit_doubleEndLimit_playsOnlyOneFeedback() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -439,14 +262,15 @@
     @Test
     public void testScrollLimit_notEnabledWithZeroProgress() {
         mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_1), MotionEvent.AXIS_SCROLL,
+                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
 
         mProvider.onScrollProgress(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* deltaInPixels= */ 0);
         mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ true);
+                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
+                /* isStart= */ true);
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -455,20 +279,7 @@
     }
 
     @Test
-    public void testScrollLimit_enabledWithProgress_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithProgress_withDeviceIdAndSource() {
+    public void testScrollLimit_enabledWithProgress() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -484,19 +295,7 @@
     }
 
     @Test
-    public void testScrollLimit_enabledWithSnap_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertFeedbackCount(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithSnap_withDeviceIdAndSource() {
+    public void testScrollLimit_enabledWithSnap() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -511,19 +310,7 @@
     }
 
     @Test
-    public void testScrollLimit_enabledWithDissimilarSnap_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        mProvider.onSnapToItem(createTouchMoveEvent(), MotionEvent.AXIS_X);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertFeedbackCount(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithDissimilarSnap_withDeviceIdAndSource() {
+    public void testScrollLimit_enabledWithDissimilarSnap() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -538,20 +325,7 @@
     }
 
     @Test
-    public void testScrollLimit_enabledWithDissimilarProgress_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        mProvider.onScrollProgress(
-                createTouchMoveEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 80);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithDissimilarProgress_withDeviceIdAndSource() {
+    public void testScrollLimit_enabledWithDissimilarProgress() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -566,54 +340,9 @@
         assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
     }
 
-    @Test
-    public void testScrollLimit_enabledWithDissimilarLimit_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        mProvider.onScrollLimit(createTouchMoveEvent(), MotionEvent.AXIS_SCROLL, false);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
-    }
 
     @Test
-    public void testScrollLimit_enabledWithDissimilarLimit_withDeviceIdAndSource() {
-        mProvider.onScrollLimit(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-
-        mProvider.onScrollLimit(INPUT_DEVICE_2, InputDevice.SOURCE_TOUCHSCREEN, MotionEvent.AXIS_X,
-                /* isStart= */ false);
-        mProvider.onScrollLimit(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithMotionFromDifferentDeviceId_withMotionEvent() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
-                MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_2),
-                MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
-                MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
-    }
-
-    @Test
-    public void testScrollLimit_enabledWithMotionFromDifferentDeviceId_withDeviceIdAndSource() {
+    public void testScrollLimit_enabledWithMotionFromDifferentDeviceId() {
         mProvider.onScrollLimit(
                 INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
                 /* isStart= */ false);
@@ -632,57 +361,6 @@
         assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 3);
     }
 
-    @Test
-    public void testSnapToItem_differentApis() {
-        mProvider.onSnapToItem(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL);
-        mProvider.onSnapToItem(createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_ITEM_FOCUS, 2);
-    }
-
-    @Test
-    public void testScrollLimit_differentApis() {
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_1),
-                MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-        mProvider.onScrollLimit(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* isStart= */ false);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 1);
-
-        mProvider.onScrollLimit(
-                INPUT_DEVICE_2, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* isStart= */ true);
-        mProvider.onScrollLimit(
-                createRotaryEncoderScrollEvent(INPUT_DEVICE_2),
-                MotionEvent.AXIS_SCROLL,
-                /* isStart= */ true);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_LIMIT, 2);
-    }
-
-    @Test
-    public void testScrollProgress_differentApis() {
-        setHapticScrollTickInterval(100);
-
-        // Neither types of APIs independently excceeds the "100" tick interval.
-        // But the combined deltas pass 100.
-        mProvider.onScrollProgress(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ 20);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 40);
-        mProvider.onScrollProgress(
-                INPUT_DEVICE_1, InputDevice.SOURCE_ROTARY_ENCODER, MotionEvent.AXIS_SCROLL,
-                /* deltaInPixels= */ 30);
-        mProvider.onScrollProgress(
-                createRotaryEncoderScrollEvent(), MotionEvent.AXIS_SCROLL, /* deltaInPixels= */ 30);
-
-        assertOnlyFeedback(mView, HapticFeedbackConstants.SCROLL_TICK, 1);
-    }
 
     private void assertNoFeedback(TestView view) {
         for (int feedback : new int[] {SCROLL_ITEM_FOCUS, SCROLL_LIMIT, SCROLL_TICK}) {
@@ -715,41 +393,6 @@
                 .thenReturn(enabled);
     }
 
-    private MotionEvent createTouchMoveEvent() {
-        long downTime = mCurrentTimeMillis;
-        long eventTime = mCurrentTimeMillis + 2; // arbitrary increment from the down time.
-        ++mCurrentTimeMillis;
-        return MotionEvent.obtain(
-                downTime , eventTime, MotionEvent.ACTION_MOVE, /* x= */ 3, /* y= */ 5, 0);
-    }
-
-    private MotionEvent createRotaryEncoderScrollEvent() {
-        return createRotaryEncoderScrollEvent(INPUT_DEVICE_1);
-    }
-
-    private MotionEvent createRotaryEncoderScrollEvent(int deviceId) {
-        MotionEvent.PointerProperties props = new MotionEvent.PointerProperties();
-        props.id = 0;
-
-        MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords();
-        coords.setAxisValue(MotionEvent.AXIS_SCROLL, 20);
-
-        return MotionEvent.obtain(0 /* downTime */,
-                ++mCurrentTimeMillis,
-                MotionEvent.ACTION_SCROLL,
-                /* pointerCount= */ 1,
-                new MotionEvent.PointerProperties[] {props},
-                new MotionEvent.PointerCoords[] {coords},
-                /* metaState= */ 0,
-                /* buttonState= */ 0,
-                /* xPrecision= */ 0,
-                /* yPrecision= */ 0,
-                deviceId,
-                /* edgeFlags= */ 0,
-                InputDevice.SOURCE_ROTARY_ENCODER,
-                /* flags= */ 0);
-    }
-
     private static class TestView extends View  {
         final Map<Integer, Integer> mFeedbackCount = new HashMap<>();
 
diff --git a/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java b/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
index c46118d..f39bddd 100644
--- a/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
+++ b/core/tests/coretests/src/android/view/stylus/HandwritingInitiatorTest.java
@@ -88,8 +88,8 @@
     }
 
     private HandwritingInitiator mHandwritingInitiator;
-    private View mTestView1;
-    private View mTestView2;
+    private EditText mTestView1;
+    private EditText mTestView2;
     private Context mContext;
 
     @Before
@@ -123,6 +123,9 @@
 
     @Test
     public void onTouchEvent_startHandwriting_when_stylusMoveOnce_withinHWArea() {
+        mTestView1.setText("hello");
+        when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
+
         mHandwritingInitiator.onInputConnectionCreated(mTestView1);
         final int x1 = (sHwArea1.left + sHwArea1.right) / 2;
         final int y1 = (sHwArea1.top + sHwArea1.bottom) / 2;
@@ -141,6 +144,9 @@
         // After IMM.startHandwriting is triggered, onTouchEvent should return true for ACTION_MOVE
         // events so that the events are not dispatched to the view tree.
         assertThat(onTouchEventResult2).isTrue();
+        // Since the stylus down point was inside the TextView's bounds, the handwriting initiator
+        // does not need to set the cursor position.
+        verify(mTestView1, never()).setSelection(anyInt());
     }
 
     @Test
@@ -185,6 +191,9 @@
 
     @Test
     public void onTouchEvent_startHandwriting_when_stylusMove_withinExtendedHWArea() {
+        mTestView1.setText("hello");
+        when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
+
         mHandwritingInitiator.onInputConnectionCreated(mTestView1);
         final int x1 = sHwArea1.left - HW_BOUNDS_OFFSETS_LEFT_PX / 2;
         final int y1 = sHwArea1.top - HW_BOUNDS_OFFSETS_TOP_PX / 2;
@@ -199,6 +208,9 @@
 
         // Stylus movement within extended HandwritingArea should trigger IMM.startHandwriting once.
         verify(mHandwritingInitiator, times(1)).startHandwriting(mTestView1);
+        // Since the stylus down point was outside the TextView's bounds, the handwriting initiator
+        // sets the cursor position.
+        verify(mTestView1).setSelection(4);
     }
 
     @Test
@@ -221,6 +233,8 @@
 
     @Test
     public void onTouchEvent_startHandwriting_inputConnectionBuilt_stylusMoveInExtendedHWArea() {
+        mTestView1.setText("hello");
+        when(mTestView1.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(4);
         // The stylus down point is between mTestView1 and  mTestView2, but it is within the
         // extended handwriting area of both views. It is closer to mTestView1.
         final int x1 = sHwArea1.right + HW_BOUNDS_OFFSETS_RIGHT_PX / 2;
@@ -241,6 +255,9 @@
         // the stylus down point is closest to this view.
         mHandwritingInitiator.onInputConnectionCreated(mTestView1);
         verify(mHandwritingInitiator).startHandwriting(mTestView1);
+        // Since the stylus down point was outside the TextView's bounds, the handwriting initiator
+        // sets the cursor position.
+        verify(mTestView1).setSelection(4);
     }
 
     @Test
diff --git a/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java b/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
index b4c72ca..3b2ab4c 100644
--- a/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
+++ b/core/tests/coretests/src/android/view/stylus/HandwritingTestUtil.java
@@ -16,6 +16,9 @@
 
 package android.view.stylus;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyFloat;
+import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
 
@@ -26,22 +29,23 @@
 import android.graphics.Region;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.EditText;
 
 import androidx.test.platform.app.InstrumentationRegistry;
 
 public class HandwritingTestUtil {
-    public static View createView(Rect handwritingArea) {
+    public static EditText createView(Rect handwritingArea) {
         return createView(handwritingArea, true /* autoHandwritingEnabled */,
                 true /* isStylusHandwritingAvailable */);
     }
 
-    public static View createView(Rect handwritingArea, boolean autoHandwritingEnabled,
+    public static EditText createView(Rect handwritingArea, boolean autoHandwritingEnabled,
             boolean isStylusHandwritingAvailable) {
         return createView(handwritingArea, autoHandwritingEnabled, isStylusHandwritingAvailable,
                 0, 0, 0, 0);
     }
 
-    public static View createView(Rect handwritingArea, boolean autoHandwritingEnabled,
+    public static EditText createView(Rect handwritingArea, boolean autoHandwritingEnabled,
             boolean isStylusHandwritingAvailable,
             float handwritingBoundsOffsetLeft, float handwritingBoundsOffsetTop,
             float handwritingBoundsOffsetRight, float handwritingBoundsOffsetBottom) {
@@ -68,7 +72,7 @@
             }
         };
 
-        View view = spy(new View(context));
+        EditText view = spy(new EditText(context));
         when(view.isAttachedToWindow()).thenReturn(true);
         when(view.isAggregatedVisible()).thenReturn(true);
         when(view.isStylusHandwritingAvailable()).thenReturn(isStylusHandwritingAvailable);
@@ -77,6 +81,13 @@
         when(view.getHandwritingBoundsOffsetTop()).thenReturn(handwritingBoundsOffsetTop);
         when(view.getHandwritingBoundsOffsetRight()).thenReturn(handwritingBoundsOffsetRight);
         when(view.getHandwritingBoundsOffsetBottom()).thenReturn(handwritingBoundsOffsetBottom);
+        doAnswer(invocation -> {
+            int[] outLocation = invocation.getArgument(0);
+            outLocation[0] = handwritingArea.left;
+            outLocation[1] = handwritingArea.top;
+            return null;
+        }).when(view).getLocationInWindow(any());
+        when(view.getOffsetForPosition(anyFloat(), anyFloat())).thenReturn(0);
         view.setAutoHandwritingEnabled(autoHandwritingEnabled);
         parent.addView(view);
         return view;
diff --git a/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java b/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
index a49bb6a..109c808 100644
--- a/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
+++ b/core/tests/coretests/src/android/widget/ScrollViewFunctionalTest.java
@@ -17,7 +17,9 @@
 package android.widget;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
+import android.content.Context;
 import android.platform.test.annotations.Presubmit;
 import android.util.PollingCheck;
 
@@ -32,6 +34,9 @@
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 @RunWith(AndroidJUnit4.class)
 @MediumTest
 @Presubmit
@@ -49,23 +54,43 @@
     }
 
     @Test
-    public void testScrollAfterFlingTop() {
-        mScrollView.scrollTo(0, 100);
-        mScrollView.fling(-10000);
-        PollingCheck.waitFor(() -> mScrollView.mEdgeGlowTop.getDistance() > 0);
-        PollingCheck.waitFor(() -> mScrollView.mEdgeGlowTop.getDistance() == 0f);
+    public void testScrollAfterFlingTop() throws Throwable {
+        WatchedEdgeEffect edgeEffect = new WatchedEdgeEffect(mActivity);
+        mScrollView.mEdgeGlowTop = edgeEffect;
+        mActivityRule.runOnUiThread(() -> mScrollView.scrollTo(0, 100));
+        mActivityRule.runOnUiThread(() -> mScrollView.fling(-10000));
+        assertTrue(edgeEffect.onAbsorbLatch.await(1, TimeUnit.SECONDS));
+        mActivityRule.runOnUiThread(() -> {}); // let the absorb takes effect -- least one frame
+        PollingCheck.waitFor(() -> edgeEffect.getDistance() == 0f);
         assertEquals(0, mScrollView.getScrollY());
     }
 
     @Test
-    public void testScrollAfterFlingBottom() {
+    public void testScrollAfterFlingBottom() throws Throwable {
+        WatchedEdgeEffect edgeEffect = new WatchedEdgeEffect(mActivity);
+        mScrollView.mEdgeGlowBottom = edgeEffect;
         int childHeight = mScrollView.getChildAt(0).getHeight();
         int maxScroll = childHeight - mScrollView.getHeight();
-        mScrollView.scrollTo(0, maxScroll - 100);
-        mScrollView.fling(10000);
-        PollingCheck.waitFor(() -> mScrollView.mEdgeGlowBottom.getDistance() > 0);
-        PollingCheck.waitFor(() -> mScrollView.mEdgeGlowBottom.getDistance() == 0f);
+        mActivityRule.runOnUiThread(() -> mScrollView.scrollTo(0, maxScroll - 100));
+        mActivityRule.runOnUiThread(() -> mScrollView.fling(10000));
+        assertTrue(edgeEffect.onAbsorbLatch.await(1, TimeUnit.SECONDS));
+        mActivityRule.runOnUiThread(() -> {}); // let the absorb takes effect -- least one frame
+        PollingCheck.waitFor(() -> edgeEffect.getDistance() == 0f);
         assertEquals(maxScroll, mScrollView.getScrollY());
     }
+
+    static class WatchedEdgeEffect extends EdgeEffect {
+        public CountDownLatch onAbsorbLatch = new CountDownLatch(1);
+
+        WatchedEdgeEffect(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void onAbsorb(int velocity) {
+            super.onAbsorb(velocity);
+            onAbsorbLatch.countDown();
+        }
+    }
 }
 
diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java b/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java
new file mode 100644
index 0000000..4aca854
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverAppPredictorCallbackTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.app;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.app.prediction.AppTarget;
+import android.app.prediction.AppTargetId;
+import android.os.UserHandle;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.List;
+import java.util.function.Consumer;
+
+@RunWith(AndroidJUnit4.class)
+public class ResolverAppPredictorCallbackTest {
+    private class Callback implements Consumer<List<AppTarget>> {
+        public int count = 0;
+        public List<AppTarget> latest = null;
+        @Override
+        public void accept(List<AppTarget> appTargets) {
+            count++;
+            latest = appTargets;
+        }
+    };
+
+    @Test
+    public void testAsConsumer() {
+        Callback callback = new Callback();
+        ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+        assertThat(callback.count).isEqualTo(0);
+
+        List<AppTarget> targets = createAppTargetList();
+        wrapped.asConsumer().accept(targets);
+
+        assertThat(callback.count).isEqualTo(1);
+        assertThat(callback.latest).isEqualTo(targets);
+
+        wrapped.destroy();
+
+        // Shouldn't do anything:
+        wrapped.asConsumer().accept(targets);
+
+        assertThat(callback.count).isEqualTo(1);
+    }
+
+    @Test
+    public void testAsCallback() {
+        Callback callback = new Callback();
+        ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+        assertThat(callback.count).isEqualTo(0);
+
+        List<AppTarget> targets = createAppTargetList();
+        wrapped.asCallback().onTargetsAvailable(targets);
+
+        assertThat(callback.count).isEqualTo(1);
+        assertThat(callback.latest).isEqualTo(targets);
+
+        wrapped.destroy();
+
+        // Shouldn't do anything:
+        wrapped.asConsumer().accept(targets);
+
+        assertThat(callback.count).isEqualTo(1);
+    }
+
+    @Test
+    public void testAsConsumer_null() {
+        Callback callback = new Callback();
+        ResolverAppPredictorCallback wrapped = new ResolverAppPredictorCallback(callback);
+        assertThat(callback.count).isEqualTo(0);
+
+        wrapped.asConsumer().accept(null);
+
+        assertThat(callback.count).isEqualTo(1);
+        assertThat(callback.latest).isEmpty();
+
+        wrapped.destroy();
+
+        // Shouldn't do anything:
+        wrapped.asConsumer().accept(null);
+
+        assertThat(callback.count).isEqualTo(1);
+    }
+
+    private List<AppTarget> createAppTargetList() {
+        AppTarget.Builder builder = new AppTarget.Builder(
+                new AppTargetId("ID"), "package", UserHandle.CURRENT);
+        return List.of(builder.build());
+    }
+}
diff --git a/core/tests/utiltests/src/com/android/internal/util/FileRotatorTest.java b/core/tests/utiltests/src/com/android/internal/util/FileRotatorTest.java
index 95272132..73e47e16 100644
--- a/core/tests/utiltests/src/com/android/internal/util/FileRotatorTest.java
+++ b/core/tests/utiltests/src/com/android/internal/util/FileRotatorTest.java
@@ -366,6 +366,16 @@
         assertReadAll(rotate, "bar");
     }
 
+    public void testReadSorted() throws Exception {
+        write("rotator.1024-2048", "2");
+        write("rotator.2048-4096", "3");
+        write("rotator.512-1024", "1");
+
+        final FileRotator rotate = new FileRotator(
+                mBasePath, PREFIX, SECOND_IN_MILLIS, SECOND_IN_MILLIS);
+        assertReadAll(rotate, "1", "2", "3");
+    }
+
     public void testFileSystemInaccessible() throws Exception {
         File inaccessibleDir = null;
         String dirPath = getContext().getFilesDir() + File.separator + "inaccessible";
@@ -422,16 +432,7 @@
         }
 
         public void assertRead(String... expected) {
-            assertEquals(expected.length, mActual.size());
-
-            final ArrayList<String> actualCopy = new ArrayList<String>(mActual);
-            for (String value : expected) {
-                if (!actualCopy.remove(value)) {
-                    final String expectedString = Arrays.toString(expected);
-                    final String actualString = Arrays.toString(mActual.toArray());
-                    fail("expected: " + expectedString + " but was: " + actualString);
-                }
-            }
+            assertEquals(Arrays.asList(expected), mActual);
         }
     }
 }
diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json
index 6057852..ee2eacf 100644
--- a/data/etc/services.core.protolog.json
+++ b/data/etc/services.core.protolog.json
@@ -1021,6 +1021,12 @@
       "group": "WM_DEBUG_REMOTE_ANIMATIONS",
       "at": "com\/android\/server\/wm\/NonAppWindowAnimationAdapter.java"
     },
+    "-1152771606": {
+      "message": "Content Recording: Display %d was already recording, but pause capture since the task is in PIP",
+      "level": "VERBOSE",
+      "group": "WM_DEBUG_CONTENT_RECORDING",
+      "at": "com\/android\/server\/wm\/ContentRecorder.java"
+    },
     "-1145384901": {
       "message": "shouldWaitAnimatingExit: isTransition: %s",
       "level": "DEBUG",
@@ -2335,6 +2341,12 @@
       "group": "WM_DEBUG_SYNC_ENGINE",
       "at": "com\/android\/server\/wm\/WindowState.java"
     },
+    "1877956": {
+      "message": "Content Recording: Display %d should start recording, but don't yet since the task is in PIP",
+      "level": "VERBOSE",
+      "group": "WM_DEBUG_CONTENT_RECORDING",
+      "at": "com\/android\/server\/wm\/ContentRecorder.java"
+    },
     "3593205": {
       "message": "commitVisibility: %s: visible=%b mVisibleRequested=%b",
       "level": "VERBOSE",
@@ -3067,6 +3079,12 @@
       "group": "WM_DEBUG_REMOTE_ANIMATIONS",
       "at": "com\/android\/server\/wm\/RemoteAnimationController.java"
     },
+    "643263584": {
+      "message": "Content Recording: Apply transformations of shift %d x %d, scale %f, crop %d x %d for display %d",
+      "level": "VERBOSE",
+      "group": "WM_DEBUG_CONTENT_RECORDING",
+      "at": "com\/android\/server\/wm\/ContentRecorder.java"
+    },
     "644675193": {
       "message": "Real start recents",
       "level": "DEBUG",
diff --git a/data/keyboards/qwerty.idc b/data/keyboards/qwerty.idc
deleted file mode 100644
index 375d785..0000000
--- a/data/keyboards/qwerty.idc
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Emulator keyboard configuration file #1.
-#
-
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-
-keyboard.layout = qwerty
-keyboard.characterMap = qwerty
-keyboard.orientationAware = 1
-keyboard.builtIn = 1
-
-cursor.mode = navigation
-cursor.orientationAware = 1
diff --git a/data/keyboards/qwerty.kcm b/data/keyboards/qwerty.kcm
deleted file mode 100644
index f3e15241..0000000
--- a/data/keyboards/qwerty.kcm
+++ /dev/null
@@ -1,508 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Emulator keyboard character map #1.
-#
-# This file is no longer used as the platform's default keyboard character map.
-# Refer to Generic.kcm and Virtual.kcm instead.
-#
-
-type ALPHA
-
-key A {
-    label:                              'A'
-    number:                             '2'
-    base:                               'a'
-    shift, capslock:                    'A'
-    alt:                                '#'
-    shift+alt, capslock+alt:            none
-}
-
-key B {
-    label:                              'B'
-    number:                             '2'
-    base:                               'b'
-    shift, capslock:                    'B'
-    alt:                                '<'
-    shift+alt, capslock+alt:            none
-}
-
-key C {
-    label:                              'C'
-    number:                             '2'
-    base:                               'c'
-    shift, capslock:                    'C'
-    alt:                                '9'
-    shift+alt, capslock+alt:            '\u00e7'
-}
-
-key D {
-    label:                              'D'
-    number:                             '3'
-    base:                               'd'
-    shift, capslock:                    'D'
-    alt:                                '5'
-    shift+alt, capslock+alt:            none
-}
-
-key E {
-    label:                              'E'
-    number:                             '3'
-    base:                               'e'
-    shift, capslock:                    'E'
-    alt:                                '2'
-    shift+alt, capslock+alt:            '\u0301'
-}
-
-key F {
-    label:                              'F'
-    number:                             '3'
-    base:                               'f'
-    shift, capslock:                    'F'
-    alt:                                '6'
-    shift+alt, capslock+alt:            '\u00a5'
-}
-
-key G {
-    label:                              'G'
-    number:                             '4'
-    base:                               'g'
-    shift, capslock:                    'G'
-    alt:                                '-'
-    shift+alt, capslock+alt:            '_'
-}
-
-key H {
-    label:                              'H'
-    number:                             '4'
-    base:                               'h'
-    shift, capslock:                    'H'
-    alt:                                '['
-    shift+alt, capslock+alt:            '{'
-}
-
-key I {
-    label:                              'I'
-    number:                             '4'
-    base:                               'i'
-    shift, capslock:                    'I'
-    alt:                                '$'
-    shift+alt, capslock+alt:            '\u0302'
-}
-
-key J {
-    label:                              'J'
-    number:                             '5'
-    base:                               'j'
-    shift, capslock:                    'J'
-    alt:                                ']'
-    shift+alt, capslock+alt:            '}'
-}
-
-key K {
-    label:                              'K'
-    number:                             '5'
-    base:                               'k'
-    shift, capslock:                    'K'
-    alt:                                '"'
-    shift+alt, capslock+alt:            '~'
-}
-
-key L {
-    label:                              'L'
-    number:                             '5'
-    base:                               'l'
-    shift, capslock:                    'L'
-    alt:                                '\''
-    shift+alt, capslock+alt:            '`'
-}
-
-key M {
-    label:                              'M'
-    number:                             '6'
-    base:                               'm'
-    shift, capslock:                    'M'
-    alt:                                '!'
-    shift+alt, capslock+alt:            none
-}
-
-key N {
-    label:                              'N'
-    number:                             '6'
-    base:                               'n'
-    shift, capslock:                    'N'
-    alt:                                '>'
-    shift+alt, capslock+alt:            '\u0303'
-}
-
-key O {
-    label:                              'O'
-    number:                             '6'
-    base:                               'o'
-    shift, capslock:                    'O'
-    alt:                                '('
-    shift+alt, capslock+alt:            none
-}
-
-key P {
-    label:                              'P'
-    number:                             '7'
-    base:                               'p'
-    shift, capslock:                    'P'
-    alt:                                ')'
-    shift+alt, capslock+alt:            none
-}
-
-key Q {
-    label:                              'Q'
-    number:                             '7'
-    base:                               'q'
-    shift, capslock:                    'Q'
-    alt:                                '*'
-    shift+alt, capslock+alt:            '\u0300'
-}
-
-key R {
-    label:                              'R'
-    number:                             '7'
-    base:                               'r'
-    shift, capslock:                    'R'
-    alt:                                '3'
-    shift+alt, capslock+alt:            '\u20ac'
-}
-
-key S {
-    label:                              'S'
-    number:                             '7'
-    base:                               's'
-    shift, capslock:                    'S'
-    alt:                                '4'
-    shift+alt, capslock+alt:            '\u00df'
-}
-
-key T {
-    label:                              'T'
-    number:                             '8'
-    base:                               't'
-    shift, capslock:                    'T'
-    alt:                                '+'
-    shift+alt, capslock+alt:            '\u00a3'
-}
-
-key U {
-    label:                              'U'
-    number:                             '8'
-    base:                               'u'
-    shift, capslock:                    'U'
-    alt:                                '&'
-    shift+alt, capslock+alt:            '\u0308'
-}
-
-key V {
-    label:                              'V'
-    number:                             '8'
-    base:                               'v'
-    shift, capslock:                    'V'
-    alt:                                '='
-    shift+alt, capslock+alt:            '^'
-}
-
-key W {
-    label:                              'W'
-    number:                             '9'
-    base:                               'w'
-    shift, capslock:                    'W'
-    alt:                                '1'
-    shift+alt, capslock+alt:            none
-}
-
-key X {
-    label:                              'X'
-    number:                             '9'
-    base:                               'x'
-    shift, capslock:                    'X'
-    alt:                                '8'
-    shift+alt, capslock+alt:            '\uef00'
-}
-
-key Y {
-    label:                              'Y'
-    number:                             '9'
-    base:                               'y'
-    shift, capslock:                    'Y'
-    alt:                                '%'
-    shift+alt, capslock+alt:            '\u00a1'
-}
-
-key Z {
-    label:                              'Z'
-    number:                             '9'
-    base:                               'z'
-    shift, capslock:                    'Z'
-    alt:                                '7'
-    shift+alt, capslock+alt:            none
-}
-
-key COMMA {
-    label:                              ','
-    number:                             ','
-    base:                               ','
-    shift:                              ';'
-    alt:                                ';'
-    shift+alt:                          '|'
-}
-
-key PERIOD {
-    label:                              '.'
-    number:                             '.'
-    base:                               '.'
-    shift:                              ':'
-    alt:                                ':'
-    shift+alt:                          '\u2026'
-}
-
-key AT {
-    label:                              '@'
-    number:                             '0'
-    base:                               '@'
-    shift:                              '0'
-    alt:                                '0'
-    shift+alt:                          '\u2022'
-}
-
-key SLASH {
-    label:                              '/'
-    number:                             '/'
-    base:                               '/'
-    shift:                              '?'
-    alt:                                '?'
-    shift+alt:                          '\\'
-}
-
-key SPACE {
-    label:                              ' '
-    number:                             ' '
-    base:                               ' '
-    shift:                              ' '
-    alt:                                '\uef01'
-    shift+alt:                          '\uef01'
-}
-
-key ENTER {
-    label:                              '\n'
-    number:                             '\n'
-    base:                               '\n'
-    shift:                              '\n'
-    alt:                                '\n'
-    shift+alt:                          '\n'
-}
-
-key TAB {
-    label:                              '\t'
-    number:                             '\t'
-    base:                               '\t'
-    shift:                              '\t'
-    alt:                                '\t'
-    shift+alt:                          '\t'
-}
-
-key 0 {
-    label:                              '0'
-    number:                             '0'
-    base:                               '0'
-    shift:                              ')'
-    alt:                                ')'
-    shift+alt:                          ')'
-}
-
-key 1 {
-    label:                              '1'
-    number:                             '1'
-    base:                               '1'
-    shift:                              '!'
-    alt:                                '!'
-    shift+alt:                          '!'
-}
-
-key 2 {
-    label:                              '2'
-    number:                             '2'
-    base:                               '2'
-    shift:                              '@'
-    alt:                                '@'
-    shift+alt:                          '@'
-}
-
-key 3 {
-    label:                              '3'
-    number:                             '3'
-    base:                               '3'
-    shift:                              '#'
-    alt:                                '#'
-    shift+alt:                          '#'
-}
-
-key 4 {
-    label:                              '4'
-    number:                             '4'
-    base:                               '4'
-    shift:                              '$'
-    alt:                                '$'
-    shift+alt:                          '$'
-}
-
-key 5 {
-    label:                              '5'
-    number:                             '5'
-    base:                               '5'
-    shift:                              '%'
-    alt:                                '%'
-    shift+alt:                          '%'
-}
-
-key 6 {
-    label:                              '6'
-    number:                             '6'
-    base:                               '6'
-    shift:                              '^'
-    alt:                                '^'
-    shift+alt:                          '^'
-}
-
-key 7 {
-    label:                              '7'
-    number:                             '7'
-    base:                               '7'
-    shift:                              '&'
-    alt:                                '&'
-    shift+alt:                          '&'
-}
-
-key 8 {
-    label:                              '8'
-    number:                             '8'
-    base:                               '8'
-    shift:                              '*'
-    alt:                                '*'
-    shift+alt:                          '*'
-}
-
-key 9 {
-    label:                              '9'
-    number:                             '9'
-    base:                               '9'
-    shift:                              '('
-    alt:                                '('
-    shift+alt:                          '('
-}
-
-key GRAVE {
-    label:                              '`'
-    number:                             '`'
-    base:                               '`'
-    shift:                              '~'
-    alt:                                '`'
-    shift+alt:                          '~'
-}
-
-key MINUS {
-    label:                              '-'
-    number:                             '-'
-    base:                               '-'
-    shift:                              '_'
-    alt:                                '-'
-    shift+alt:                          '_'
-}
-
-key EQUALS {
-    label:                              '='
-    number:                             '='
-    base:                               '='
-    shift:                              '+'
-    alt:                                '='
-    shift+alt:                          '+'
-}
-
-key LEFT_BRACKET {
-    label:                              '['
-    number:                             '['
-    base:                               '['
-    shift:                              '{'
-    alt:                                '['
-    shift+alt:                          '{'
-}
-
-key RIGHT_BRACKET {
-    label:                              ']'
-    number:                             ']'
-    base:                               ']'
-    shift:                              '}'
-    alt:                                ']'
-    shift+alt:                          '}'
-}
-
-key BACKSLASH {
-    label:                              '\\'
-    number:                             '\\'
-    base:                               '\\'
-    shift:                              '|'
-    alt:                                '\\'
-    shift+alt:                          '|'
-}
-
-key SEMICOLON {
-    label:                              ';'
-    number:                             ';'
-    base:                               ';'
-    shift:                              ':'
-    alt:                                ';'
-    shift+alt:                          ':'
-}
-
-key APOSTROPHE {
-    label:                              '\''
-    number:                             '\''
-    base:                               '\''
-    shift:                              '"'
-    alt:                                '\''
-    shift+alt:                          '"'
-}
-
-key STAR {
-    label:                              '*'
-    number:                             '*'
-    base:                               '*'
-    shift:                              '*'
-    alt:                                '*'
-    shift+alt:                          '*'
-}
-
-key POUND {
-    label:                              '#'
-    number:                             '#'
-    base:                               '#'
-    shift:                              '#'
-    alt:                                '#'
-    shift+alt:                          '#'
-}
-
-key PLUS {
-    label:                              '+'
-    number:                             '+'
-    base:                               '+'
-    shift:                              '+'
-    alt:                                '+'
-    shift+alt:                          '+'
-}
diff --git a/data/keyboards/qwerty.kl b/data/keyboards/qwerty.kl
deleted file mode 100644
index 2fd99ab..0000000
--- a/data/keyboards/qwerty.kl
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Emulator keyboard layout #1.
-#
-# This file is no longer used as the platform's default keyboard layout.
-# Refer to Generic.kl instead.
-#
-
-key 399   GRAVE
-key 2     1
-key 3     2
-key 4     3
-key 5     4
-key 6     5
-key 7     6
-key 8     7
-key 9     8
-key 10    9
-key 11    0
-key 158   BACK
-key 230   SOFT_RIGHT
-key 60    SOFT_LEFT
-key 107   ENDCALL
-key 62    ENDCALL
-key 229   MENU
-key 139   MENU
-key 59    MENU
-key 127   SEARCH
-key 217   SEARCH
-key 228   POUND
-key 227   STAR
-key 231   CALL
-key 61    CALL
-key 232   DPAD_CENTER
-key 108   DPAD_DOWN
-key 103   DPAD_UP
-key 102   HOME
-key 105   DPAD_LEFT
-key 106   DPAD_RIGHT
-key 115   VOLUME_UP
-key 114   VOLUME_DOWN
-key 116   POWER
-key 212   CAMERA
-
-key 16    Q
-key 17    W
-key 18    E
-key 19    R
-key 20    T
-key 21    Y
-key 22    U
-key 23    I
-key 24    O
-key 25    P
-key 26    LEFT_BRACKET
-key 27    RIGHT_BRACKET
-key 43    BACKSLASH
-
-key 30    A
-key 31    S
-key 32    D
-key 33    F
-key 34    G
-key 35    H
-key 36    J
-key 37    K
-key 38    L
-key 39    SEMICOLON
-key 40    APOSTROPHE
-key 14    DEL
-
-key 44    Z
-key 45    X
-key 46    C
-key 47    V
-key 48    B
-key 49    N
-key 50    M
-key 51    COMMA
-key 52    PERIOD
-key 53    SLASH
-key 28    ENTER
-
-key 56    ALT_LEFT
-key 100   ALT_RIGHT
-key 42    SHIFT_LEFT
-key 54    SHIFT_RIGHT
-key 15    TAB
-key 57    SPACE
-key 150   EXPLORER
-key 155   ENVELOPE
-
-key 12    MINUS
-key 13    EQUALS
-key 215   AT
-
-# On an AT keyboard: ESC, F10
-key 1     BACK
-key 68    MENU
-
-# App switch = Overview key
-key 580   APP_SWITCH
-
-# Media control keys
-key 160   MEDIA_CLOSE
-key 161   MEDIA_EJECT
-key 163   MEDIA_NEXT
-key 164   MEDIA_PLAY_PAUSE
-key 165   MEDIA_PREVIOUS
-key 166   MEDIA_STOP
-key 167   MEDIA_RECORD
-key 168   MEDIA_REWIND
-
-key 142   SLEEP
-key 581   STEM_PRIMARY
-key 582   STEM_1
-key 583   STEM_2
-key 584   STEM_3
diff --git a/data/keyboards/qwerty2.idc b/data/keyboards/qwerty2.idc
deleted file mode 100644
index 369205e..0000000
--- a/data/keyboards/qwerty2.idc
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Emulator keyboard configuration file #2.
-#
-
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-
-keyboard.layout = qwerty
-keyboard.characterMap = qwerty2
-keyboard.orientationAware = 1
-keyboard.builtIn = 1
-
-cursor.mode = navigation
-cursor.orientationAware = 1
diff --git a/data/keyboards/qwerty2.kcm b/data/keyboards/qwerty2.kcm
deleted file mode 100644
index b981d83..0000000
--- a/data/keyboards/qwerty2.kcm
+++ /dev/null
@@ -1,505 +0,0 @@
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Emulator keyboard character map #2.
-#
-
-type ALPHA
-
-key A {
-    label:                              'A'
-    number:                             '2'
-    base:                               'a'
-    shift, capslock:                    'A'
-    alt:                                '\u00e1'
-    shift+alt, capslock+alt:            '\u00c1'
-}
-
-key B {
-    label:                              'B'
-    number:                             '2'
-    base:                               'b'
-    shift, capslock:                    'B'
-    alt:                                'b'
-    shift+alt, capslock+alt:            'B'
-}
-
-key C {
-    label:                              'C'
-    number:                             '2'
-    base:                               'c'
-    shift, capslock:                    'C'
-    alt:                                '\u00a9'
-    shift+alt, capslock+alt:            '\u00a2'
-}
-
-key D {
-    label:                              'D'
-    number:                             '3'
-    base:                               'd'
-    shift, capslock:                    'D'
-    alt:                                '\u00f0'
-    shift+alt, capslock+alt:            '\u00d0'
-}
-
-key E {
-    label:                              'E'
-    number:                             '3'
-    base:                               'e'
-    shift, capslock:                    'E'
-    alt:                                '\u00e9'
-    shift+alt, capslock+alt:            '\u00c9'
-}
-
-key F {
-    label:                              'F'
-    number:                             '3'
-    base:                               'f'
-    shift, capslock:                    'F'
-    alt:                                '['
-    shift+alt, capslock+alt:            '['
-}
-
-key G {
-    label:                              'G'
-    number:                             '4'
-    base:                               'g'
-    shift, capslock:                    'G'
-    alt:                                ']'
-    shift+alt, capslock+alt:            ']'
-}
-
-key H {
-    label:                              'H'
-    number:                             '4'
-    base:                               'h'
-    shift, capslock:                    'H'
-    alt:                                '<'
-    shift+alt, capslock+alt:            '<'
-}
-
-key I {
-    label:                              'I'
-    number:                             '4'
-    base:                               'i'
-    shift, capslock:                    'I'
-    alt:                                '\u00ed'
-    shift+alt, capslock+alt:            '\u00cd'
-}
-
-key J {
-    label:                              'J'
-    number:                             '5'
-    base:                               'j'
-    shift, capslock:                    'J'
-    alt:                                '>'
-    shift+alt, capslock+alt:            '>'
-}
-
-key K {
-    label:                              'K'
-    number:                             '5'
-    base:                               'k'
-    shift, capslock:                    'K'
-    alt:                                ';'
-    shift+alt, capslock+alt:            '~'
-}
-
-key L {
-    label:                              'L'
-    number:                             '5'
-    base:                               'l'
-    shift, capslock:                    'L'
-    alt:                                '\u00f8'
-    shift+alt, capslock+alt:            '\u00d8'
-}
-
-key M {
-    label:                              'M'
-    number:                             '6'
-    base:                               'm'
-    shift, capslock:                    'M'
-    alt:                                '\u00b5'
-    shift+alt, capslock+alt:            none
-}
-
-key N {
-    label:                              'N'
-    number:                             '6'
-    base:                               'n'
-    shift, capslock:                    'N'
-    alt:                                '\u00f1'
-    shift+alt, capslock+alt:            '\u00d1'
-}
-
-key O {
-    label:                              'O'
-    number:                             '6'
-    base:                               'o'
-    shift, capslock:                    'O'
-    alt:                                '\u00f3'
-    shift+alt, capslock+alt:            '\u00d3'
-}
-
-key P {
-    label:                              'P'
-    number:                             '7'
-    base:                               'p'
-    shift, capslock:                    'P'
-    alt:                                '\u00f6'
-    shift+alt, capslock+alt:            '\u00d6'
-}
-
-key Q {
-    label:                              'Q'
-    number:                             '7'
-    base:                               'q'
-    shift, capslock:                    'Q'
-    alt:                                '\u00e4'
-    shift+alt, capslock+alt:            '\u00c4'
-}
-
-key R {
-    label:                              'R'
-    number:                             '7'
-    base:                               'r'
-    shift, capslock:                    'R'
-    alt:                                '\u00ae'
-    shift+alt, capslock+alt:            'R'
-}
-
-key S {
-    label:                              'S'
-    number:                             '7'
-    base:                               's'
-    shift, capslock:                    'S'
-    alt:                                '\u00df'
-    shift+alt, capslock+alt:            '\u00a7'
-}
-
-key T {
-    label:                              'T'
-    number:                             '8'
-    base:                               't'
-    shift, capslock:                    'T'
-    alt:                                '\u00fe'
-    shift+alt, capslock+alt:            '\u00de'
-}
-
-key U {
-    label:                              'U'
-    number:                             '8'
-    base:                               'u'
-    shift, capslock:                    'U'
-    alt:                                '\u00fa'
-    shift+alt, capslock+alt:            '\u00da'
-}
-
-key V {
-    label:                              'V'
-    number:                             '8'
-    base:                               'v'
-    shift, capslock:                    'V'
-    alt:                                'v'
-    shift+alt, capslock+alt:            'V'
-}
-
-key W {
-    label:                              'W'
-    number:                             '9'
-    base:                               'w'
-    shift, capslock:                    'W'
-    alt:                                '\u00e5'
-    shift+alt, capslock+alt:            '\u00c5'
-}
-
-key X {
-    label:                              'X'
-    number:                             '9'
-    base:                               'x'
-    shift, capslock:                    'X'
-    alt:                                'x'
-    shift+alt, capslock+alt:            '\uef00'
-}
-
-key Y {
-    label:                              'Y'
-    number:                             '9'
-    base:                               'y'
-    shift, capslock:                    'Y'
-    alt:                                '\u00fc'
-    shift+alt, capslock+alt:            '\u00dc'
-}
-
-key Z {
-    label:                              'Z'
-    number:                             '9'
-    base:                               'z'
-    shift, capslock:                    'Z'
-    alt:                                '\u00e6'
-    shift+alt, capslock+alt:            '\u00c6'
-}
-
-key COMMA {
-    label:                              ','
-    number:                             ','
-    base:                               ','
-    shift:                              '<'
-    alt:                                '\u00e7'
-    shift+alt:                          '\u00c7'
-}
-
-key PERIOD {
-    label:                              '.'
-    number:                             '.'
-    base:                               '.'
-    shift:                              '>'
-    alt:                                '.'
-    shift+alt:                          '\u2026'
-}
-
-key AT {
-    label:                              '@'
-    number:                             '@'
-    base:                               '@'
-    shift:                              '@'
-    alt:                                '@'
-    shift+alt:                          '\u2022'
-}
-
-key SLASH {
-    label:                              '/'
-    number:                             '/'
-    base:                               '/'
-    shift:                              '?'
-    alt:                                '\u00bf'
-    shift+alt:                          '?'
-}
-
-key SPACE {
-    label:                              ' '
-    number:                             ' '
-    base:                               ' '
-    shift:                              ' '
-    alt:                                '\uef01'
-    shift+alt:                          '\uef01'
-}
-
-key ENTER {
-    label:                              '\n'
-    number:                             '\n'
-    base:                               '\n'
-    shift:                              '\n'
-    alt:                                '\n'
-    shift+alt:                          '\n'
-}
-
-key TAB {
-    label:                              '\t'
-    number:                             '\t'
-    base:                               '\t'
-    shift:                              '\t'
-    alt:                                '\t'
-    shift+alt:                          '\t'
-}
-
-key 0 {
-    label:                              '0'
-    number:                             '0'
-    base:                               '0'
-    shift:                              ')'
-    alt:                                '\u02bc'
-    shift+alt:                          ')'
-}
-
-key 1 {
-    label:                              '1'
-    number:                             '1'
-    base:                               '1'
-    shift:                              '!'
-    alt:                                '\u00a1'
-    shift+alt:                          '\u00b9'
-}
-
-key 2 {
-    label:                              '2'
-    number:                             '2'
-    base:                               '2'
-    shift:                              '@'
-    alt:                                '\u00b2'
-    shift+alt:                          '@'
-}
-
-key 3 {
-    label:                              '3'
-    number:                             '3'
-    base:                               '3'
-    shift:                              '#'
-    alt:                                '\u00b3'
-    shift+alt:                          '#'
-}
-
-key 4 {
-    label:                              '4'
-    number:                             '4'
-    base:                               '4'
-    shift:                              '$'
-    alt:                                '\u00a4'
-    shift+alt:                          '\u00a3'
-}
-
-key 5 {
-    label:                              '5'
-    number:                             '5'
-    base:                               '5'
-    shift:                              '%'
-    alt:                                '\u20ac'
-    shift+alt:                          '%'
-}
-
-key 6 {
-    label:                              '6'
-    number:                             '6'
-    base:                               '6'
-    shift:                              '^'
-    alt:                                '\u00bc'
-    shift+alt:                          '\u0302'
-}
-
-key 7 {
-    label:                              '7'
-    number:                             '7'
-    base:                               '7'
-    shift:                              '&'
-    alt:                                '\u00bd'
-    shift+alt:                          '&'
-}
-
-key 8 {
-    label:                              '8'
-    number:                             '8'
-    base:                               '8'
-    shift:                              '*'
-    alt:                                '\u00be'
-    shift+alt:                          '*'
-}
-
-key 9 {
-    label:                              '9'
-    number:                             '9'
-    base:                               '9'
-    shift:                              '('
-    alt:                                '\u02bb'
-    shift+alt:                          '('
-}
-
-key GRAVE {
-    label:                              '`'
-    number:                             '`'
-    base:                               '`'
-    shift:                              '~'
-    alt:                                '\u0300'
-    shift+alt:                          '\u0303'
-}
-
-key MINUS {
-    label:                              '-'
-    number:                             '-'
-    base:                               '-'
-    shift:                              '_'
-    alt:                                '\u00a5'
-    shift+alt:                          '_'
-}
-
-key EQUALS {
-    label:                              '='
-    number:                             '='
-    base:                               '='
-    shift:                              '+'
-    alt:                                '\u00d7'
-    shift+alt:                          '\u00f7'
-}
-
-key LEFT_BRACKET {
-    label:                              '['
-    number:                             '['
-    base:                               '['
-    shift:                              '{'
-    alt:                                '\u00ab'
-    shift+alt:                          '{'
-}
-
-key RIGHT_BRACKET {
-    label:                              ']'
-    number:                             ']'
-    base:                               ']'
-    shift:                              '}'
-    alt:                                '\u00bb'
-    shift+alt:                          '}'
-}
-
-key BACKSLASH {
-    label:                              '\\'
-    number:                             '\\'
-    base:                               '\\'
-    shift:                              '|'
-    alt:                                '\u00ac'
-    shift+alt:                          '\u00a6'
-}
-
-key SEMICOLON {
-    label:                              ';'
-    number:                             ';'
-    base:                               ';'
-    shift:                              ':'
-    alt:                                '\u00b6'
-    shift+alt:                          '\u00b0'
-}
-
-key APOSTROPHE {
-    label:                              '\''
-    number:                             '\''
-    base:                               '\''
-    shift:                              '"'
-    alt:                                '\u0301'
-    shift+alt:                          '\u0308'
-}
-
-key STAR {
-    label:                              '*'
-    number:                             '*'
-    base:                               '*'
-    shift:                              '*'
-    alt:                                '*'
-    shift+alt:                          '*'
-}
-
-key POUND {
-    label:                              '#'
-    number:                             '#'
-    base:                               '#'
-    shift:                              '#'
-    alt:                                '#'
-    shift+alt:                          '#'
-}
-
-key PLUS {
-    label:                              '+'
-    number:                             '+'
-    base:                               '+'
-    shift:                              '+'
-    alt:                                '+'
-    shift+alt:                          '+'
-}
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index a4c655c8c..1ff5a3d 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -1779,7 +1779,7 @@
      * If the bitmap's internal config is in one of the public formats, return
      * that config, otherwise return null.
      */
-    @NonNull
+    @Nullable
     public final Config getConfig() {
         if (mRecycled) {
             Log.w(TAG, "Called getConfig() on a recycle()'d bitmap! This is undefined behavior!");
diff --git a/graphics/java/android/graphics/text/LineBreakConfig.java b/graphics/java/android/graphics/text/LineBreakConfig.java
index 7b204f2..13540e0 100644
--- a/graphics/java/android/graphics/text/LineBreakConfig.java
+++ b/graphics/java/android/graphics/text/LineBreakConfig.java
@@ -16,6 +16,9 @@
 
 package android.graphics.text;
 
+import static com.android.text.flags.Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN;
+
+import android.annotation.FlaggedApi;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -34,6 +37,56 @@
 public final class LineBreakConfig {
 
     /**
+     * No hyphenation preference is specified.
+     *
+     * This is a special value of hyphenation preference indicating no hyphenation preference is
+     * specified. When overriding a {@link LineBreakConfig} with another {@link LineBreakConfig}
+     * with {@link Builder#merge(LineBreakConfig)} function, the hyphenation preference of
+     * overridden config will be kept if the hyphenation preference of overriding config is
+     * {@link #HYPHENATION_UNSPECIFIED}.
+     *
+     * <pre>
+     *     val override = LineBreakConfig.Builder()
+     *          .setLineBreakWordStyle(LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
+     *          .build();  // UNSPECIFIED if no setHyphenation is called.
+     *     val config = LineBreakConfig.Builder()
+     *          .setHyphenation(LineBreakConfig.HYPHENATION_DISABLED)
+     *          .merge(override)
+     *          .build()
+     *     // Here, config has HYPHENATION_DISABLED for line break config and
+     *     // LINE_BREAK_WORD_STYLE_PHRASE for line break word style.
+     * </pre>
+     *
+     * This value is resolved to {@link #HYPHENATION_ENABLED} if this value is used for text
+     * layout/rendering.
+     */
+    @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+    public static final int HYPHENATION_UNSPECIFIED = -1;
+
+    /**
+     * The hyphenation is disabled.
+     */
+    @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+    public static final int HYPHENATION_DISABLED = 0;
+
+    /**
+     * The hyphenation is enabled.
+     *
+     * Note: Even if the hyphenation is enabled with a line break strategy
+     * {@link LineBreaker#BREAK_STRATEGY_SIMPLE}, the hyphenation will not be performed unless a
+     * single word cannot meet width constraints.
+     */
+    @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+    public static final int HYPHENATION_ENABLED = 1;
+
+    /** @hide */
+    @IntDef(prefix = { "HYPHENATION_" }, value = {
+            HYPHENATION_UNSPECIFIED, HYPHENATION_ENABLED, HYPHENATION_DISABLED,
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface Hyphenation {}
+
+    /**
      * No line break style is specified.
      *
      * This is a special value of line break style indicating no style value is specified.
@@ -147,6 +200,8 @@
         private @LineBreakWordStyle int mLineBreakWordStyle =
                 LineBreakConfig.LINE_BREAK_WORD_STYLE_UNSPECIFIED;
 
+        private @Hyphenation int mHyphenation = LineBreakConfig.HYPHENATION_UNSPECIFIED;
+
         /**
          * Builder constructor.
          */
@@ -188,6 +243,9 @@
             if (config.mLineBreakWordStyle != LINE_BREAK_WORD_STYLE_UNSPECIFIED) {
                 mLineBreakWordStyle = config.mLineBreakWordStyle;
             }
+            if (config.mHyphenation != HYPHENATION_UNSPECIFIED) {
+                mHyphenation = config.mHyphenation;
+            }
             return this;
         }
 
@@ -201,9 +259,11 @@
             if (config == null) {
                 mLineBreakStyle = LINE_BREAK_STYLE_UNSPECIFIED;
                 mLineBreakWordStyle = LINE_BREAK_WORD_STYLE_UNSPECIFIED;
+                mHyphenation = HYPHENATION_UNSPECIFIED;
             } else {
                 mLineBreakStyle = config.mLineBreakStyle;
                 mLineBreakWordStyle = config.mLineBreakWordStyle;
+                mHyphenation = config.mHyphenation;
             }
             return this;
         }
@@ -215,6 +275,11 @@
          * {@link #LINE_BREAK_STYLE_UNSPECIFIED}, the line break style is reset to
          * {@link #LINE_BREAK_STYLE_UNSPECIFIED}.
          *
+         * @see <a href="https://unicode.org/reports/tr35/#UnicodeLineBreakStyleIdentifier">
+         *     Unicode Line Break Style Identifier</a>
+         * @see <a href="https://drafts.csswg.org/css-text/#line-break-property">
+         *     CSS Line Break Property</a>
+         *
          * @param lineBreakStyle The new line-break style.
          * @return This {@code Builder}.
          */
@@ -230,6 +295,11 @@
          * with {@link #LINE_BREAK_WORD_STYLE_UNSPECIFIED}, the line break style is reset to
          * {@link #LINE_BREAK_WORD_STYLE_UNSPECIFIED}.
          *
+         * @see <a href="https://unicode.org/reports/tr35/#UnicodeLineBreakWordIdentifier">
+         *     Unicode Line Break Word Identifier</a>
+         * @see <a href="https://drafts.csswg.org/css-text/#word-break-property">
+         *     CSS Word Break Property</a>
+         *
          * @param lineBreakWordStyle The new line-break word style.
          * @return This {@code Builder}.
          */
@@ -239,6 +309,27 @@
         }
 
         /**
+         * Sets the hyphenation preference
+         *
+         * Note: Even if the {@link LineBreakConfig#HYPHENATION_ENABLED} is specified, the
+         * hyphenation will not be performed if the {@link android.widget.TextView} or underlying
+         * {@link android.text.StaticLayout}, {@link LineBreaker} are configured with
+         * {@link LineBreaker#HYPHENATION_FREQUENCY_NONE}.
+         *
+         * Note: Even if the hyphenation is enabled with a line break strategy
+         * {@link LineBreaker#BREAK_STRATEGY_SIMPLE}, the hyphenation will not be performed unless a
+         * single word cannot meet width constraints.
+         *
+         * @param hyphenation The hyphenation preference.
+         * @return This {@code Builder}.
+         */
+        @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+        public @NonNull Builder setHyphenation(@Hyphenation int hyphenation) {
+            mHyphenation = hyphenation;
+            return this;
+        }
+
+        /**
          * Builds a {@link LineBreakConfig} instance.
          *
          * This method can be called multiple times for generating multiple {@link LineBreakConfig}
@@ -247,7 +338,7 @@
          * @return The {@code LineBreakConfig} instance.
          */
         public @NonNull LineBreakConfig build() {
-            return new LineBreakConfig(mLineBreakStyle, mLineBreakWordStyle);
+            return new LineBreakConfig(mLineBreakStyle, mLineBreakWordStyle, mHyphenation);
         }
     }
 
@@ -275,6 +366,7 @@
 
     private final @LineBreakStyle int mLineBreakStyle;
     private final @LineBreakWordStyle int mLineBreakWordStyle;
+    private final @Hyphenation int mHyphenation;
 
     /**
      * Constructor with line-break parameters.
@@ -283,9 +375,11 @@
      * {@code LineBreakConfig} instance.
      */
     private LineBreakConfig(@LineBreakStyle int lineBreakStyle,
-            @LineBreakWordStyle int lineBreakWordStyle) {
+            @LineBreakWordStyle int lineBreakWordStyle,
+            @Hyphenation int hyphenation) {
         mLineBreakStyle = lineBreakStyle;
         mLineBreakWordStyle = lineBreakWordStyle;
+        mHyphenation = hyphenation;
     }
 
     /**
@@ -340,6 +434,34 @@
     }
 
     /**
+     * Returns a hyphenation preference.
+     *
+     * @return A hyphenation preference.
+     */
+    @FlaggedApi(FLAG_NO_BREAK_NO_HYPHENATION_SPAN)
+    public @Hyphenation  int getHyphenation() {
+        return mHyphenation;
+    }
+
+    /**
+     * Returns a hyphenation preference.
+     *
+     * This method never returns {@link #HYPHENATION_UNSPECIFIED}.
+     *
+     * @return A hyphenation preference.
+     * @hide
+     */
+    public static @Hyphenation int getResolvedHyphenation(
+            @Nullable LineBreakConfig config) {
+        if (config == null) {
+            return HYPHENATION_ENABLED;
+        }
+        return config.mHyphenation == HYPHENATION_UNSPECIFIED
+                ? HYPHENATION_ENABLED : config.mHyphenation;
+    }
+
+
+    /**
      * Generates a new {@link LineBreakConfig} instance merged with given {@code config}.
      *
      * If values of passing {@code config} are unspecified, the original values are kept. For
@@ -366,7 +488,9 @@
                 config.mLineBreakStyle == LINE_BREAK_STYLE_UNSPECIFIED
                         ? mLineBreakStyle : config.mLineBreakStyle,
                 config.mLineBreakWordStyle == LINE_BREAK_WORD_STYLE_UNSPECIFIED
-                        ? mLineBreakWordStyle : config.mLineBreakWordStyle);
+                        ? mLineBreakWordStyle : config.mLineBreakWordStyle,
+                config.mHyphenation == HYPHENATION_UNSPECIFIED
+                        ? mHyphenation : config.mHyphenation);
     }
 
     @Override
@@ -376,12 +500,13 @@
         if (!(o instanceof LineBreakConfig)) return false;
         LineBreakConfig that = (LineBreakConfig) o;
         return (mLineBreakStyle == that.mLineBreakStyle)
-                && (mLineBreakWordStyle == that.mLineBreakWordStyle);
+                && (mLineBreakWordStyle == that.mLineBreakWordStyle)
+                && (mHyphenation == that.mHyphenation);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(mLineBreakStyle, mLineBreakWordStyle);
+        return Objects.hash(mLineBreakStyle, mLineBreakWordStyle, mHyphenation);
     }
 
     @Override
@@ -389,6 +514,7 @@
         return "LineBreakConfig{"
                 + "mLineBreakStyle=" + mLineBreakStyle
                 + ", mLineBreakWordStyle=" + mLineBreakWordStyle
+                + ", mHyphenation= " + mHyphenation
                 + '}';
     }
 }
diff --git a/graphics/java/android/graphics/text/MeasuredText.java b/graphics/java/android/graphics/text/MeasuredText.java
index 8317985..2d33e8d 100644
--- a/graphics/java/android/graphics/text/MeasuredText.java
+++ b/graphics/java/android/graphics/text/MeasuredText.java
@@ -301,7 +301,9 @@
             Preconditions.checkArgument(end <= mText.length, "Style exceeds the text length");
             int lbStyle = LineBreakConfig.getResolvedLineBreakStyle(lineBreakConfig);
             int lbWordStyle = LineBreakConfig.getResolvedLineBreakWordStyle(lineBreakConfig);
-            nAddStyleRun(mNativePtr, paint.getNativeInstance(), lbStyle, lbWordStyle,
+            boolean hyphenation = LineBreakConfig.getResolvedHyphenation(lineBreakConfig)
+                    == LineBreakConfig.HYPHENATION_ENABLED;
+            nAddStyleRun(mNativePtr, paint.getNativeInstance(), lbStyle, lbWordStyle, hyphenation,
                     mCurrentOffset, end, isRtl);
             mCurrentOffset = end;
 
@@ -510,6 +512,7 @@
                                                 /* Non Zero */ long paintPtr,
                                                 int lineBreakStyle,
                                                 int lineBreakWordStyle,
+                                                boolean hyphenation,
                                                 @IntRange(from = 0) int start,
                                                 @IntRange(from = 0) int end,
                                                 boolean isRtl);
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
index e03e1ec..ba57b76 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
@@ -17,7 +17,6 @@
 package androidx.window.extensions.layout;
 
 import static android.view.Display.DEFAULT_DISPLAY;
-
 import static androidx.window.common.CommonFoldingFeature.COMMON_STATE_FLAT;
 import static androidx.window.common.CommonFoldingFeature.COMMON_STATE_HALF_OPENED;
 import static androidx.window.util.ExtensionHelper.isZero;
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
index 15a329bd..a836e05 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/sidecar/SampleSidecarImpl.java
@@ -17,7 +17,6 @@
 package androidx.window.sidecar;
 
 import static android.view.Display.DEFAULT_DISPLAY;
-
 import static androidx.window.util.ExtensionHelper.rotateRectToDisplayRotation;
 import static androidx.window.util.ExtensionHelper.transformToWindowSpaceRect;
 
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java b/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
index 6b193fc..a08db79 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/util/ExtensionHelper.java
@@ -19,6 +19,7 @@
 import static android.view.Surface.ROTATION_270;
 import static android.view.Surface.ROTATION_90;
 
+import android.annotation.SuppressLint;
 import android.app.WindowConfiguration;
 import android.content.Context;
 import android.graphics.Rect;
@@ -57,6 +58,10 @@
         rotateRectToDisplayRotation(displayInfo, rotation, inOutRect);
     }
 
+    // We suppress the Lint error CheckResult for Rect#intersect because in case the displayInfo and
+    // folding features are out of sync, e.g. when a foldable devices is unfolding, it is acceptable
+    // to provide the original folding feature Rect even if they don't intersect.
+    @SuppressLint("RectIntersectReturnValueIgnored")
     @VisibleForTesting
     static void rotateRectToDisplayRotation(@NonNull DisplayInfo displayInfo,
             @Surface.Rotation int rotation, @NonNull Rect inOutRect) {
@@ -70,13 +75,7 @@
         final int baseDisplayHeight =
                 isSideRotation ? displayInfo.logicalWidth : displayInfo.logicalHeight;
 
-        final boolean success = inOutRect.intersect(0, 0, baseDisplayWidth, baseDisplayHeight);
-        if (!success) {
-            throw new IllegalArgumentException("inOutRect must intersect with the display."
-                    + " inOutRect: " + inOutRect
-                    + ", baseDisplayWidth: " + baseDisplayWidth
-                    + ", baseDisplayHeight: " + baseDisplayHeight);
-        }
+        inOutRect.intersect(0, 0, baseDisplayWidth, baseDisplayHeight);
 
         RotationUtils.rotateBounds(inOutRect, baseDisplayWidth, baseDisplayHeight, rotation);
     }
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
index 0682692..9607b78 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
@@ -17,7 +17,6 @@
 package androidx.window.extensions;
 
 import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
-
 import static com.google.common.truth.Truth.assertThat;
 
 import android.app.ActivityTaskManager;
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
index ae783de..3278cdf 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/util/ExtensionHelperTest.java
@@ -17,7 +17,6 @@
 package androidx.window.util;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThrows;
 
 import android.graphics.Rect;
 import android.platform.test.annotations.Presubmit;
@@ -79,16 +78,6 @@
         }
     }
 
-    @Test
-    public void testRotateRectToDisplayRotation_invalidInputRect() {
-        final Rect invalidRect = new Rect(
-                MOCK_DISPLAY_WIDTH + 10, 0, MOCK_DISPLAY_WIDTH + 10, MOCK_DISPLAY_HEIGHT);
-        assertThrows(IllegalArgumentException.class,
-                () -> ExtensionHelper.rotateRectToDisplayRotation(
-                        MOCK_DISPLAY_INFOS[0], ROTATIONS[0], invalidRect));
-    }
-
-
     @NonNull
     private static DisplayInfo getMockDisplayInfo(@Surface.Rotation int rotation) {
         final DisplayInfo displayInfo = new DisplayInfo();
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp
index e9abc7e..c72a42c 100644
--- a/libs/WindowManager/Shell/Android.bp
+++ b/libs/WindowManager/Shell/Android.bp
@@ -158,6 +158,7 @@
         "kotlinx-coroutines-android",
         "kotlinx-coroutines-core",
         "iconloader_base",
+        "com_android_wm_shell_flags_lib",
         "WindowManager-Shell-proto",
         "dagger2",
         "jsr330",
diff --git a/libs/WindowManager/Shell/aconfig/Android.bp b/libs/WindowManager/Shell/aconfig/Android.bp
new file mode 100644
index 0000000..1a98ffc
--- /dev/null
+++ b/libs/WindowManager/Shell/aconfig/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+    name: "com_android_wm_shell_flags",
+    package: "com.android.wm.shell",
+    srcs: [
+        "multitasking.aconfig",
+    ],
+}
+
+java_aconfig_library {
+    name: "com_android_wm_shell_flags_lib",
+    aconfig_declarations: "com_android_wm_shell_flags",
+}
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/aconfig/multitasking.aconfig b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
new file mode 100644
index 0000000..d55a41f
--- /dev/null
+++ b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.wm.shell"
+
+flag {
+    name: "example_flag"
+    namespace: "multitasking"
+    description: "An Example Flag"
+    bug: "300136750"
+}
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/drawable/ic_floating_landscape.xml b/libs/WindowManager/Shell/res/drawable/ic_floating_landscape.xml
new file mode 100644
index 0000000..8ef3307
--- /dev/null
+++ b/libs/WindowManager/Shell/res/drawable/ic_floating_landscape.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2023 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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:pathData="M4,18H20V6H4V18ZM22,18C22,19.1 21.1,20 20,20H4C2.9,20 2,19.1 2,18V6C2,4.9 2.9,4 4,4H20C21.1,4 22,4.9 22,6V18ZM13,8H18V14H13V8Z"
+      android:fillColor="#455A64"
+      android:fillType="evenOdd"/>
+</vector>
diff --git a/libs/WindowManager/Shell/res/layout/bubble_bar_stack_education.xml b/libs/WindowManager/Shell/res/layout/bubble_bar_stack_education.xml
new file mode 100644
index 0000000..b489a5c
--- /dev/null
+++ b/libs/WindowManager/Shell/res/layout/bubble_bar_stack_education.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2023 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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.wm.shell.common.bubbles.BubblePopupView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_gravity="bottom|end"
+    android:layout_margin="@dimen/bubble_popup_margin_horizontal"
+    android:layout_marginBottom="120dp"
+    android:elevation="@dimen/bubble_manage_menu_elevation"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="32dp"
+        android:layout_height="32dp"
+        android:tint="?android:attr/colorAccent"
+        android:contentDescription="@null"
+        android:src="@drawable/ic_floating_landscape"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:maxWidth="@dimen/bubble_popup_content_max_width"
+        android:maxLines="1"
+        android:ellipsize="end"
+        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Headline"
+        android:textColor="?android:attr/textColorPrimary"
+        android:text="@string/bubble_bar_education_stack_title"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:maxWidth="@dimen/bubble_popup_content_max_width"
+        android:textAppearance="@android:style/TextAppearance.DeviceDefault"
+        android:textColor="?android:attr/textColorSecondary"
+        android:textAlignment="center"
+        android:text="@string/bubble_bar_education_stack_text"/>
+
+</com.android.wm.shell.common.bubbles.BubblePopupView>
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values-af/strings.xml b/libs/WindowManager/Shell/res/values-af/strings.xml
index 4f76342..6622973 100644
--- a/libs/WindowManager/Shell/res/values-af/strings.xml
+++ b/libs/WindowManager/Shell/res/values-af/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Het dit"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Geen onlangse borrels nie"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Onlangse borrels en borrels wat toegemaak is, sal hier verskyn"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Beheer borrels enige tyd"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tik hier om te bestuur watter apps en gesprekke in borrels kan verskyn"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Borrel"</string>
diff --git a/libs/WindowManager/Shell/res/values-am/strings.xml b/libs/WindowManager/Shell/res/values-am/strings.xml
index 1e5f5f1..a3f7741 100644
--- a/libs/WindowManager/Shell/res/values-am/strings.xml
+++ b/libs/WindowManager/Shell/res/values-am/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ገባኝ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ምንም የቅርብ ጊዜ አረፋዎች የሉም"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"የቅርብ ጊዜ አረፋዎች እና የተሰናበቱ አረፋዎች እዚህ ብቅ ይላሉ"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"በማንኛውም ጊዜ ዓረፋዎችን ይቆጣጠሩ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"የትኛዎቹ መተግበሪያዎች እና ውይይቶች ዓረፋ መፍጠር እንደሚችሉ ለማስተዳደር እዚህ ጋር መታ ያድርጉ"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"አረፋ"</string>
diff --git a/libs/WindowManager/Shell/res/values-ar/strings.xml b/libs/WindowManager/Shell/res/values-ar/strings.xml
index 9c52608..ee4302e 100644
--- a/libs/WindowManager/Shell/res/values-ar/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ar/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"حسنًا"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ليس هناك فقاعات محادثات"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ستظهر هنا أحدث فقاعات المحادثات وفقاعات المحادثات التي تم إغلاقها."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"التحكّم في إظهار الفقاعات في أي وقت"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"انقر هنا للتحكّم في إظهار فقاعات التطبيقات والمحادثات التي تريدها."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"فقاعة"</string>
diff --git a/libs/WindowManager/Shell/res/values-as/strings.xml b/libs/WindowManager/Shell/res/values-as/strings.xml
index e880b87..a568d58 100644
--- a/libs/WindowManager/Shell/res/values-as/strings.xml
+++ b/libs/WindowManager/Shell/res/values-as/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"বুজি পালোঁ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"কোনো শেহতীয়া bubbles নাই"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"শেহতীয়া bubbles আৰু অগ্ৰাহ্য কৰা bubbles ইয়াত প্ৰদর্শিত হ\'ব"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"যিকোনো সময়তে বাবল নিয়ন্ত্ৰণ কৰক"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"কোনবোৰ এপ্‌ আৰু বাৰ্তালাপ বাবল হ’ব পাৰে সেয়া পৰিচালনা কৰিবলৈ ইয়াত টিপক"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
diff --git a/libs/WindowManager/Shell/res/values-az/strings.xml b/libs/WindowManager/Shell/res/values-az/strings.xml
index 6e746fb..1a681e1 100644
--- a/libs/WindowManager/Shell/res/values-az/strings.xml
+++ b/libs/WindowManager/Shell/res/values-az/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Anladım"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Yumrucuqlar yoxdur"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Son yumrucuqlar və buraxılmış yumrucuqlar burada görünəcək"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Yumrucuqları idarə edin"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Bura toxunaraq yumrucuq göstərəcək tətbiq və söhbətləri idarə edin"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Qabarcıq"</string>
diff --git a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
index 3be3269..cba293b 100644
--- a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Važi"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Ovde se prikazuju nedavni i odbačeni oblačići"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolišite oblačiće u svakom trenutku"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovde i odredite koje aplikacije i konverzacije mogu da imaju oblačić"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-be/strings.xml b/libs/WindowManager/Shell/res/values-be/strings.xml
index 85ae1c1..80e5a67 100644
--- a/libs/WindowManager/Shell/res/values-be/strings.xml
+++ b/libs/WindowManager/Shell/res/values-be/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Зразумела"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Няма нядаўніх усплывальных апавяшчэнняў"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Нядаўнія і адхіленыя ўсплывальныя апавяшчэнні будуць паказаны тут"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Кіруйце наладамі ўсплывальных апавяшчэнняў у любы час"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Каб кіраваць усплывальнымі апавяшчэннямі для праграм і размоў, націсніце тут"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Усплывальнае апавяшчэнне"</string>
diff --git a/libs/WindowManager/Shell/res/values-bg/strings.xml b/libs/WindowManager/Shell/res/values-bg/strings.xml
index 640fb2e..ca59239 100644
--- a/libs/WindowManager/Shell/res/values-bg/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bg/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Разбрах"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Няма скорошни балончета"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Скорошните и отхвърлените балончета ще се показват тук"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Управление на балончетата по всяко време"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Докоснете тук, за да управл. кои прил. и разговори могат да показват балончета"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
diff --git a/libs/WindowManager/Shell/res/values-bn/strings.xml b/libs/WindowManager/Shell/res/values-bn/strings.xml
index e7c8886..c1eb469 100644
--- a/libs/WindowManager/Shell/res/values-bn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bn/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"বুঝেছি"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"কোনও সাম্প্রতিক বাবল নেই"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"সাম্প্রতিক ও বাতিল করা বাবল এখানে দেখা যাবে"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"যেকোনও সময় বাবল নিয়ন্ত্রণ করুন"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"কোন অ্যাপ ও কথোপকথনের জন্য বাবলের সুবিধা চান তা ম্যানেজ করতে এখানে ট্যাপ করুন"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
diff --git a/libs/WindowManager/Shell/res/values-bs/strings.xml b/libs/WindowManager/Shell/res/values-bs/strings.xml
index 1335f8d..c97fc3d 100644
--- a/libs/WindowManager/Shell/res/values-bs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bs/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Razumijem"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nedavni i odbačeni oblačići će se pojaviti ovdje"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljajte oblačićima u svakom trenutku"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovdje da upravljate time koje aplikacije i razgovori mogu imati oblačić"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-ca/strings.xml b/libs/WindowManager/Shell/res/values-ca/strings.xml
index 22fc21c..a9195e4 100644
--- a/libs/WindowManager/Shell/res/values-ca/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ca/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entesos"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hi ha bombolles recents"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Les bombolles recents i les ignorades es mostraran aquí"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla les bombolles en qualsevol moment"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca aquí per gestionar quines aplicacions i converses poden fer servir bombolles"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bombolla"</string>
diff --git a/libs/WindowManager/Shell/res/values-cs/strings.xml b/libs/WindowManager/Shell/res/values-cs/strings.xml
index a85fa7c..89bd222 100644
--- a/libs/WindowManager/Shell/res/values-cs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-cs/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Žádné nedávné bubliny"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Zde se budou zobrazovat nedávné bubliny a zavřené bubliny"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Nastavení bublin můžete kdykoli upravit"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Klepnutím sem lze spravovat, které aplikace a konverzace mohou vytvářet bubliny"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
diff --git a/libs/WindowManager/Shell/res/values-da/strings.xml b/libs/WindowManager/Shell/res/values-da/strings.xml
index cd621f8..fd880bc 100644
--- a/libs/WindowManager/Shell/res/values-da/strings.xml
+++ b/libs/WindowManager/Shell/res/values-da/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ingen seneste bobler"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nye bobler og afviste bobler vises her"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Administrer bobler når som helst"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tryk her for at administrere, hvilke apps og samtaler der kan vises i bobler"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
diff --git a/libs/WindowManager/Shell/res/values-de/strings.xml b/libs/WindowManager/Shell/res/values-de/strings.xml
index 366fdef..b28394d 100644
--- a/libs/WindowManager/Shell/res/values-de/strings.xml
+++ b/libs/WindowManager/Shell/res/values-de/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Keine kürzlich geschlossenen Bubbles"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Hier werden aktuelle und geschlossene Bubbles angezeigt"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bubble-Einstellungen festlegen"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tippe hier, um zu verwalten, welche Apps und Unterhaltungen als Bubble angezeigt werden können"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-el/strings.xml b/libs/WindowManager/Shell/res/values-el/strings.xml
index a449b9f..684c3bb 100644
--- a/libs/WindowManager/Shell/res/values-el/strings.xml
+++ b/libs/WindowManager/Shell/res/values-el/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Το κατάλαβα"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Δεν υπάρχουν πρόσφατα συννεφάκια"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Τα πρόσφατα συννεφάκια και τα συννεφάκια που παραβλέψατε θα εμφανίζονται εδώ."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ελέγξτε τα συννεφάκια ανά πάσα στιγμή."</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Πατήστε εδώ για τη διαχείριση εφαρμογών και συζητήσεων που προβάλλουν συννεφάκια"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Συννεφάκι"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
index c7dd388..1890c3d 100644
--- a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
index 99da073..72189df 100644
--- a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
@@ -76,6 +76,8 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Got it"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+    <string name="bubble_bar_education_stack_title" msgid="2486903590422497245">"Chat using bubbles"</string>
+    <string name="bubble_bar_education_stack_text" msgid="2446934610817409820">"New conversations appear as icons in a bottom corner of your screen. Tap to expand them or drag to dismiss them."</string>
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles anytime"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
index c7dd388..1890c3d 100644
--- a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
index c7dd388..1890c3d 100644
--- a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No recent bubbles"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recent bubbles and dismissed bubbles will appear here"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Control bubbles at any time"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tap here to manage which apps and conversations can bubble"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
index cc19579..294bdb5 100644
--- a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
@@ -76,6 +76,8 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‏‏‏‎‏‏‏‏‎‏‏‏‎‎‎‏‎‎‎‎‏‏‎‏‏‏‎‎‏‎‏‎‏‎‎‎‏‏‏‏‎‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‎Got it‎‏‎‎‏‎"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‏‎‏‎‎‎‏‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‎‎‎‎‏‎‎‏‏‏‏‎‎‎‎No recent bubbles‎‏‎‎‏‎"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‏‏‏‎‏‏‎‏‎‏‎‏‏‏‎‏‎‎‏‏‏‎‏‏‎‏‎‎‏‏‏‎‎‏‏‏‏‏‎‏‏‏‏‎‎‎‏‎Recent bubbles and dismissed bubbles will appear here‎‏‎‎‏‎"</string>
+    <string name="bubble_bar_education_stack_title" msgid="2486903590422497245">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‎‎‎‏‏‎‏‎‎‎‎‎‏‏‎‏‎‎‎‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‏‏‎‏‏‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎Chat using bubbles‎‏‎‎‏‎"</string>
+    <string name="bubble_bar_education_stack_text" msgid="2446934610817409820">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎‎‎‎‎‏‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‏‏‎‎‎‏‏‎‎‎‏‏‏‎‎‎New conversations appear as icons in a bottom corner of your screen. Tap to expand them or drag to dismiss them.‎‏‎‎‏‎"</string>
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‏‎‎‏‏‏‎‎‎‎‏‎‏‎‏‎‎‏‏‏‎‎‏‎‏‎‏‏‏‎‏‏‎‎‎‎‏‏‏‏‎‎‏‎‏‏‏‎‏‎‏‎‎‎Control bubbles anytime‎‏‎‎‏‎"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‏‏‎‎‏‏‏‏‎‏‏‏‎‏‏‎‏‏‎‏‏‏‏‏‎‏‏‎‎‎‎‎‎‏‏‎‎‎‏‏‏‎‎‎‎‏‏‎‏‏‏‎‏‏‎‎Tap here to manage which apps and conversations can bubble‎‏‎‎‏‎"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‏‎‏‎‏‎‏‏‎‏‎‏‏‎‏‎‎‏‏‏‏‎‏‏‎‏‏‎‏‏‎‎‏‏‎‏‏‎‏‏‎‎‎‏‏‏‏‏‎‎‎‎‏‎‎Bubble‎‏‎‎‏‎"</string>
diff --git a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
index 80d10f2..54f2de0 100644
--- a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hay burbujas recientes"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Las burbujas recientes y las que se descartaron aparecerán aquí"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla las burbujas"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Presiona para administrar las apps y conversaciones que pueden mostrar burbujas"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Cuadro"</string>
diff --git a/libs/WindowManager/Shell/res/values-es/strings.xml b/libs/WindowManager/Shell/res/values-es/strings.xml
index 13dfce0..19a8a14 100644
--- a/libs/WindowManager/Shell/res/values-es/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"No hay burbujas recientes"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Las burbujas recientes y las cerradas aparecerán aquí"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controla las burbujas cuando quieras"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca aquí para gestionar qué aplicaciones y conversaciones pueden usar burbujas"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Burbuja"</string>
diff --git a/libs/WindowManager/Shell/res/values-et/strings.xml b/libs/WindowManager/Shell/res/values-et/strings.xml
index 269968f..c0558e4 100644
--- a/libs/WindowManager/Shell/res/values-et/strings.xml
+++ b/libs/WindowManager/Shell/res/values-et/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Selge"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hiljutisi mulle pole"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Siin kuvatakse hiljutised ja suletud mullid."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Juhtige mulle igal ajal"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Puudutage siin, et hallata, milliseid rakendusi ja vestlusi saab mullina kuvada"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Mull"</string>
diff --git a/libs/WindowManager/Shell/res/values-eu/strings.xml b/libs/WindowManager/Shell/res/values-eu/strings.xml
index b4a8d57a..7610f0d 100644
--- a/libs/WindowManager/Shell/res/values-eu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-eu/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ados"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ez dago azkenaldiko burbuilarik"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Azken burbuilak eta baztertutakoak agertuko dira hemen"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolatu burbuilak edonoiz"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Sakatu hau burbuiletan zein aplikazio eta elkarrizketa ager daitezkeen kudeatzeko"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Burbuila"</string>
diff --git a/libs/WindowManager/Shell/res/values-fa/strings.xml b/libs/WindowManager/Shell/res/values-fa/strings.xml
index 434bfe1..f1fb51fa 100644
--- a/libs/WindowManager/Shell/res/values-fa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fa/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"متوجه‌ام"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"هیچ حبابک جدیدی وجود ندارد"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"حبابک‌های اخیر و حبابک‌های ردشده اینجا ظاهر خواهند شد"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"کنترل حبابک‌ها در هرزمانی"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"برای مدیریت اینکه کدام برنامه‌ها و مکالمه‌ها حباب داشته باشند، ضربه بزنید"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"حباب"</string>
diff --git a/libs/WindowManager/Shell/res/values-fi/strings.xml b/libs/WindowManager/Shell/res/values-fi/strings.xml
index a04ef12..5269255 100644
--- a/libs/WindowManager/Shell/res/values-fi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fi/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Okei"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ei viimeaikaisia kuplia"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Viimeaikaiset ja äskettäin ohitetut kuplat näkyvät täällä"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Muuta kuplien asetuksia milloin tahansa"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Valitse napauttamalla tästä, mitkä sovellukset ja keskustelut voivat kuplia"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Kupla"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
index fbc6191..cd85f40 100644
--- a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Aucune bulle récente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Les bulles récentes et les bulles ignorées s\'afficheront ici"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Gérez les bulles en tout temps"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Touchez ici pour gérer les applis et les conversations à inclure aux bulles"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr/strings.xml b/libs/WindowManager/Shell/res/values-fr/strings.xml
index e1fe291..23ba785 100644
--- a/libs/WindowManager/Shell/res/values-fr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Aucune bulle récente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Les bulles récentes et ignorées s\'afficheront ici"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Contrôlez les bulles à tout moment"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Appuyez ici pour gérer les applis et conversations s\'affichant dans des bulles"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
diff --git a/libs/WindowManager/Shell/res/values-gl/strings.xml b/libs/WindowManager/Shell/res/values-gl/strings.xml
index 485a895..8693e42 100644
--- a/libs/WindowManager/Shell/res/values-gl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gl/strings.xml
@@ -76,17 +76,18 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Entendido"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Non hai burbullas recentes"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"As burbullas recentes e ignoradas aparecerán aquí."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controlar as burbullas"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toca para xestionar as aplicacións e conversas que poden aparecer en burbullas"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Burbulla"</string>
     <string name="manage_bubbles_text" msgid="7730624269650594419">"Xestionar"</string>
     <string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Ignorouse a burbulla."</string>
-    <!-- no translation found for restart_button_description (4564728020654658478) -->
-    <skip />
-    <!-- no translation found for user_aspect_ratio_settings_button_hint (734835849600713016) -->
-    <skip />
-    <!-- no translation found for user_aspect_ratio_settings_button_description (4315566801697411684) -->
-    <skip />
+    <string name="restart_button_description" msgid="4564728020654658478">"Toca o botón para reiniciar esta aplicación e gozar dunha mellor visualización"</string>
+    <string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Cambia a proporción desta aplicación en Configuración"</string>
+    <string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Cambiar a proporción"</string>
     <string name="camera_compat_treatment_suggested_button_description" msgid="8103916969024076767">"Tes problemas coa cámara?\nToca para reaxustala"</string>
     <string name="camera_compat_treatment_applied_button_description" msgid="2944157113330703897">"Non se solucionaron os problemas?\nToca para reverter o seu tratamento"</string>
     <string name="camera_compat_dismiss_button_description" msgid="2795364433503817511">"Non hai problemas coa cámara? Tocar para ignorar."</string>
diff --git a/libs/WindowManager/Shell/res/values-gu/strings.xml b/libs/WindowManager/Shell/res/values-gu/strings.xml
index 365faef..a7cdf73 100644
--- a/libs/WindowManager/Shell/res/values-gu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gu/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"સમજાઈ ગયું"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"તાજેતરના કોઈ બબલ નથી"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"એકદમ નવા બબલ અને છોડી દીધેલા બબલ અહીં દેખાશે"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"બબલને કોઈપણ સમયે નિયંત્રિત કરે છે"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"કઈ ઍપ અને વાતચીતોને બબલ કરવા માગો છો તે મેનેજ કરવા માટે, અહીં ટૅપ કરો"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"બબલ"</string>
diff --git a/libs/WindowManager/Shell/res/values-hi/strings.xml b/libs/WindowManager/Shell/res/values-hi/strings.xml
index 76579d1..13e0258 100644
--- a/libs/WindowManager/Shell/res/values-hi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hi/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ठीक है"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"हाल ही के कोई बबल्स नहीं हैं"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"हाल ही के बबल्स और हटाए गए बबल्स यहां दिखेंगे"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"जब चाहें, बबल्स की सुविधा को कंट्रोल करें"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"किसी ऐप्लिकेशन और बातचीत के लिए बबल की सुविधा को मैनेज करने के लिए यहां टैप करें"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-hr/strings.xml b/libs/WindowManager/Shell/res/values-hr/strings.xml
index de071f1..957e56c 100644
--- a/libs/WindowManager/Shell/res/values-hr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hr/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Shvaćam"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nema nedavnih oblačića"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Ovdje će se prikazivati nedavni i odbačeni oblačići"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljanje oblačićima u svakom trenutku"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dodirnite ovdje da biste odredili koje aplikacije i razgovori mogu imati oblačić"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
diff --git a/libs/WindowManager/Shell/res/values-hu/strings.xml b/libs/WindowManager/Shell/res/values-hu/strings.xml
index b5631bb..e9808ac 100644
--- a/libs/WindowManager/Shell/res/values-hu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hu/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Értem"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nincsenek buborékok a közelmúltból"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"A legutóbbi és az elvetett buborékok itt jelennek majd meg"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Buborékok vezérlése bármikor"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ide koppintva jeleníthetők meg az alkalmazások és a beszélgetések buborékként"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Buborék"</string>
diff --git a/libs/WindowManager/Shell/res/values-hy/strings.xml b/libs/WindowManager/Shell/res/values-hy/strings.xml
index 2d5d371..8a9d89b 100644
--- a/libs/WindowManager/Shell/res/values-hy/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hy/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Եղավ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ամպիկներ չկան"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Այստեղ կցուցադրվեն վերջերս օգտագործված և փակված ամպիկները, որոնք կկարողանաք հեշտությամբ վերաբացել"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ամպիկների կարգավորումներ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Հպեք այստեղ՝ ընտրելու, թե որ հավելվածների և զրույցների համար ամպիկներ ցուցադրել"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Պղպջակ"</string>
diff --git a/libs/WindowManager/Shell/res/values-in/strings.xml b/libs/WindowManager/Shell/res/values-in/strings.xml
index 90b1f15..6b84a1d 100644
--- a/libs/WindowManager/Shell/res/values-in/strings.xml
+++ b/libs/WindowManager/Shell/res/values-in/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Oke"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Tidak ada balon baru-baru ini"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Balon yang baru dipakai dan balon yang telah ditutup akan muncul di sini"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrol balon kapan saja"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ketuk di sini untuk mengelola balon aplikasi dan percakapan"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
diff --git a/libs/WindowManager/Shell/res/values-is/strings.xml b/libs/WindowManager/Shell/res/values-is/strings.xml
index 813f9e6..913e196 100644
--- a/libs/WindowManager/Shell/res/values-is/strings.xml
+++ b/libs/WindowManager/Shell/res/values-is/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ég skil"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Engar nýlegar blöðrur"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nýlegar blöðrur og blöðrur sem þú hefur lokað birtast hér"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Hægt er að stjórna blöðrum hvenær sem er"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ýttu hér til að stjórna því hvaða forrit og samtöl mega nota blöðrur."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Blaðra"</string>
diff --git a/libs/WindowManager/Shell/res/values-it/strings.xml b/libs/WindowManager/Shell/res/values-it/strings.xml
index 8918821..575210b 100644
--- a/libs/WindowManager/Shell/res/values-it/strings.xml
+++ b/libs/WindowManager/Shell/res/values-it/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nessuna bolla recente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Le bolle recenti e ignorate appariranno qui"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Gestisci le bolle in qualsiasi momento"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tocca qui per gestire le app e le conversazioni per cui mostrare le bolle"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Fumetto"</string>
@@ -90,7 +94,7 @@
     <string name="letterbox_education_dialog_title" msgid="7739895354143295358">"Visualizza più contenuti e fai di più"</string>
     <string name="letterbox_education_split_screen_text" msgid="449233070804658627">"Trascina in un\'altra app per usare lo schermo diviso"</string>
     <string name="letterbox_education_reposition_text" msgid="4589957299813220661">"Tocca due volte fuori da un\'app per riposizionarla"</string>
-    <string name="letterbox_education_got_it" msgid="4057634570866051177">"OK"</string>
+    <string name="letterbox_education_got_it" msgid="4057634570866051177">"Ok"</string>
     <string name="letterbox_education_expand_button_description" msgid="1729796567101129834">"Espandi per avere ulteriori informazioni."</string>
     <string name="letterbox_restart_dialog_title" msgid="8543049527871033505">"Vuoi riavviare per migliorare la visualizzazione?"</string>
     <string name="letterbox_restart_dialog_description" msgid="6096946078246557848">"Puoi riavviare l\'app affinché venga visualizzata meglio sullo schermo, ma potresti perdere i tuoi progressi o eventuali modifiche non salvate"</string>
diff --git a/libs/WindowManager/Shell/res/values-iw/strings.xml b/libs/WindowManager/Shell/res/values-iw/strings.xml
index 4d7a093..fbc384f 100644
--- a/libs/WindowManager/Shell/res/values-iw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-iw/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"הבנתי"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"אין בועות מהזמן האחרון"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"בועות אחרונות ובועות שנסגרו יופיעו כאן"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"שליטה בבועות בכל זמן"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"אפשר להקיש כאן כדי לקבוע אילו אפליקציות ושיחות יוכלו להופיע בבועות"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"בועה"</string>
diff --git a/libs/WindowManager/Shell/res/values-ja/strings.xml b/libs/WindowManager/Shell/res/values-ja/strings.xml
index 9668359..dce3a18 100644
--- a/libs/WindowManager/Shell/res/values-ja/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ja/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近閉じたバブルはありません"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近表示されたバブルや閉じたバブルが、ここに表示されます"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"バブルはいつでも管理可能"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"バブルで表示するアプリや会話を管理するには、ここをタップします"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"バブル"</string>
diff --git a/libs/WindowManager/Shell/res/values-ka/strings.xml b/libs/WindowManager/Shell/res/values-ka/strings.xml
index a949a18..b396c8c 100644
--- a/libs/WindowManager/Shell/res/values-ka/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ka/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"გასაგებია"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ბოლო დროს გამოყენებული ბუშტები არ არის"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"აქ გამოჩნდება ბოლოდროინდელი ბუშტები და უარყოფილი ბუშტები"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ამოხტომის გაკონტროლება ნებისმიერ დროს"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"აქ შეეხეთ იმის სამართავად, თუ რომელი აპები და საუბრები ამოხტეს"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ბუშტი"</string>
diff --git a/libs/WindowManager/Shell/res/values-kk/strings.xml b/libs/WindowManager/Shell/res/values-kk/strings.xml
index cbc9249..63ef3d2 100644
--- a/libs/WindowManager/Shell/res/values-kk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kk/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Түсінікті"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Жақындағы қалқыма хабарлар жоқ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Соңғы және жабылған қалқыма хабарлар осы жерде көрсетіледі."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Қалқыма хабарларды кез келген уақытта басқарыңыз"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Қалқыма хабарда көрсетілетін қолданбалар мен әңгімелерді реттеу үшін осы жерді түртіңіз."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Көпіршік"</string>
diff --git a/libs/WindowManager/Shell/res/values-km/strings.xml b/libs/WindowManager/Shell/res/values-km/strings.xml
index 3e36113..2ce8ba3 100644
--- a/libs/WindowManager/Shell/res/values-km/strings.xml
+++ b/libs/WindowManager/Shell/res/values-km/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"យល់ហើយ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"មិនមាន​ពពុះ​ថ្មីៗ​ទេ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ពពុះថ្មីៗ​ និង​ពពុះដែលបានបិទ​​នឹង​បង្ហាញ​នៅទីនេះ"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"គ្រប់គ្រង​ផ្ទាំងអណ្ដែតនៅពេលណាក៏បាន"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ចុចត្រង់នេះ ដើម្បីគ្រប់គ្រងកម្មវិធី និងការសន្ទនាដែលអាចបង្ហាញជាផ្ទាំងអណ្ដែត"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ពពុះ"</string>
diff --git a/libs/WindowManager/Shell/res/values-kn/strings.xml b/libs/WindowManager/Shell/res/values-kn/strings.xml
index 5e0dad8..4b8aaa9 100644
--- a/libs/WindowManager/Shell/res/values-kn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kn/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ಅರ್ಥವಾಯಿತು"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ಯಾವುದೇ ಇತ್ತೀಚಿನ ಬಬಲ್ಸ್ ಇಲ್ಲ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ಇತ್ತೀಚಿನ ಬಬಲ್ಸ್ ಮತ್ತು ವಜಾಗೊಳಿಸಿದ ಬಬಲ್ಸ್ ಇಲ್ಲಿ ಗೋಚರಿಸುತ್ತವೆ"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ಯಾವುದೇ ಸಮಯದಲ್ಲಿ ಬಬಲ್ಸ್ ಅನ್ನು ನಿಯಂತ್ರಿಸಿ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ಯಾವ ಆ್ಯಪ್‌ಗಳು ಮತ್ತು ಸಂಭಾಷಣೆಗಳನ್ನು ಬಬಲ್ ಮಾಡಬಹುದು ಎಂಬುದನ್ನು ನಿರ್ವಹಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ಬಬಲ್"</string>
diff --git a/libs/WindowManager/Shell/res/values-ko/strings.xml b/libs/WindowManager/Shell/res/values-ko/strings.xml
index f1b3455..ffa77b0 100644
--- a/libs/WindowManager/Shell/res/values-ko/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ko/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"확인"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"최근 대화창 없음"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"최근 대화창과 내가 닫은 대화창이 여기에 표시됩니다."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"언제든지 대화창을 제어하세요"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"대화창을 만들 수 있는 앱과 대화를 관리하려면 여기를 탭하세요."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"버블"</string>
diff --git a/libs/WindowManager/Shell/res/values-ky/strings.xml b/libs/WindowManager/Shell/res/values-ky/strings.xml
index 200359a..b74875c 100644
--- a/libs/WindowManager/Shell/res/values-ky/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ky/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Түшүндүм"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Азырынча эч нерсе жок"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Акыркы жана жабылган калкып чыкма билдирмелер ушул жерде көрүнөт"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Калкып чыкма билдирмелерди каалаган убакта көзөмөлдөңүз"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Калкып чыкма билдирме түрүндө көрүнө турган колдонмолор менен маектерди тандоо үчүн бул жерди таптаңыз"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Көбүк"</string>
diff --git a/libs/WindowManager/Shell/res/values-lo/strings.xml b/libs/WindowManager/Shell/res/values-lo/strings.xml
index 43835d5..3e1ab6d 100644
--- a/libs/WindowManager/Shell/res/values-lo/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lo/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ເຂົ້າໃຈແລ້ວ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ບໍ່ມີຟອງຫຼ້າສຸດ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ຟອງຫຼ້າສຸດ ແລະ ຟອງທີ່ປິດໄປຈະປາກົດຢູ່ບ່ອນນີ້"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ຄວບຄຸມຟອງໄດ້ທຸກເວລາ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ແຕະບ່ອນນີ້ເພື່ອຈັດການແອັບ ແລະ ການສົນທະນາທີ່ສາມາດສະແດງເປັນແບບຟອງໄດ້"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ຟອງ"</string>
diff --git a/libs/WindowManager/Shell/res/values-lt/strings.xml b/libs/WindowManager/Shell/res/values-lt/strings.xml
index 0c6cc58..f4751aa 100644
--- a/libs/WindowManager/Shell/res/values-lt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lt/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Supratau"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nėra naujausių burbulų"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Naujausi ir atsisakyti burbulai bus rodomi čia"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bet kada valdyti burbulus"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Palietę čia valdykite, kurie pokalbiai ir programos gali būti rodomi burbuluose"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Debesėlis"</string>
diff --git a/libs/WindowManager/Shell/res/values-lv/strings.xml b/libs/WindowManager/Shell/res/values-lv/strings.xml
index f86e937e..5fab577 100644
--- a/libs/WindowManager/Shell/res/values-lv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lv/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Labi"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nav nesen aizvērtu burbuļu"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Šeit būs redzami nesen rādītie burbuļi un aizvērtie burbuļi"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Pārvaldīt burbuļus jebkurā laikā"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Pieskarieties šeit, lai pārvaldītu, kuras lietotnes un sarunas var rādīt burbulī"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Burbulis"</string>
diff --git a/libs/WindowManager/Shell/res/values-mk/strings.xml b/libs/WindowManager/Shell/res/values-mk/strings.xml
index 49e850f..906fc09 100644
--- a/libs/WindowManager/Shell/res/values-mk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mk/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Сфатив"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нема неодамнешни балончиња"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Неодамнешните и отфрлените балончиња ќе се појавуваат тука"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контролирајте ги балончињата во секое време"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Допрете тука за да одредите на кои апл. и разговори може да се појават балончиња"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
diff --git a/libs/WindowManager/Shell/res/values-ml/strings.xml b/libs/WindowManager/Shell/res/values-ml/strings.xml
index fbb5514..65e6d2c 100644
--- a/libs/WindowManager/Shell/res/values-ml/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ml/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"മനസ്സിലായി"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"അടുത്തിടെയുള്ള ബബിളുകൾ ഒന്നുമില്ല"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"അടുത്തിടെയുള്ള ബബിളുകൾ, ഡിസ്മിസ് ചെയ്ത ബബിളുകൾ എന്നിവ ഇവിടെ ദൃശ്യമാവും"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ബബിളുകൾ ഏതുസമയത്തും നിയന്ത്രിക്കുക"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ഏതൊക്കെ ആപ്പുകളും സംഭാഷണങ്ങളും ബബിൾ ചെയ്യാനാകുമെന്നത് മാനേജ് ചെയ്യാൻ ഇവിടെ ടാപ്പ് ചെയ്യുക"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ബബിൾ"</string>
diff --git a/libs/WindowManager/Shell/res/values-mn/strings.xml b/libs/WindowManager/Shell/res/values-mn/strings.xml
index 8274f44..44c5946 100644
--- a/libs/WindowManager/Shell/res/values-mn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mn/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ойлголоо"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Саяхны бөмбөлөг алга байна"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Саяхны бөмбөлгүүд болон үл хэрэгссэн бөмбөлгүүд энд харагдана"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Бөмбөлгүүдийг хүссэн үедээ хянах"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ямар апп болон харилцан ярианууд бөмбөлгөөр харагдахыг энд удирдана уу"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Бөмбөлөг"</string>
diff --git a/libs/WindowManager/Shell/res/values-mr/strings.xml b/libs/WindowManager/Shell/res/values-mr/strings.xml
index c1f3e12..bd898c4 100644
--- a/libs/WindowManager/Shell/res/values-mr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mr/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"समजले"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"अलीकडील कोणतेही बबल नाहीत"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"अलीकडील बबल आणि डिसमिस केलेले बबल येथे दिसतील"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"बबल कधीही नियंत्रित करा"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"कोणती ॲप्स आणि संभाषणे बबल होऊ शकतात हे व्यवस्थापित करण्यासाठी येथे टॅप करा"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-ms/strings.xml b/libs/WindowManager/Shell/res/values-ms/strings.xml
index 82d84e8..86a7025 100644
--- a/libs/WindowManager/Shell/res/values-ms/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ms/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Tiada gelembung terbaharu"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Gelembung baharu dan gelembung yang diketepikan akan dipaparkan di sini"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kawal gelembung pada bila-bila masa"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Ketik di sini untuk mengurus apl dan perbualan yang boleh menggunakan gelembung"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Gelembung"</string>
diff --git a/libs/WindowManager/Shell/res/values-my/strings.xml b/libs/WindowManager/Shell/res/values-my/strings.xml
index 2e88ab3..4c494eb 100644
--- a/libs/WindowManager/Shell/res/values-my/strings.xml
+++ b/libs/WindowManager/Shell/res/values-my/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"နားလည်ပြီ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"လတ်တလော ပူဖောင်းကွက်များ မရှိပါ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"လတ်တလော ပူဖောင်းကွက်များနှင့် ပိတ်လိုက်သော ပူဖောင်းကွက်များကို ဤနေရာတွင် မြင်ရပါမည်"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ပူဖောင်းကွက်ကို အချိန်မရွေး ထိန်းချုပ်ရန်"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ပူဖောင်းကွက်သုံးနိုင်သည့် အက်ပ်နှင့် စကားဝိုင်းများ စီမံရန် ဤနေရာကို တို့ပါ"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ပူဖောင်းဖောက်သံ"</string>
diff --git a/libs/WindowManager/Shell/res/values-nb/strings.xml b/libs/WindowManager/Shell/res/values-nb/strings.xml
index f7ea9ce..e9f90c0 100644
--- a/libs/WindowManager/Shell/res/values-nb/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nb/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Greit"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ingen nylige bobler"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Nylige bobler og avviste bobler vises her"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontroller bobler når som helst"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Trykk her for å administrere hvilke apper og samtaler som kan vises i bobler"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
diff --git a/libs/WindowManager/Shell/res/values-ne/strings.xml b/libs/WindowManager/Shell/res/values-ne/strings.xml
index 3f6dc04..dcfff7c 100644
--- a/libs/WindowManager/Shell/res/values-ne/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ne/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"बुझेँ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"हालैका बबलहरू छैनन्"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"हालैका बबल र खारेज गरिएका बबलहरू यहाँ देखिने छन्"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"जुनसुकै बेला बबलसम्बन्धी सुविधा नियन्त्रण गर्नुहोस्"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"कुन एप र कुराकानी बबल प्रयोग गर्न सक्छन् भन्ने कुराको व्यवस्थापन गर्न यहाँ ट्याप गर्नुहोस्"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
diff --git a/libs/WindowManager/Shell/res/values-nl/strings.xml b/libs/WindowManager/Shell/res/values-nl/strings.xml
index 978ed3c..2f560f0 100644
--- a/libs/WindowManager/Shell/res/values-nl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nl/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Geen recente bubbels"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Recente bubbels en gesloten bubbels zie je hier"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bubbels beheren wanneer je wilt"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tik hier om te beheren welke apps en gesprekken als bubbel kunnen worden getoond"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubbel"</string>
diff --git a/libs/WindowManager/Shell/res/values-or/strings.xml b/libs/WindowManager/Shell/res/values-or/strings.xml
index b66448b..ad25de5 100644
--- a/libs/WindowManager/Shell/res/values-or/strings.xml
+++ b/libs/WindowManager/Shell/res/values-or/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ବୁଝିଗଲି"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ବର୍ତ୍ତମାନ କୌଣସି ବବଲ୍ ନାହିଁ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ବର୍ତ୍ତମାନର ଏବଂ ଖାରଜ କରାଯାଇଥିବା ବବଲଗୁଡ଼ିକ ଏଠାରେ ଦେଖାଯିବ"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ଯେ କୌଣସି ସମୟରେ ବବଲଗୁଡ଼ିକ ନିୟନ୍ତ୍ରଣ କରନ୍ତୁ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"କେଉଁ ଆପ୍ସ ଓ ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ ବବଲ ହୋଇପାରିବ ତାହା ପରିଚାଳନା କରିବାକୁ ଏଠାରେ ଟାପ କରନ୍ତୁ"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ବବଲ୍"</string>
diff --git a/libs/WindowManager/Shell/res/values-pa/strings.xml b/libs/WindowManager/Shell/res/values-pa/strings.xml
index 72cb920..4bd9d6b 100644
--- a/libs/WindowManager/Shell/res/values-pa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pa/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ਸਮਝ ਲਿਆ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ਕੋਈ ਹਾਲੀਆ ਬਬਲ ਨਹੀਂ"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ਹਾਲੀਆ ਬਬਲ ਅਤੇ ਖਾਰਜ ਕੀਤੇ ਬਬਲ ਇੱਥੇ ਦਿਸਣਗੇ"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ਬਬਲ ਦੀ ਸੁਵਿਧਾ ਨੂੰ ਕਿਸੇ ਵੀ ਵੇਲੇ ਕੰਟਰੋਲ ਕਰੋ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ਇਹ ਪ੍ਰਬੰਧਨ ਕਰਨ ਲਈ ਇੱਥੇ ਟੈਪ ਕਰੋ ਕਿ ਕਿਹੜੀਆਂ ਐਪਾਂ ਅਤੇ ਗੱਲਾਂਬਾਤਾਂ ਬਬਲ ਹੋ ਸਕਦੀਆਂ ਹਨ"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"ਬੁਲਬੁਲਾ"</string>
diff --git a/libs/WindowManager/Shell/res/values-pl/strings.xml b/libs/WindowManager/Shell/res/values-pl/strings.xml
index 24c1f14..d98be75 100644
--- a/libs/WindowManager/Shell/res/values-pl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pl/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Brak ostatnich dymków"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tutaj będą pojawiać się ostatnie i odrzucone dymki"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Zarządzaj dymkami, kiedy chcesz"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Kliknij tutaj, aby zarządzać wyświetlaniem aplikacji i rozmów jako dymków"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Dymek"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
index 6900202..81d325a 100644
--- a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ok"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e dispensados aparecerão aqui"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões a qualquer momento"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerenciar quais apps e conversas podem aparecer em balões"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
index 853c682..7fa592a 100644
--- a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e ignorados vão aparecer aqui."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões em qualquer altura"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerir que apps e conversas podem aparecer em balões"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Balão"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt/strings.xml b/libs/WindowManager/Shell/res/values-pt/strings.xml
index 6900202..81d325a 100644
--- a/libs/WindowManager/Shell/res/values-pt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ok"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nenhum balão recente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Os balões recentes e dispensados aparecerão aqui"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controle os balões a qualquer momento"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Toque aqui para gerenciar quais apps e conversas podem aparecer em balões"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
diff --git a/libs/WindowManager/Shell/res/values-ro/strings.xml b/libs/WindowManager/Shell/res/values-ro/strings.xml
index 7356f7c..0341667 100644
--- a/libs/WindowManager/Shell/res/values-ro/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ro/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nu există baloane recente"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Baloanele recente și baloanele respinse vor apărea aici"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Controlează baloanele oricând"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Atinge aici pentru a gestiona aplicațiile și conversațiile care pot apărea în balon"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
diff --git a/libs/WindowManager/Shell/res/values-ru/strings.xml b/libs/WindowManager/Shell/res/values-ru/strings.xml
index 61e3ec9..da234c7 100644
--- a/libs/WindowManager/Shell/res/values-ru/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ru/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"ОК"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нет недавних всплывающих чатов"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Здесь будут появляться недавние и скрытые всплывающие чаты."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Всплывающие чаты"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Укажите приложения и разговоры, для которых разрешены всплывающие чаты."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Всплывающая подсказка"</string>
diff --git a/libs/WindowManager/Shell/res/values-si/strings.xml b/libs/WindowManager/Shell/res/values-si/strings.xml
index ac78385..236da5d6 100644
--- a/libs/WindowManager/Shell/res/values-si/strings.xml
+++ b/libs/WindowManager/Shell/res/values-si/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"තේරුණා"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"මෑත බුබුලු නැත"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"මෑත බුබුලු සහ ඉවත ලූ බුබුලු මෙහි දිස් වනු ඇත"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ඕනෑම වේලාවක බුබුලු පාලනය කරන්න"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"බුබුලු කළ හැකි යෙදුම් සහ සංවාද කළමනාකරණය කිරීමට මෙහි තට්ටු කරන්න"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"බුබුළු"</string>
diff --git a/libs/WindowManager/Shell/res/values-sk/strings.xml b/libs/WindowManager/Shell/res/values-sk/strings.xml
index d659d51..eaabdab 100644
--- a/libs/WindowManager/Shell/res/values-sk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sk/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Dobre"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Žiadne nedávne bubliny"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tu sa budú zobrazovať nedávne a zavreté bubliny"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Ovládajte bubliny kedykoľvek"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Klepnite tu a spravujte, ktoré aplikácie a konverzácie môžu ovládať bubliny"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
diff --git a/libs/WindowManager/Shell/res/values-sl/strings.xml b/libs/WindowManager/Shell/res/values-sl/strings.xml
index 91871fb..514a0b35 100644
--- a/libs/WindowManager/Shell/res/values-sl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sl/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"V redu"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Ni nedavnih oblačkov"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Tukaj bodo prikazani tako nedavni kot tudi opuščeni oblački"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Upravljanje oblačkov"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Dotaknite se tukaj za upravljanje aplikacij in pogovorov, ki so lahko prikazani v oblačkih"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Mehurček"</string>
diff --git a/libs/WindowManager/Shell/res/values-sq/strings.xml b/libs/WindowManager/Shell/res/values-sq/strings.xml
index 45eb04a..790119b 100644
--- a/libs/WindowManager/Shell/res/values-sq/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sq/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"E kuptova"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Nuk ka flluska të fundit"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Flluskat e fundit dhe flluskat e hequra do të shfaqen këtu"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrollo flluskat në çdo moment"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Trokit këtu për të menaxhuar aplikacionet e bisedat që do të shfaqen në flluska"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Flluskë"</string>
diff --git a/libs/WindowManager/Shell/res/values-sr/strings.xml b/libs/WindowManager/Shell/res/values-sr/strings.xml
index 368df54..9fd9f3e 100644
--- a/libs/WindowManager/Shell/res/values-sr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sr/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Важи"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Нема недавних облачића"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Овде се приказују недавни и одбачени облачићи"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контролишите облачиће у сваком тренутку"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Додирните овде и одредите које апликације и конверзације могу да имају облачић"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Облачић"</string>
diff --git a/libs/WindowManager/Shell/res/values-sv/strings.xml b/libs/WindowManager/Shell/res/values-sv/strings.xml
index 35d5b7a..f7f218e 100644
--- a/libs/WindowManager/Shell/res/values-sv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sv/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Inga nya bubblor"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"De senaste bubblorna och ignorerade bubblor visas här"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Styr bubblor när som helst"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Tryck här för att hantera vilka appar och konversationer som får visas i bubblor"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubbla"</string>
diff --git a/libs/WindowManager/Shell/res/values-sw/strings.xml b/libs/WindowManager/Shell/res/values-sw/strings.xml
index 52e0a69..83173f3 100644
--- a/libs/WindowManager/Shell/res/values-sw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sw/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Nimeelewa"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hakuna viputo vya hivi majuzi"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Viputo vya hivi karibuni na vile vilivyoondolewa vitaonekana hapa"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Dhibiti viputo wakati wowote"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Gusa hapa ili udhibiti programu na mazungumzo yanayoweza kutumia viputo"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Kiputo"</string>
diff --git a/libs/WindowManager/Shell/res/values-ta/strings.xml b/libs/WindowManager/Shell/res/values-ta/strings.xml
index 98a7d67..ea2ee9c 100644
--- a/libs/WindowManager/Shell/res/values-ta/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ta/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"சரி"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"சமீபத்திய குமிழ்கள் இல்லை"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"சமீபத்திய குமிழ்களும் நிராகரிக்கப்பட்ட குமிழ்களும் இங்கே தோன்றும்"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"எப்போது வேண்டுமானாலும் குமிழ்களைக் கட்டுப்படுத்துங்கள்"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"எந்தெந்த ஆப்ஸும் உரையாடல்களும் குமிழியாகலாம் என்பதை நிர்வகிக்க இங்கே தட்டுங்கள்"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"பபிள்"</string>
diff --git a/libs/WindowManager/Shell/res/values-te/strings.xml b/libs/WindowManager/Shell/res/values-te/strings.xml
index 70f810e..e2772bf 100644
--- a/libs/WindowManager/Shell/res/values-te/strings.xml
+++ b/libs/WindowManager/Shell/res/values-te/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"అర్థమైంది"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ఇటీవలి బబుల్స్ ఏవీ లేవు"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"ఇటీవలి బబుల్స్ మరియు తీసివేసిన బబుల్స్ ఇక్కడ కనిపిస్తాయి"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"బబుల్స్‌ను ఎప్పుడైనా కంట్రోల్ చేయండి"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"ఏ యాప్‌లు, సంభాషణలను బబుల్ చేయాలో మేనేజ్ చేయడానికి ఇక్కడ ట్యాప్ చేయండి"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"బబుల్"</string>
diff --git a/libs/WindowManager/Shell/res/values-television/config.xml b/libs/WindowManager/Shell/res/values-television/config.xml
index cc0333e..5f9dbdb 100644
--- a/libs/WindowManager/Shell/res/values-television/config.xml
+++ b/libs/WindowManager/Shell/res/values-television/config.xml
@@ -44,12 +44,11 @@
     if a custom action is present before closing it. -->
     <integer name="config_pipForceCloseDelay">5000</integer>
 
-    <!-- Animation duration when exit starting window: fade out icon -->
-    <integer name="starting_window_app_reveal_icon_fade_out_duration">0</integer>
-
     <!-- Animation duration when exit starting window: reveal app -->
-    <integer name="starting_window_app_reveal_anim_delay">0</integer>
+    <integer name="starting_window_app_reveal_anim_duration">500</integer>
 
-    <!-- Animation duration when exit starting window: reveal app -->
-    <integer name="starting_window_app_reveal_anim_duration">0</integer>
+    <!-- Default animation type when hiding the starting window. The possible values are:
+          - 0 for radial vanish + slide up
+          - 1 for fade out -->
+    <integer name="starting_window_exit_animation_type">1</integer>
 </resources>
diff --git a/libs/WindowManager/Shell/res/values-th/strings.xml b/libs/WindowManager/Shell/res/values-th/strings.xml
index 0efaab2..14bdc4b 100644
--- a/libs/WindowManager/Shell/res/values-th/strings.xml
+++ b/libs/WindowManager/Shell/res/values-th/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"รับทราบ"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"ไม่มีบับเบิลเมื่อเร็วๆ นี้"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"บับเบิลที่แสดงและที่ปิดไปเมื่อเร็วๆ นี้จะปรากฏที่นี่"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"ควบคุมบับเบิลได้ทุกเมื่อ"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"แตะที่นี่เพื่อจัดการแอปและการสนทนาที่แสดงเป็นบับเบิลได้"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"บับเบิล"</string>
diff --git a/libs/WindowManager/Shell/res/values-tl/strings.xml b/libs/WindowManager/Shell/res/values-tl/strings.xml
index e5d5350..208e8cb 100644
--- a/libs/WindowManager/Shell/res/values-tl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tl/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Walang kamakailang bubble"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Lalabas dito ang mga kamakailang bubble at na-dismiss na bubble"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kontrolin ang mga bubble anumang oras"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Mag-tap dito para pamahalaan ang mga app at conversion na puwedeng mag-bubble"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
diff --git a/libs/WindowManager/Shell/res/values-tr/strings.xml b/libs/WindowManager/Shell/res/values-tr/strings.xml
index 8e7f162..b6c0d68 100644
--- a/libs/WindowManager/Shell/res/values-tr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tr/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Anladım"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Son kapatılan baloncuk yok"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Son baloncuklar ve kapattığınız baloncuklar burada görünür"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Baloncukları istediğiniz zaman kontrol edin"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Buraya dokunarak baloncuk olarak gösterilecek uygulama ve görüşmeleri yönetin"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Baloncuk"</string>
diff --git a/libs/WindowManager/Shell/res/values-uk/strings.xml b/libs/WindowManager/Shell/res/values-uk/strings.xml
index 5c7c6c4..6a11988 100644
--- a/libs/WindowManager/Shell/res/values-uk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uk/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Зрозуміло"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Немає нещодавніх спливаючих чатів"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Тут з\'являтимуться нещодавні й закриті спливаючі чати"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Контроль спливаючих чатів"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Натисніть тут, щоб вибрати, для яких додатків і розмов дозволити спливаючі чати"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Спливаюче сповіщення"</string>
diff --git a/libs/WindowManager/Shell/res/values-ur/strings.xml b/libs/WindowManager/Shell/res/values-ur/strings.xml
index 451d048..292cabae 100644
--- a/libs/WindowManager/Shell/res/values-ur/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ur/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"سمجھ آ گئی"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"کوئی حالیہ بلبلہ نہیں"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"حالیہ بلبلے اور برخاست شدہ بلبلے یہاں ظاہر ہوں گے"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"کسی بھی وقت بلبلے کو کنٹرول کریں"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"یہ نظم کرنے کے لیے یہاں تھپتھپائیں کہ کون سی ایپس اور گفتگوئیں بلبلہ سکتی ہیں"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"بلبلہ"</string>
diff --git a/libs/WindowManager/Shell/res/values-uz/strings.xml b/libs/WindowManager/Shell/res/values-uz/strings.xml
index 4211ea7..5f33fe9 100644
--- a/libs/WindowManager/Shell/res/values-uz/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uz/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Hech qanday bulutcha topilmadi"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Eng oxirgi va yopilgan bulutchali chatlar shu yerda chiqadi"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Bulutchalardagi bildirishnomalar"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Bulutchalarda bildirishnomalar chiqishiga ruxsat beruvchi ilova va suhbatlarni tanlang."</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Pufaklar"</string>
diff --git a/libs/WindowManager/Shell/res/values-vi/strings.xml b/libs/WindowManager/Shell/res/values-vi/strings.xml
index 0a0205d..29b3b85 100644
--- a/libs/WindowManager/Shell/res/values-vi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-vi/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Đã hiểu"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Không có bong bóng trò chuyện nào gần đây"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Bong bóng trò chuyện đã đóng và bong bóng trò chuyện gần đây sẽ xuất hiện ở đây"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Kiểm soát bong bóng bất cứ lúc nào"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Nhấn vào đây để quản lý việc dùng bong bóng cho các ứng dụng và cuộc trò chuyện"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Bong bóng"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
index 29dc077..7820965 100644
--- a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"知道了"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近没有对话泡"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"此处会显示最近的对话泡和已关闭的对话泡"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"随时控制对话泡"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"点按此处即可管理哪些应用和对话可以显示对话泡"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"气泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
index 0755d61..f0df04a 100644
--- a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"知道了"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"沒有最近曾使用的小視窗"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近使用和關閉的小視窗會在這裡顯示"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"隨時控制對話氣泡"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"輕按這裡即可管理哪些應用程式和對話可以使用對話氣泡"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"氣泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
index f931883..a977363 100644
--- a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"我知道了"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"最近沒有任何對話框"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"最近的對話框和已關閉的對話框會顯示在這裡"</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"你隨時可以控管對話框的各項設定"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"輕觸這裡即可管理哪些應用程式和對話可顯示對話框"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"泡泡"</string>
diff --git a/libs/WindowManager/Shell/res/values-zu/strings.xml b/libs/WindowManager/Shell/res/values-zu/strings.xml
index 3ba0abe..a6903a3 100644
--- a/libs/WindowManager/Shell/res/values-zu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zu/strings.xml
@@ -76,6 +76,10 @@
     <string name="bubbles_user_education_got_it" msgid="3382046149225428296">"Ngiyezwa"</string>
     <string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Awekho amabhamuza akamuva"</string>
     <string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Amabhamuza akamuva namabhamuza asusiwe azobonakala lapha."</string>
+    <!-- no translation found for bubble_bar_education_stack_title (2486903590422497245) -->
+    <skip />
+    <!-- no translation found for bubble_bar_education_stack_text (2446934610817409820) -->
+    <skip />
     <string name="bubble_bar_education_manage_title" msgid="6148404487810835924">"Lawula amabhamuza noma nini"</string>
     <string name="bubble_bar_education_manage_text" msgid="3199732148641842038">"Thepha lapha ukuze ulawule ukuthi yimaphi ama-app kanye nezingxoxo ezingenza amabhamuza"</string>
     <string name="notification_bubble_title" msgid="6082910224488253378">"Ibhamuza"</string>
diff --git a/libs/WindowManager/Shell/res/values/config.xml b/libs/WindowManager/Shell/res/values/config.xml
index a3916b7..97a9d48 100644
--- a/libs/WindowManager/Shell/res/values/config.xml
+++ b/libs/WindowManager/Shell/res/values/config.xml
@@ -83,6 +83,11 @@
     <!-- Animation duration when exit starting window: reveal app -->
     <integer name="starting_window_app_reveal_anim_duration">266</integer>
 
+    <!-- Default animation type when hiding the starting window. The possible values are:
+          - 0 for radial vanish + slide up
+          - 1 for fade out -->
+    <integer name="starting_window_exit_animation_type">0</integer>
+
     <!-- 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">
diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml
index 00c63d7..b556150e 100644
--- a/libs/WindowManager/Shell/res/values/strings.xml
+++ b/libs/WindowManager/Shell/res/values/strings.xml
@@ -142,6 +142,10 @@
     <string name="bubble_accessibility_action_move_bottom_left">Move bottom left</string>
     <!-- Action in accessibility menu to move the stack of bubbles to the bottom right of the screen. [CHAR LIMIT=30]-->
     <string name="bubble_accessibility_action_move_bottom_right">Move bottom right</string>
+    <!-- Accessibility announcement when the stack of bubbles expands. [CHAR LIMIT=NONE]-->
+    <string name="bubble_accessibility_announce_expand">expand <xliff:g id="bubble_title" example="Messages">%1$s</xliff:g></string>
+    <!-- Accessibility announcement when the stack of bubbles collapses. [CHAR LIMIT=NONE]-->
+    <string name="bubble_accessibility_announce_collapse">collapse <xliff:g id="bubble_title" example="Messages">%1$s</xliff:g></string>
     <!-- Label for the button that takes the user to the notification settings for the given app. -->
     <string name="bubbles_app_settings"><xliff:g id="notification_title" example="Android Messages">%1$s</xliff:g> settings</string>
     <!-- Text used for the bubble dismiss area. Bubbles dragged to, or flung towards, this area will go away. [CHAR LIMIT=30] -->
@@ -163,6 +167,10 @@
     <!-- [CHAR LIMIT=NONE] Empty overflow subtitle -->
     <string name="bubble_overflow_empty_subtitle">Recent bubbles and dismissed bubbles will appear here</string>
 
+    <!-- Title text for the bubble bar feature education cling shown when a bubble is on screen for the first time. [CHAR LIMIT=60]-->
+    <string name="bubble_bar_education_stack_title">Chat using bubbles</string>
+    <!-- Descriptive text for the bubble bar feature education cling shown when a bubble is on screen for the first time. [CHAR LIMIT=NONE] -->
+    <string name="bubble_bar_education_stack_text">New conversations appear as icons in a bottom corner of your screen. Tap to expand them or drag to dismiss them.</string>
     <!-- Title text for the bubble bar "manage" button tool tip highlighting where users can go to control bubble settings. [CHAR LIMIT=60]-->
     <string name="bubble_bar_education_manage_title">Control bubbles anytime</string>
     <!-- Descriptive text for the bubble bar "manage" button tool tip highlighting where users can go to control bubble settings. [CHAR LIMIT=80]-->
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java
index 9b80063..4640106 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java
@@ -245,8 +245,8 @@
 
     private boolean shouldShowBackdrop(@NonNull TransitionInfo info,
             @NonNull TransitionInfo.Change change) {
-        final Animation a = loadAttributeAnimation(info.getType(), info, change,
-                WALLPAPER_TRANSITION_NONE, mTransitionAnimation, false);
+        final Animation a = loadAttributeAnimation(info, change, WALLPAPER_TRANSITION_NONE,
+                mTransitionAnimation, false);
         return a != null && a.getShowBackdrop();
     }
 }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
index dfdc79e..f259902 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
@@ -56,6 +56,7 @@
 import android.content.pm.UserInfo;
 import android.content.res.Configuration;
 import android.graphics.PixelFormat;
+import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.drawable.Icon;
 import android.os.Binder;
@@ -1063,6 +1064,15 @@
         }
     }
 
+    /**
+     * Show bubble bar user education relative to the reference position.
+     * @param position the reference position in Screen coordinates.
+     */
+    public void showUserEducation(Point position) {
+        if (mLayerView == null) return;
+        mLayerView.showUserEducation(position);
+    }
+
     @VisibleForTesting
     public boolean isBubbleNotificationSuppressedFromShade(String key, String groupKey) {
         boolean isSuppressedBubble = (mBubbleData.hasAnyBubbleWithKey(key)
@@ -1115,6 +1125,16 @@
     }
 
     /**
+     * Expands the stack if the selected bubble is present. This is currently used when user
+     * education view is clicked to expand the selected bubble.
+     */
+    public void expandStackWithSelectedBubble() {
+        if (mBubbleData.getSelectedBubble() != null) {
+            mBubbleData.setExpanded(true);
+        }
+    }
+
+    /**
      * Expands and selects the provided bubble as long as it already exists in the stack or the
      * overflow. This is currently used when opening a bubble via clicking on a conversation widget.
      */
@@ -1730,7 +1750,8 @@
                         + " expandedChanged=" + update.expandedChanged
                         + " selectionChanged=" + update.selectionChanged
                         + " suppressed=" + (update.suppressedBubble != null)
-                        + " unsuppressed=" + (update.unsuppressedBubble != null));
+                        + " unsuppressed=" + (update.unsuppressedBubble != null)
+                        + " shouldShowEducation=" + update.shouldShowEducation);
             }
 
             ensureBubbleViewsAndWindowCreated();
@@ -2155,6 +2176,12 @@
         public void onBubbleDrag(String bubbleKey, boolean isBeingDragged) {
             mMainExecutor.execute(() -> mController.onBubbleDrag(bubbleKey, isBeingDragged));
         }
+
+        @Override
+        public void showUserEducation(int positionX, int positionY) {
+            mMainExecutor.execute(() ->
+                    mController.showUserEducation(new Point(positionX, positionY)));
+        }
     }
 
     private class BubblesImpl implements Bubbles {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
index c6f74af..595a4af 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
@@ -77,6 +77,7 @@
         boolean orderChanged;
         boolean suppressedSummaryChanged;
         boolean expanded;
+        boolean shouldShowEducation;
         @Nullable BubbleViewProvider selectedBubble;
         @Nullable Bubble addedBubble;
         @Nullable Bubble updatedBubble;
@@ -126,6 +127,7 @@
 
             bubbleBarUpdate.expandedChanged = expandedChanged;
             bubbleBarUpdate.expanded = expanded;
+            bubbleBarUpdate.shouldShowEducation = shouldShowEducation;
             if (selectionChanged) {
                 bubbleBarUpdate.selectedBubbleKey = selectedBubble != null
                         ? selectedBubble.getKey()
@@ -165,6 +167,7 @@
          */
         BubbleBarUpdate getInitialState() {
             BubbleBarUpdate bubbleBarUpdate = new BubbleBarUpdate();
+            bubbleBarUpdate.shouldShowEducation = shouldShowEducation;
             for (int i = 0; i < bubbles.size(); i++) {
                 bubbleBarUpdate.currentBubbleList.add(bubbles.get(i).asBubbleBarBubble());
             }
@@ -187,6 +190,7 @@
 
     private final Context mContext;
     private final BubblePositioner mPositioner;
+    private final BubbleEducationController mEducationController;
     private final Executor mMainExecutor;
     /** Bubbles that are actively in the stack. */
     private final List<Bubble> mBubbles;
@@ -233,10 +237,11 @@
     private HashMap<String, String> mSuppressedGroupKeys = new HashMap<>();
 
     public BubbleData(Context context, BubbleLogger bubbleLogger, BubblePositioner positioner,
-            Executor mainExecutor) {
+            BubbleEducationController educationController, Executor mainExecutor) {
         mContext = context;
         mLogger = bubbleLogger;
         mPositioner = positioner;
+        mEducationController = educationController;
         mMainExecutor = mainExecutor;
         mOverflow = new BubbleOverflow(context, positioner);
         mBubbles = new ArrayList<>();
@@ -447,6 +452,7 @@
         if (bubble.shouldAutoExpand()) {
             bubble.setShouldAutoExpand(false);
             setSelectedBubbleInternal(bubble);
+
             if (!mExpanded) {
                 setExpandedInternal(true);
             }
@@ -877,6 +883,9 @@
 
     private void dispatchPendingChanges() {
         if (mListener != null && mStateChange.anythingChanged()) {
+            mStateChange.shouldShowEducation = mSelectedBubble != null
+                    && mEducationController.shouldShowStackEducation(mSelectedBubble)
+                    && !mExpanded;
             mListener.applyUpdate(mStateChange);
         }
         mStateChange = new Update(mBubbles, mOverflowBubbles);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java
index 1c0e052..f56b171 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java
@@ -44,7 +44,7 @@
     static final boolean DEBUG_BUBBLE_EXPANDED_VIEW = false;
     static final boolean DEBUG_EXPERIMENTS = true;
     static final boolean DEBUG_OVERFLOW = false;
-    static final boolean DEBUG_USER_EDUCATION = false;
+    public static final boolean DEBUG_USER_EDUCATION = false;
     static final boolean DEBUG_POSITIONER = false;
     public static final boolean DEBUG_COLLAPSE_ANIMATOR = false;
     public static boolean DEBUG_EXPANDED_VIEW_DRAGGING = false;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index 093ecb1..c124b53 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -25,6 +25,7 @@
 import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES;
 import static com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.wm.shell.bubbles.BubblePositioner.NUM_VISIBLE_WHEN_RESTING;
+import static com.android.wm.shell.common.bubbles.BubbleConstants.BUBBLE_EXPANDED_SCRIM_ALPHA;
 import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES;
 
 import android.animation.Animator;
@@ -131,8 +132,6 @@
 
     private static final int EXPANDED_VIEW_ALPHA_ANIMATION_DURATION = 150;
 
-    private static final float SCRIM_ALPHA = 0.32f;
-
     /** Minimum alpha value for scrim when alpha is being changed via drag */
     private static final float MIN_SCRIM_ALPHA_FOR_DRAG = 0.2f;
 
@@ -779,14 +778,15 @@
         private float getScrimAlphaForDrag(float dragAmount) {
             // dragAmount should be negative as we allow scroll up only
             if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) {
-                float alphaRange = SCRIM_ALPHA - MIN_SCRIM_ALPHA_FOR_DRAG;
+                float alphaRange = BUBBLE_EXPANDED_SCRIM_ALPHA - MIN_SCRIM_ALPHA_FOR_DRAG;
 
                 int dragMax = mExpandedBubble.getExpandedView().getContentHeight();
                 float dragFraction = dragAmount / dragMax;
 
-                return Math.max(SCRIM_ALPHA - alphaRange * dragFraction, MIN_SCRIM_ALPHA_FOR_DRAG);
+                return Math.max(BUBBLE_EXPANDED_SCRIM_ALPHA - alphaRange * dragFraction,
+                        MIN_SCRIM_ALPHA_FOR_DRAG);
             }
-            return SCRIM_ALPHA;
+            return BUBBLE_EXPANDED_SCRIM_ALPHA;
         }
     };
 
@@ -2037,6 +2037,7 @@
             });
         }
         notifyExpansionChanged(mExpandedBubble, mIsExpanded);
+        announceExpandForAccessibility(mExpandedBubble, mIsExpanded);
     }
 
     /**
@@ -2053,6 +2054,34 @@
         }
     }
 
+    private void announceExpandForAccessibility(BubbleViewProvider bubble, boolean expanded) {
+        if (bubble instanceof Bubble) {
+            String contentDescription = getBubbleContentDescription((Bubble) bubble);
+            String message = getResources().getString(
+                    expanded
+                            ? R.string.bubble_accessibility_announce_expand
+                            : R.string.bubble_accessibility_announce_collapse, contentDescription);
+            announceForAccessibility(message);
+        }
+    }
+
+    @NonNull
+    private String getBubbleContentDescription(Bubble bubble) {
+        final String appName = bubble.getAppName();
+        final String title = bubble.getTitle() != null
+                ? bubble.getTitle()
+                : getResources().getString(R.string.notification_bubble_title);
+
+        if (appName == null || title.equals(appName)) {
+            // App bubble title equals the app name, so return only the title to avoid having
+            // content description like: `<app> from <app>`.
+            return title;
+        } else {
+            return getResources().getString(
+                    R.string.bubble_content_description_single, title, appName);
+        }
+    }
+
     private boolean isGestureNavEnabled() {
         return mContext.getResources().getInteger(
                 com.android.internal.R.integer.config_navBarInteractionMode)
@@ -2214,7 +2243,7 @@
         if (show) {
             mScrim.animate()
                     .setInterpolator(ALPHA_IN)
-                    .alpha(SCRIM_ALPHA)
+                    .alpha(BUBBLE_EXPANDED_SCRIM_ALPHA)
                     .setListener(listener)
                     .start();
         } else {
@@ -2943,7 +2972,7 @@
         mBubbleController.getSysuiProxy().onManageMenuExpandChanged(show);
         mManageMenuScrim.animate()
                 .setInterpolator(show ? ALPHA_IN : ALPHA_OUT)
-                .alpha(show ? SCRIM_ALPHA : 0f)
+                .alpha(show ? BUBBLE_EXPANDED_SCRIM_ALPHA : 0f)
                 .withEndAction(endAction)
                 .start();
 
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
index 4dda068..5776ad1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
@@ -39,4 +39,6 @@
 
     oneway void onBubbleDrag(in String key, in boolean isBeingDragged) = 7;
 
+    oneway void showUserEducation(in int positionX, in int positionY) = 8;
+
 }
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
index 8f11253..e788341 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
@@ -21,6 +21,7 @@
 
 import android.annotation.Nullable;
 import android.content.Context;
+import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.Region;
 import android.graphics.drawable.ColorDrawable;
@@ -36,6 +37,8 @@
 
 import java.util.function.Consumer;
 
+import kotlin.Unit;
+
 /**
  * Similar to {@link com.android.wm.shell.bubbles.BubbleStackView}, this view is added to window
  * manager to display bubbles. However, it is only used when bubbles are being displayed in
@@ -111,7 +114,7 @@
         getViewTreeObserver().removeOnComputeInternalInsetsListener(this);
 
         if (mExpandedView != null) {
-            mEducationViewController.hideManageEducation(/* animated = */ false);
+            mEducationViewController.hideEducation(/* animated = */ false);
             removeView(mExpandedView);
             mExpandedView = null;
         }
@@ -171,7 +174,9 @@
             mExpandedView.setListener(new BubbleBarExpandedView.Listener() {
                 @Override
                 public void onTaskCreated() {
-                    mEducationViewController.maybeShowManageEducation(b, mExpandedView);
+                    if (mEducationViewController != null && mExpandedView != null) {
+                        mEducationViewController.maybeShowManageEducation(b, mExpandedView);
+                    }
                 }
 
                 @Override
@@ -190,6 +195,10 @@
             addView(mExpandedView, new FrameLayout.LayoutParams(width, height));
         }
 
+        if (mEducationViewController.isEducationVisible()) {
+            mEducationViewController.hideEducation(/* animated = */ true);
+        }
+
         mIsExpanded = true;
         mBubbleController.getSysuiProxy().onStackExpandChanged(true);
         mAnimationHelper.animateExpansion(mExpandedBubble, () -> {
@@ -210,7 +219,7 @@
     public void collapse() {
         mIsExpanded = false;
         final BubbleBarExpandedView viewToRemove = mExpandedView;
-        mEducationViewController.hideManageEducation(/* animated = */ true);
+        mEducationViewController.hideEducation(/* animated = */ true);
         mAnimationHelper.animateCollapse(() -> removeView(viewToRemove));
         mBubbleController.getSysuiProxy().onStackExpandChanged(false);
         mExpandedView = null;
@@ -218,6 +227,21 @@
         showScrim(false);
     }
 
+    /**
+     * Show bubble bar user education relative to the reference position.
+     * @param position the reference position in Screen coordinates.
+     */
+    public void showUserEducation(Point position) {
+        mEducationViewController.showStackEducation(position, /* root = */ this, () -> {
+            // When the user education is clicked hide it and expand the selected bubble
+            mEducationViewController.hideEducation(/* animated = */ true, () -> {
+                mBubbleController.expandStackWithSelectedBubble();
+                return Unit.INSTANCE;
+            });
+            return Unit.INSTANCE;
+        });
+    }
+
     /** Sets the function to call to un-bubble the given conversation. */
     public void setUnBubbleConversationCallback(
             @Nullable Consumer<String> unBubbleConversationCallback) {
@@ -226,8 +250,8 @@
 
     /** Hides the current modal education/menu view, expanded view or collapses the bubble stack */
     private void hideMenuOrCollapse() {
-        if (mEducationViewController.isManageEducationVisible()) {
-            mEducationViewController.hideManageEducation(/* animated = */ true);
+        if (mEducationViewController.isEducationVisible()) {
+            mEducationViewController.hideEducation(/* animated = */ true);
         } else if (isExpanded() && mExpandedView != null) {
             mExpandedView.hideMenuOrCollapse();
         } else {
@@ -275,7 +299,7 @@
      */
     private void getTouchableRegion(Region outRegion) {
         mTempRect.setEmpty();
-        if (mIsExpanded) {
+        if (mIsExpanded || mEducationViewController.isEducationVisible()) {
             getBoundsOnScreen(mTempRect);
             outRegion.op(mTempRect, Region.Op.UNION);
         }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleEducationViewController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleEducationViewController.kt
index 7b39c6f..ee552ae 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleEducationViewController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleEducationViewController.kt
@@ -15,23 +15,34 @@
  */
 package com.android.wm.shell.bubbles.bar
 
+import android.annotation.LayoutRes
 import android.content.Context
+import android.graphics.Point
+import android.graphics.Rect
+import android.util.Log
 import android.view.LayoutInflater
+import android.view.View
 import android.view.ViewGroup
+import android.widget.FrameLayout
 import androidx.core.view.doOnLayout
 import androidx.dynamicanimation.animation.DynamicAnimation
 import androidx.dynamicanimation.animation.SpringForce
 import com.android.wm.shell.R
 import com.android.wm.shell.animation.PhysicsAnimator
+import com.android.wm.shell.bubbles.BubbleDebugConfig.DEBUG_USER_EDUCATION
+import com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_BUBBLES
+import com.android.wm.shell.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME
 import com.android.wm.shell.bubbles.BubbleEducationController
 import com.android.wm.shell.bubbles.BubbleViewProvider
 import com.android.wm.shell.bubbles.setup
+import com.android.wm.shell.common.bubbles.BubblePopupDrawable
 import com.android.wm.shell.common.bubbles.BubblePopupView
+import kotlin.math.roundToInt
 
 /** Manages bubble education presentation and animation */
 class BubbleEducationViewController(private val context: Context, private val listener: Listener) {
     interface Listener {
-        fun onManageEducationVisibilityChanged(isVisible: Boolean)
+        fun onEducationVisibilityChanged(isVisible: Boolean)
     }
 
     private var rootView: ViewGroup? = null
@@ -45,61 +56,112 @@
         )
     }
 
+    private val scrimView by lazy {
+        View(context).apply {
+            importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
+            setOnClickListener { hideEducation(animated = true) }
+        }
+    }
+
     private val controller by lazy { BubbleEducationController(context) }
 
     /** Whether the education view is visible or being animated */
-    val isManageEducationVisible: Boolean
+    val isEducationVisible: Boolean
         get() = educationView != null && rootView != null
 
     /**
+     * Hide the current education view if visible
+     *
+     * @param animated whether should hide with animation
+     */
+    @JvmOverloads
+    fun hideEducation(animated: Boolean, endActions: () -> Unit = {}) {
+        log { "hideEducation animated: $animated" }
+
+        if (animated) {
+            animateTransition(show = false) {
+                cleanUp()
+                endActions()
+                listener.onEducationVisibilityChanged(isVisible = false)
+            }
+        } else {
+            cleanUp()
+            endActions()
+            listener.onEducationVisibilityChanged(isVisible = false)
+        }
+    }
+
+    /**
+     * Show bubble bar stack user education.
+     *
+     * @param position the reference position for the user education in Screen coordinates.
+     * @param root the view to show user education in.
+     * @param educationClickHandler the on click handler for the user education view
+     */
+    fun showStackEducation(position: Point, root: ViewGroup, educationClickHandler: () -> Unit) {
+        hideEducation(animated = false)
+        log { "showStackEducation at: $position" }
+
+        educationView =
+            createEducationView(R.layout.bubble_bar_stack_education, root).apply {
+                setArrowDirection(BubblePopupDrawable.ArrowDirection.DOWN)
+                setArrowPosition(BubblePopupDrawable.ArrowPosition.End)
+                updateEducationPosition(view = this, position, root)
+                val arrowToEdgeOffset = popupDrawable?.config?.cornerRadius ?: 0f
+                doOnLayout {
+                    it.pivotX = it.width - arrowToEdgeOffset
+                    it.pivotY = it.height.toFloat()
+                }
+                setOnClickListener { educationClickHandler() }
+            }
+
+        rootView = root
+        animator = createAnimator()
+
+        root.addView(scrimView)
+        root.addView(educationView)
+        animateTransition(show = true) {
+            controller.hasSeenStackEducation = true
+            listener.onEducationVisibilityChanged(isVisible = true)
+        }
+    }
+
+    /**
      * Show manage bubble education if hasn't been shown before
      *
      * @param bubble the bubble used for the manage education check
      * @param root the view to show manage education in
      */
     fun maybeShowManageEducation(bubble: BubbleViewProvider, root: ViewGroup) {
+        log { "maybeShowManageEducation bubble: $bubble" }
         if (!controller.shouldShowManageEducation(bubble)) return
         showManageEducation(root)
     }
 
     /**
-     * Hide the manage education view if visible
-     *
-     * @param animated whether should hide with animation
-     */
-    fun hideManageEducation(animated: Boolean) {
-        rootView?.let {
-            fun cleanUp() {
-                it.removeView(educationView)
-                rootView = null
-                listener.onManageEducationVisibilityChanged(isVisible = false)
-            }
-
-            if (animated) {
-                animateTransition(show = false, ::cleanUp)
-            } else {
-                cleanUp()
-            }
-        }
-    }
-
-    /**
      * Show manage education with animation
      *
      * @param root the view to show manage education in
      */
     private fun showManageEducation(root: ViewGroup) {
-        hideManageEducation(animated = false)
-        if (educationView == null) {
-            val eduView = createEducationView(root)
-            educationView = eduView
-            animator = createAnimation(eduView)
-        }
-        root.addView(educationView)
+        hideEducation(animated = false)
+        log { "showManageEducation" }
+
+        educationView =
+            createEducationView(R.layout.bubble_bar_manage_education, root).apply {
+                pivotY = 0f
+                doOnLayout { it.pivotX = it.width / 2f }
+                setOnClickListener { hideEducation(animated = true) }
+            }
+
         rootView = root
+        animator = createAnimator()
+
+        root.addView(scrimView)
+        root.addView(educationView)
         animateTransition(show = true) {
             controller.hasSeenManageEducation = true
-            listener.onManageEducationVisibilityChanged(isVisible = true)
+            listener.onEducationVisibilityChanged(isVisible = true)
         }
     }
 
@@ -110,39 +172,75 @@
      * @param endActions a closure to be called when the animation completes
      */
     private fun animateTransition(show: Boolean, endActions: () -> Unit) {
-        animator?.let { animator ->
-            animator
-                .spring(DynamicAnimation.ALPHA, if (show) 1f else 0f)
-                .spring(DynamicAnimation.SCALE_X, if (show) 1f else EDU_SCALE_HIDDEN)
-                .spring(DynamicAnimation.SCALE_Y, if (show) 1f else EDU_SCALE_HIDDEN)
-                .withEndActions(endActions)
-                .start()
-        } ?: endActions()
+        animator
+            ?.spring(DynamicAnimation.ALPHA, if (show) 1f else 0f)
+            ?.spring(DynamicAnimation.SCALE_X, if (show) 1f else EDU_SCALE_HIDDEN)
+            ?.spring(DynamicAnimation.SCALE_Y, if (show) 1f else EDU_SCALE_HIDDEN)
+            ?.withEndActions(endActions)
+            ?.start()
+            ?: endActions()
     }
 
-    private fun createEducationView(root: ViewGroup): BubblePopupView {
-        val view =
-            LayoutInflater.from(context).inflate(R.layout.bubble_bar_manage_education, root, false)
-                as BubblePopupView
+    /** Remove education view from the root and clean up all relative properties */
+    private fun cleanUp() {
+        log { "cleanUp" }
+        rootView?.removeView(educationView)
+        rootView?.removeView(scrimView)
+        educationView = null
+        rootView = null
+        animator = null
+    }
 
-        return view.apply {
-            setup()
-            alpha = 0f
-            pivotY = 0f
-            scaleX = EDU_SCALE_HIDDEN
-            scaleY = EDU_SCALE_HIDDEN
-            doOnLayout { it.pivotX = it.width / 2f }
-            setOnClickListener { hideManageEducation(animated = true) }
+    /**
+     * Create education view by inflating layout provided.
+     *
+     * @param layout layout resource id to inflate. The root view should be [BubblePopupView]
+     * @param root view group to use as root for inflation, is not attached to root
+     */
+    private fun createEducationView(@LayoutRes layout: Int, root: ViewGroup): BubblePopupView {
+        val view = LayoutInflater.from(context).inflate(layout, root, false) as BubblePopupView
+        view.setup()
+        view.alpha = 0f
+        view.scaleX = EDU_SCALE_HIDDEN
+        view.scaleY = EDU_SCALE_HIDDEN
+        return view
+    }
+
+    /** Create animator for the user education transitions */
+    private fun createAnimator(): PhysicsAnimator<BubblePopupView>? {
+        return educationView?.let {
+            PhysicsAnimator.getInstance(it).apply { setDefaultSpringConfig(springConfig) }
         }
     }
 
-    private fun createAnimation(view: BubblePopupView): PhysicsAnimator<BubblePopupView> {
-        val animator = PhysicsAnimator.getInstance(view)
-        animator.setDefaultSpringConfig(springConfig)
-        return animator
+    /**
+     * Update user education view position relative to the reference position
+     *
+     * @param view the user education view to layout
+     * @param position the reference position in Screen coordinates
+     * @param root the root view to use for the layout
+     */
+    private fun updateEducationPosition(view: BubblePopupView, position: Point, root: ViewGroup) {
+        val rootBounds = Rect()
+        // Get root bounds on screen as position is in screen coordinates
+        root.getBoundsOnScreen(rootBounds)
+        // Get the offset to the arrow from the edge of the education view
+        val arrowToEdgeOffset =
+            view.popupDrawable?.config?.let { it.cornerRadius + it.arrowWidth / 2f }?.roundToInt()
+                ?: 0
+        // Calculate education view margins
+        val params = view.layoutParams as FrameLayout.LayoutParams
+        params.bottomMargin = rootBounds.bottom - position.y
+        params.rightMargin = rootBounds.right - position.x - arrowToEdgeOffset
+        view.layoutParams = params
+    }
+
+    private fun log(msg: () -> String) {
+        if (DEBUG_USER_EDUCATION) Log.d(TAG, msg())
     }
 
     companion object {
+        private val TAG = if (TAG_WITH_CLASS_NAME) "BubbleEducationViewController" else TAG_BUBBLES
         private const val EDU_SCALE_HIDDEN = 0.5f
     }
 }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleBarUpdate.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleBarUpdate.java
index 8142347..fc627a8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleBarUpdate.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleBarUpdate.java
@@ -35,6 +35,7 @@
 
     public boolean expandedChanged;
     public boolean expanded;
+    public boolean shouldShowEducation;
     @Nullable
     public String selectedBubbleKey;
     @Nullable
@@ -61,6 +62,7 @@
     public BubbleBarUpdate(Parcel parcel) {
         expandedChanged = parcel.readBoolean();
         expanded = parcel.readBoolean();
+        shouldShowEducation = parcel.readBoolean();
         selectedBubbleKey = parcel.readString();
         addedBubble = parcel.readParcelable(BubbleInfo.class.getClassLoader(),
                 BubbleInfo.class);
@@ -95,6 +97,7 @@
         return "BubbleBarUpdate{ expandedChanged=" + expandedChanged
                 + " expanded=" + expanded
                 + " selectedBubbleKey=" + selectedBubbleKey
+                + " shouldShowEducation=" + shouldShowEducation
                 + " addedBubble=" + addedBubble
                 + " updatedBubble=" + updatedBubble
                 + " suppressedBubbleKey=" + suppressedBubbleKey
@@ -114,6 +117,7 @@
     public void writeToParcel(Parcel parcel, int flags) {
         parcel.writeBoolean(expandedChanged);
         parcel.writeBoolean(expanded);
+        parcel.writeBoolean(shouldShowEducation);
         parcel.writeString(selectedBubbleKey);
         parcel.writeParcelable(addedBubble, flags);
         parcel.writeParcelable(updatedBubble, flags);
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java
similarity index 64%
copy from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
copy to libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java
index df5cefd..0329b8d 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubbleConstants.java
@@ -14,16 +14,13 @@
  * limitations under the License.
  */
 
-package com.android.systemui.biometrics.shared.model
+package com.android.wm.shell.common.bubbles;
 
-import android.hardware.fingerprint.FingerprintSensorProperties
+/**
+ * Constants shared between bubbles in shell & things we have to do for bubbles in launcher.
+ */
+public class BubbleConstants {
 
-/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
-enum class FingerprintSensorType {
-    UNKNOWN,
-    REAR,
-    UDFPS_ULTRASONIC,
-    UDFPS_OPTICAL,
-    POWER_BUTTON,
-    HOME_BUTTON,
+    /** The alpha for the scrim shown when bubbles are expanded. */
+    public static float BUBBLE_EXPANDED_SCRIM_ALPHA = .32f;
 }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupDrawable.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupDrawable.kt
index 1fd22d0a..887af17 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupDrawable.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupDrawable.kt
@@ -31,7 +31,7 @@
 import kotlin.properties.Delegates
 
 /** A drawable for the [BubblePopupView] that draws a popup background with a directional arrow */
-class BubblePopupDrawable(private val config: Config) : Drawable() {
+class BubblePopupDrawable(val config: Config) : Drawable() {
     /** The direction of the arrow in the popup drawable */
     enum class ArrowDirection {
         UP,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupView.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupView.kt
index f8a4946..444fbf7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupView.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/BubblePopupView.kt
@@ -29,7 +29,8 @@
     defStyleAttr: Int = 0,
     defStyleRes: Int = 0
 ) : LinearLayout(context, attrs, defStyleAttr, defStyleRes) {
-    private var popupDrawable: BubblePopupDrawable? = null
+    var popupDrawable: BubblePopupDrawable? = null
+        private set
 
     /**
      * Sets up the popup drawable with the config provided. Required to remove dependency on local
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
index 1901e0b..a5000fe 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerSnapAlgorithm.java
@@ -19,6 +19,14 @@
 import static android.view.WindowManager.DOCKED_INVALID;
 import static android.view.WindowManager.DOCKED_LEFT;
 import static android.view.WindowManager.DOCKED_RIGHT;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_30_70;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_50_50;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_70_30;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_MINIMIZE;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_NONE;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SnapPosition;
 
 import android.content.Context;
 import android.content.res.Configuration;
@@ -263,7 +271,7 @@
 
     private SnapTarget snap(int position, boolean hardDismiss) {
         if (shouldApplyFreeSnapMode(position)) {
-            return new SnapTarget(position, position, SnapTarget.FLAG_NONE);
+            return new SnapTarget(position, position, SNAP_TO_NONE);
         }
         int minIndex = -1;
         float minDistance = Float.MAX_VALUE;
@@ -291,8 +299,7 @@
         if (dockedSide == DOCKED_RIGHT) {
             startPos += mInsets.left;
         }
-        mTargets.add(new SnapTarget(startPos, startPos, SnapTarget.FLAG_DISMISS_START,
-                0.35f));
+        mTargets.add(new SnapTarget(startPos, startPos, SNAP_TO_START_AND_DISMISS, 0.35f));
         switch (mSnapMode) {
             case SNAP_MODE_16_9:
                 addRatio16_9Targets(isHorizontalDivision, dividerMax);
@@ -307,15 +314,15 @@
                 addMinimizedTarget(isHorizontalDivision, dockedSide);
                 break;
         }
-        mTargets.add(new SnapTarget(dividerMax, dividerMax, SnapTarget.FLAG_DISMISS_END, 0.35f));
+        mTargets.add(new SnapTarget(dividerMax, dividerMax, SNAP_TO_END_AND_DISMISS, 0.35f));
     }
 
     private void addNonDismissingTargets(boolean isHorizontalDivision, int topPosition,
             int bottomPosition, int dividerMax) {
-        maybeAddTarget(topPosition, topPosition - getStartInset());
+        maybeAddTarget(topPosition, topPosition - getStartInset(), SNAP_TO_30_70);
         addMiddleTarget(isHorizontalDivision);
         maybeAddTarget(bottomPosition,
-                dividerMax - getEndInset() - (bottomPosition + mDividerSize));
+                dividerMax - getEndInset() - (bottomPosition + mDividerSize), SNAP_TO_70_30);
     }
 
     private void addFixedDivisionTargets(boolean isHorizontalDivision, int dividerMax) {
@@ -349,16 +356,16 @@
      * Adds a target at {@param position} but only if the area with size of {@param smallerSize}
      * meets the minimal size requirement.
      */
-    private void maybeAddTarget(int position, int smallerSize) {
+    private void maybeAddTarget(int position, int smallerSize, @SnapPosition int snapTo) {
         if (smallerSize >= mMinimalSizeResizableTask) {
-            mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+            mTargets.add(new SnapTarget(position, position, snapTo));
         }
     }
 
     private void addMiddleTarget(boolean isHorizontalDivision) {
         int position = DockedDividerUtils.calculateMiddlePosition(isHorizontalDivision,
                 mInsets, mDisplayWidth, mDisplayHeight, mDividerSize);
-        mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+        mTargets.add(new SnapTarget(position, position, SNAP_TO_50_50));
     }
 
     private void addMinimizedTarget(boolean isHorizontalDivision, int dockedSide) {
@@ -372,7 +379,7 @@
                 position = mDisplayWidth - position - mInsets.right - mDividerSize;
             }
         }
-        mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
+        mTargets.add(new SnapTarget(position, position, SNAP_TO_MINIMIZE));
     }
 
     public SnapTarget getMiddleTarget() {
@@ -435,14 +442,6 @@
      * Represents a snap target for the divider.
      */
     public static class SnapTarget {
-        public static final int FLAG_NONE = 0;
-
-        /** If the divider reaches this value, the left/top task should be dismissed. */
-        public static final int FLAG_DISMISS_START = 1;
-
-        /** If the divider reaches this value, the right/bottom task should be dismissed */
-        public static final int FLAG_DISMISS_END = 2;
-
         /** Position of this snap target. The right/bottom edge of the top/left task snaps here. */
         public final int position;
 
@@ -452,7 +451,10 @@
          */
         public final int taskPosition;
 
-        public final int flag;
+        /**
+         * An int describing the placement of the divider in this snap target.
+         */
+        public final @SnapPosition int snapTo;
 
         public boolean isMiddleTarget;
 
@@ -462,14 +464,15 @@
          */
         private final float distanceMultiplier;
 
-        public SnapTarget(int position, int taskPosition, int flag) {
-            this(position, taskPosition, flag, 1f);
+        public SnapTarget(int position, int taskPosition, @SnapPosition int snapTo) {
+            this(position, taskPosition, snapTo, 1f);
         }
 
-        public SnapTarget(int position, int taskPosition, int flag, float distanceMultiplier) {
+        public SnapTarget(int position, int taskPosition, @SnapPosition int snapTo,
+                float distanceMultiplier) {
             this.position = position;
             this.taskPosition = taskPosition;
-            this.flag = flag;
+            this.snapTo = snapTo;
             this.distanceMultiplier = distanceMultiplier;
         }
     }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index 755dba0..4af03fd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -23,13 +23,12 @@
 import static android.view.WindowManager.DOCKED_LEFT;
 import static android.view.WindowManager.DOCKED_RIGHT;
 import static android.view.WindowManager.DOCKED_TOP;
-
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER;
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLIT_SCREEN_RESIZE;
-import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END;
-import static com.android.wm.shell.common.split.DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START;
 import static com.android.wm.shell.animation.Interpolators.DIM_INTERPOLATOR;
 import static com.android.wm.shell.animation.Interpolators.SLOWDOWN_INTERPOLATOR;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT;
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED;
@@ -511,13 +510,13 @@
      * target indicates dismissing split.
      */
     public void snapToTarget(int currentPosition, DividerSnapAlgorithm.SnapTarget snapTarget) {
-        switch (snapTarget.flag) {
-            case FLAG_DISMISS_START:
+        switch (snapTarget.snapTo) {
+            case SNAP_TO_START_AND_DISMISS:
                 flingDividePosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION,
                         () -> mSplitLayoutHandler.onSnappedToDismiss(false /* bottomOrRight */,
                                 EXIT_REASON_DRAG_DIVIDER));
                 break;
-            case FLAG_DISMISS_END:
+            case SNAP_TO_END_AND_DISMISS:
                 flingDividePosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION,
                         () -> mSplitLayoutHandler.onSnappedToDismiss(true /* bottomOrRight */,
                                 EXIT_REASON_DRAG_DIVIDER));
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
index be1b9b1..ff38b7e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitScreenConstants.java
@@ -57,6 +57,38 @@
     public @interface SplitPosition {
     }
 
+    /** The divider doesn't snap to any target and is freely placeable. */
+    public static final int SNAP_TO_NONE = 0;
+
+    /** A snap target positioned near the screen edge for a minimized task */
+    public static final int SNAP_TO_MINIMIZE = 1;
+
+    /** If the divider reaches this value, the left/top task should be dismissed. */
+    public static final int SNAP_TO_START_AND_DISMISS = 2;
+
+    /** A snap target in the first half of the screen, where the split is roughly 30-70. */
+    public static final int SNAP_TO_30_70 = 3;
+
+    /** The 50-50 snap target */
+    public static final int SNAP_TO_50_50 = 4;
+
+    /** A snap target in the latter half of the screen, where the split is roughly 70-30. */
+    public static final int SNAP_TO_70_30 = 5;
+
+    /** If the divider reaches this value, the right/bottom task should be dismissed. */
+    public static final int SNAP_TO_END_AND_DISMISS = 6;
+
+    @IntDef(prefix = { "SNAP_TO_" }, value = {
+            SNAP_TO_NONE,
+            SNAP_TO_MINIMIZE,
+            SNAP_TO_START_AND_DISMISS,
+            SNAP_TO_30_70,
+            SNAP_TO_50_50,
+            SNAP_TO_70_30,
+            SNAP_TO_END_AND_DISMISS
+    })
+    public @interface SnapPosition {}
+
     public static final int[] CONTROLLED_ACTIVITY_TYPES = {ACTIVITY_TYPE_STANDARD};
     public static final int[] CONTROLLED_WINDOWING_MODES =
             {WINDOWING_MODE_FULLSCREEN, WINDOWING_MODE_UNDEFINED};
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
index e9f3e1a..fd23d14 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
@@ -35,6 +35,7 @@
 import com.android.wm.shell.bubbles.BubbleController;
 import com.android.wm.shell.bubbles.BubbleData;
 import com.android.wm.shell.bubbles.BubbleDataRepository;
+import com.android.wm.shell.bubbles.BubbleEducationController;
 import com.android.wm.shell.bubbles.BubbleLogger;
 import com.android.wm.shell.bubbles.BubblePositioner;
 import com.android.wm.shell.bubbles.properties.ProdBubbleProperties;
@@ -134,11 +135,18 @@
 
     @WMSingleton
     @Provides
+    static BubbleEducationController provideBubbleEducationProvider(Context context) {
+        return new BubbleEducationController(context);
+    }
+
+    @WMSingleton
+    @Provides
     static BubbleData provideBubbleData(Context context,
             BubbleLogger logger,
             BubblePositioner positioner,
+            BubbleEducationController educationController,
             @ShellMainThread ShellExecutor mainExecutor) {
-        return new BubbleData(context, logger, positioner, mainExecutor);
+        return new BubbleData(context, logger, positioner, educationController, mainExecutor);
     }
 
     // Note: Handler needed for LauncherApps.register
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
index c05af73..c0fc02fa 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
@@ -52,8 +52,8 @@
     private val activeTasksListeners = ArraySet<ActiveTasksListener>()
     // Track visible tasks separately because a task may be part of the desktop but not visible.
     private val visibleTasksListeners = ArrayMap<VisibleTasksListener, Executor>()
-    // Track corners of desktop tasks, used to determine gesture exclusion
-    private val desktopCorners = SparseArray<Region>()
+    // Track corner/caption regions of desktop tasks, used to determine gesture exclusion
+    private val desktopExclusionRegions = SparseArray<Region>()
     private var desktopGestureExclusionListener: Consumer<Region>? = null
     private var desktopGestureExclusionExecutor: Executor? = null
 
@@ -96,10 +96,11 @@
     }
 
     /**
-     * Add a Consumer which will inform other classes of changes to corners for all Desktop tasks.
+     * Add a Consumer which will inform other classes of changes to exclusion regions for all
+     * Desktop tasks.
      */
-    fun setTaskCornerListener(cornersListener: Consumer<Region>, executor: Executor) {
-        desktopGestureExclusionListener = cornersListener
+    fun setExclusionRegionListener(regionListener: Consumer<Region>, executor: Executor) {
+        desktopGestureExclusionListener = regionListener
         desktopGestureExclusionExecutor = executor
         executor.execute {
             desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
@@ -107,14 +108,14 @@
     }
 
     /**
-     * Create a new merged region representative of all corners in all desktop tasks.
+     * Create a new merged region representative of all exclusion regions in all desktop tasks.
      */
     private fun calculateDesktopExclusionRegion(): Region {
-        val desktopCornersRegion = Region()
-        desktopCorners.valueIterator().forEach { taskCorners ->
-            desktopCornersRegion.op(taskCorners, Region.Op.UNION)
+        val desktopExclusionRegion = Region()
+        desktopExclusionRegions.valueIterator().forEach { taskExclusionRegion ->
+            desktopExclusionRegion.op(taskExclusionRegion, Region.Op.UNION)
         }
-        return desktopCornersRegion
+        return desktopExclusionRegion
     }
 
     /**
@@ -294,22 +295,24 @@
     }
 
     /**
-     * Updates the active desktop corners; if desktopCorners has been accepted by
-     * desktopCornersListener, it will be updated in the appropriate classes.
+     * Updates the active desktop gesture exclusion regions; if desktopExclusionRegions has been
+     * accepted by desktopGestureExclusionListener, it will be updated in the
+     * appropriate classes.
      */
-    fun updateTaskCorners(taskId: Int, taskCorners: Region) {
-        desktopCorners.put(taskId, taskCorners)
+    fun updateTaskExclusionRegions(taskId: Int, taskExclusionRegions: Region) {
+        desktopExclusionRegions.put(taskId, taskExclusionRegions)
         desktopGestureExclusionExecutor?.execute {
             desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
         }
     }
 
     /**
-     * Removes the active desktop corners for the specified task; if desktopCorners has been
-     * accepted by desktopCornersListener, it will be updated in the appropriate classes.
+     * Removes the desktop gesture exclusion region for the specified task; if exclusionRegion
+     * has been accepted by desktopGestureExclusionListener, it will be updated in the
+     * appropriate classes.
      */
-    fun removeTaskCorners(taskId: Int) {
-        desktopCorners.delete(taskId)
+    fun removeExclusionRegion(taskId: Int) {
+        desktopExclusionRegions.delete(taskId)
         desktopGestureExclusionExecutor?.execute {
             desktopGestureExclusionListener?.accept(calculateDesktopExclusionRegion())
         }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
index b918c83..9ce0118 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
@@ -16,7 +16,6 @@
 
 package com.android.wm.shell.desktopmode
 
-import android.R
 import android.app.ActivityManager.RunningTaskInfo
 import android.app.WindowConfiguration
 import android.app.WindowConfiguration.ACTIVITY_TYPE_HOME
@@ -27,7 +26,6 @@
 import android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED
 import android.app.WindowConfiguration.WindowingMode
 import android.content.Context
-import android.content.res.TypedArray
 import android.graphics.Point
 import android.graphics.PointF
 import android.graphics.Rect
@@ -44,6 +42,7 @@
 import android.window.TransitionRequestInfo
 import android.window.WindowContainerTransaction
 import androidx.annotation.BinderThread
+import com.android.internal.policy.ScreenDecorationsUtils
 import com.android.wm.shell.RootTaskDisplayAreaOrganizer
 import com.android.wm.shell.ShellTaskOrganizer
 import com.android.wm.shell.common.DisplayController
@@ -696,10 +695,7 @@
             finishTransaction: SurfaceControl.Transaction
     ) {
         // Add rounded corners to freeform windows
-        val ta: TypedArray = context.obtainStyledAttributes(
-                intArrayOf(R.attr.dialogCornerRadius))
-        val cornerRadius = ta.getDimensionPixelSize(0, 0).toFloat()
-        ta.recycle()
+        val cornerRadius = ScreenDecorationsUtils.getWindowCornerRadius(context)
         info.changes
                 .filter { it.taskInfo?.windowingMode == WINDOWING_MODE_FREEFORM }
                 .forEach { finishTransaction.setCornerRadius(it.leash, cornerRadius) }
@@ -972,17 +968,17 @@
     }
 
     /**
-     * Update the corner region for a specified task
+     * Update the exclusion region for a specified task
      */
-    fun onTaskCornersChanged(taskId: Int, corner: Region) {
-        desktopModeTaskRepository.updateTaskCorners(taskId, corner)
+    fun onExclusionRegionChanged(taskId: Int, exclusionRegion: Region) {
+        desktopModeTaskRepository.updateTaskExclusionRegions(taskId, exclusionRegion)
     }
 
     /**
-     * Remove a previously tracked corner region for a specified task.
+     * Remove a previously tracked exclusion region for a specified task.
      */
-    fun removeCornersForTask(taskId: Int) {
-        desktopModeTaskRepository.removeTaskCorners(taskId)
+    fun removeExclusionRegionForTask(taskId: Int) {
+        desktopModeTaskRepository.removeExclusionRegion(taskId)
     }
 
     /**
@@ -996,16 +992,16 @@
     }
 
     /**
-     * Adds a listener to track changes to desktop task corners
+     * Adds a listener to track changes to desktop task gesture exclusion regions
      *
      * @param listener the listener to add.
      * @param callbackExecutor the executor to call the listener on.
      */
-    fun setTaskCornerListener(
+    fun setTaskRegionListener(
             listener: Consumer<Region>,
             callbackExecutor: Executor
     ) {
-        desktopModeTaskRepository.setTaskCornerListener(listener, callbackExecutor)
+        desktopModeTaskRepository.setExclusionRegionListener(listener, callbackExecutor)
     }
 
     private fun dump(pw: PrintWriter, prefix: String) {
@@ -1031,7 +1027,7 @@
                 callbackExecutor: Executor
         ) {
             mainExecutor.execute {
-                this@DesktopTasksController.setTaskCornerListener(listener, callbackExecutor)
+                this@DesktopTasksController.setTaskRegionListener(listener, callbackExecutor)
             }
         }
     }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index dc6dc79..016771d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -171,13 +171,14 @@
             return false;
         }
         final RecentsController controller = mControllers.get(controllerIdx);
-        Transitions.setRunningRemoteTransitionDelegate(mAnimApp);
+        final IApplicationThread animApp = mAnimApp;
         mAnimApp = null;
         if (!controller.start(info, startTransaction, finishTransaction, finishCallback)) {
             ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                     "RecentsTransitionHandler.startAnimation: failed to start animation");
             return false;
         }
+        Transitions.setRunningRemoteTransitionDelegate(animApp);
         return true;
     }
 
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
index f90ee58..991b699 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
@@ -43,6 +43,7 @@
 import android.app.ActivityTaskManager;
 import android.app.PendingIntent;
 import android.app.TaskInfo;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ShortcutInfo;
@@ -814,21 +815,22 @@
         final String packageName1 = SplitScreenUtils.getPackageName(intent);
         final String packageName2 = getPackageName(reverseSplitPosition(position));
         final int userId2 = getUserId(reverseSplitPosition(position));
+        final ComponentName component = intent.getIntent().getComponent();
+
+        // To prevent accumulating large number of instances in the background, reuse task
+        // in the background. If we don't explicitly reuse, new may be created even if the app
+        // isn't multi-instance because WM won't automatically remove/reuse the previous instance
+        final ActivityManager.RecentTaskInfo taskInfo = mRecentTasksOptional
+                .map(recentTasks -> recentTasks.findTaskInBackground(component, userId1))
+                .orElse(null);
+        if (taskInfo != null) {
+            startTask(taskInfo.taskId, position, options);
+            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
+                    "Start task in background");
+            return;
+        }
         if (samePackage(packageName1, packageName2, userId1, userId2)) {
             if (supportMultiInstancesSplit(packageName1)) {
-                // To prevent accumulating large number of instances in the background, reuse task
-                // in the background with priority.
-                final ActivityManager.RecentTaskInfo taskInfo = mRecentTasksOptional
-                        .map(recentTasks -> recentTasks.findTaskInBackground(
-                                intent.getIntent().getComponent(), userId1))
-                        .orElse(null);
-                if (taskInfo != null) {
-                    startTask(taskInfo.taskId, position, options);
-                    ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
-                            "Start task in background");
-                    return;
-                }
-
                 // Flag with MULTIPLE_TASK if this is launching the same activity into both sides of
                 // the split and there is no reusable background task.
                 fillInIntent.addFlags(FLAG_ACTIVITY_MULTIPLE_TASK);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
index 20c4d5a..e7e1e0a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SnapshotWindowCreator.java
@@ -35,13 +35,14 @@
     void makeTaskSnapshotWindow(StartingWindowInfo startingWindowInfo, TaskSnapshot snapshot) {
         final int taskId = startingWindowInfo.taskInfo.taskId;
         // Remove any existing starting window for this task before adding.
-        mStartingWindowRecordManager.removeWindow(taskId, true);
+        mStartingWindowRecordManager.removeWindow(taskId);
         final TaskSnapshotWindow surface = TaskSnapshotWindow.create(startingWindowInfo,
                 startingWindowInfo.appToken, snapshot, mMainExecutor,
-                () -> mStartingWindowRecordManager.removeWindow(taskId, true));
+                () -> mStartingWindowRecordManager.removeWindow(taskId));
         if (surface != null) {
             final SnapshotWindowRecord tView = new SnapshotWindowRecord(surface,
-                    startingWindowInfo.taskInfo.topActivityType, mMainExecutor);
+                    startingWindowInfo.taskInfo.topActivityType, mMainExecutor,
+                    taskId, mStartingWindowRecordManager);
             mStartingWindowRecordManager.addRecord(taskId, tView);
         }
     }
@@ -50,8 +51,9 @@
         private final TaskSnapshotWindow mTaskSnapshotWindow;
 
         SnapshotWindowRecord(TaskSnapshotWindow taskSnapshotWindow,
-                int activityType, ShellExecutor removeExecutor) {
-            super(activityType, removeExecutor);
+                int activityType, ShellExecutor removeExecutor, int id,
+                StartingSurfaceDrawer.StartingWindowRecordManager recordManager) {
+            super(activityType, removeExecutor, id, recordManager);
             mTaskSnapshotWindow = taskSnapshotWindow;
             mBGColor = mTaskSnapshotWindow.getBackgroundColor();
         }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
index 20da877..cb76044 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java
@@ -20,6 +20,7 @@
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_SPLASHSCREEN_EXIT_ANIM;
 
 import android.animation.Animator;
+import android.annotation.IntDef;
 import android.content.Context;
 import android.graphics.Rect;
 import android.util.Slog;
@@ -46,6 +47,8 @@
     private final int mIconFadeOutDuration;
     private final int mAppRevealDelay;
     private final int mAppRevealDuration;
+    @ExitAnimationType
+    private final int mAnimationType;
     private final int mAnimationDuration;
     private final float mIconStartAlpha;
     private final float mBrandingStartAlpha;
@@ -55,6 +58,24 @@
 
     private Runnable mFinishCallback;
 
+    /**
+    * This splash screen exit animation type uses a radial vanish to hide
+    * the starting window and slides up the main window content.
+    */
+    private static final int TYPE_RADIAL_VANISH_SLIDE_UP = 0;
+
+    /**
+    * This splash screen exit animation type fades out the starting window
+    * to reveal the main window content.
+    */
+    private static final int TYPE_FADE_OUT = 1;
+
+    @IntDef(prefix = { "TYPE_" }, value = {
+        TYPE_RADIAL_VANISH_SLIDE_UP,
+        TYPE_FADE_OUT,
+    })
+    private @interface ExitAnimationType {}
+
     SplashScreenExitAnimation(Context context, SplashScreenView view, SurfaceControl leash,
             Rect frame, int mainWindowShiftLength, TransactionPool pool, Runnable handleFinish,
             float roundedCornerRadius) {
@@ -91,6 +112,8 @@
         }
         mAppRevealDuration = context.getResources().getInteger(
                 R.integer.starting_window_app_reveal_anim_duration);
+        mAnimationType = context.getResources().getInteger(
+                R.integer.starting_window_exit_animation_type);
         mAnimationDuration = Math.max(mIconFadeOutDuration, mAppRevealDelay + mAppRevealDuration);
         mMainWindowShiftLength = mainWindowShiftLength;
         mFinishCallback = handleFinish;
@@ -98,10 +121,15 @@
     }
 
     void startAnimations() {
-        SplashScreenExitAnimationUtils.startAnimations(mSplashScreenView, mFirstWindowSurface,
-                mMainWindowShiftLength, mTransactionPool, mFirstWindowFrame, mAnimationDuration,
-                mIconFadeOutDuration, mIconStartAlpha, mBrandingStartAlpha, mAppRevealDelay,
-                mAppRevealDuration, this, mRoundedCornerRadius);
+        if (mAnimationType == TYPE_FADE_OUT) {
+            SplashScreenExitAnimationUtils.startFadeOutAnimation(mSplashScreenView,
+                    mAnimationDuration, this);
+        } else {
+            SplashScreenExitAnimationUtils.startAnimations(mSplashScreenView, mFirstWindowSurface,
+                    mMainWindowShiftLength, mTransactionPool, mFirstWindowFrame, mAnimationDuration,
+                    mIconFadeOutDuration, mIconStartAlpha, mBrandingStartAlpha, mAppRevealDelay,
+                    mAppRevealDuration, this, mRoundedCornerRadius);
+        }
     }
 
     private void reset() {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
index a7e4385..64f09a7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimationUtils.java
@@ -71,11 +71,10 @@
             int iconFadeOutDuration, float iconStartAlpha, float brandingStartAlpha,
             int appRevealDelay, int appRevealDuration, Animator.AnimatorListener animatorListener,
             float roundedCornerRadius) {
-        ValueAnimator animator =
-                createAnimator(splashScreenView, firstWindowSurface, mainWindowShiftLength,
-                        transactionPool, firstWindowFrame, animationDuration, iconFadeOutDuration,
-                        iconStartAlpha, brandingStartAlpha, appRevealDelay, appRevealDuration,
-                        animatorListener, roundedCornerRadius);
+        ValueAnimator animator = createRadialVanishSlideUpAnimator(splashScreenView,
+                firstWindowSurface, mainWindowShiftLength, transactionPool, firstWindowFrame,
+                animationDuration, iconFadeOutDuration, iconStartAlpha, brandingStartAlpha,
+                appRevealDelay, appRevealDuration, animatorListener, roundedCornerRadius);
         animator.start();
     }
 
@@ -99,7 +98,7 @@
      * Creates the animator to fade out the icon, reveal the app, and shift up main window.
      * @hide
      */
-    private static ValueAnimator createAnimator(ViewGroup splashScreenView,
+    private static ValueAnimator createRadialVanishSlideUpAnimator(ViewGroup splashScreenView,
             SurfaceControl firstWindowSurface, int mMainWindowShiftLength,
             TransactionPool transactionPool, Rect firstWindowFrame, int animationDuration,
             int iconFadeOutDuration, float iconStartAlpha, float brandingStartAlpha,
@@ -210,6 +209,20 @@
         return nightMode == Configuration.UI_MODE_NIGHT_YES;
     }
 
+    static void startFadeOutAnimation(ViewGroup splashScreenView,
+            int animationDuration, Animator.AnimatorListener animatorListener) {
+        final ValueAnimator animator = ValueAnimator.ofFloat(1f, 0f);
+        animator.setDuration(animationDuration);
+        animator.setInterpolator(Interpolators.LINEAR);
+        animator.addUpdateListener(animation -> {
+            splashScreenView.setAlpha((float) animation.getAnimatedValue());
+        });
+        if (animatorListener != null) {
+            animator.addListener(animatorListener);
+        }
+        animator.start();
+    }
+
     /**
      * View which creates a circular reveal of the underlying view.
      * @hide
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
index 4cfbbd9..31fc98b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenWindowCreator.java
@@ -358,7 +358,7 @@
             }
         }
         if (shouldSaveView) {
-            mStartingWindowRecordManager.removeWindow(taskId, true);
+            mStartingWindowRecordManager.removeWindow(taskId);
             saveSplashScreenRecord(appToken, taskId, view, suggestType);
         }
         return shouldSaveView;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
index 7cbf263..e2be153 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java
@@ -188,7 +188,7 @@
         final SnapshotRecord record = sRecord instanceof SnapshotRecord
                 ? (SnapshotRecord) sRecord : null;
         if (record != null && record.hasImeSurface()) {
-            records.removeWindow(taskId, true);
+            records.removeWindow(taskId);
         }
     }
 
@@ -256,10 +256,15 @@
 
         @WindowConfiguration.ActivityType protected final int mActivityType;
         protected final ShellExecutor mRemoveExecutor;
+        private final int mTaskId;
+        private final StartingWindowRecordManager mRecordManager;
 
-        SnapshotRecord(int activityType, ShellExecutor removeExecutor) {
+        SnapshotRecord(int activityType, ShellExecutor removeExecutor, int taskId,
+                StartingWindowRecordManager recordManager) {
             mActivityType = activityType;
             mRemoveExecutor = removeExecutor;
+            mTaskId = taskId;
+            mRecordManager = recordManager;
         }
 
         @Override
@@ -301,6 +306,7 @@
         @CallSuper
         protected void removeImmediately() {
             mRemoveExecutor.removeCallbacks(mScheduledRunnable);
+            mRecordManager.onRecordRemoved(mTaskId);
         }
     }
 
@@ -316,7 +322,7 @@
                 taskIds[i] = mStartingWindowRecords.keyAt(i);
             }
             for (int i = taskSize - 1; i >= 0; --i) {
-                removeWindow(taskIds[i], true);
+                removeWindow(taskIds[i]);
             }
         }
 
@@ -335,9 +341,13 @@
             }
         }
 
-        void removeWindow(int taskId, boolean immediately) {
+        void removeWindow(int taskId) {
             mTmpRemovalInfo.taskId = taskId;
-            removeWindow(mTmpRemovalInfo, immediately);
+            removeWindow(mTmpRemovalInfo, true/* immediately */);
+        }
+
+        void onRecordRemoved(int taskId) {
+            mStartingWindowRecords.remove(taskId);
         }
 
         StartingWindowRecord getRecord(int taskId) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
index 1445478..fed2f34 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
@@ -92,7 +92,8 @@
 
         final SnapshotWindowRecord record = new SnapshotWindowRecord(mViewHost, wlw.mChildSurface,
                 taskDescription.getBackgroundColor(), snapshot.hasImeSurface(),
-                runningTaskInfo.topActivityType, removeExecutor);
+                runningTaskInfo.topActivityType, removeExecutor,
+                taskId, mStartingWindowRecordManager);
         mStartingWindowRecordManager.addRecord(taskId, record);
         info.notifyAddComplete(wlw.mChildSurface);
     }
@@ -104,8 +105,9 @@
 
         SnapshotWindowRecord(SurfaceControlViewHost viewHost, SurfaceControl childSurface,
                 int bgColor, boolean hasImeSurface, int activityType,
-                ShellExecutor removeExecutor) {
-            super(activityType, removeExecutor);
+                ShellExecutor removeExecutor, int id,
+                StartingSurfaceDrawer.StartingWindowRecordManager recordManager) {
+            super(activityType, removeExecutor, id, recordManager);
             mViewHost = viewHost;
             mChildSurface = childSurface;
             mBGColor = bgColor;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
index 87ceaa4..00f6a1c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
@@ -19,10 +19,10 @@
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
 import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.view.Display.DEFAULT_DISPLAY;
 import static android.view.WindowManager.TRANSIT_CHANGE;
 import static android.view.WindowManager.TRANSIT_TO_BACK;
 import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
-
 import static com.android.wm.shell.common.split.SplitScreenConstants.FLAG_IS_DIVIDER_BAR;
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UNDEFINED;
 import static com.android.wm.shell.pip.PipAnimationController.ANIM_TYPE_ALPHA;
@@ -239,9 +239,14 @@
 
     @Override
     public Transitions.TransitionHandler handleRecentsRequest(WindowContainerTransaction outWCT) {
-        if (mRecentsHandler != null && (mSplitHandler.isSplitScreenVisible()
-                || DesktopModeStatus.isEnabled())) {
-            return this;
+        if (mRecentsHandler != null) {
+            if (mSplitHandler.isSplitScreenVisible()) {
+                return this;
+            } else if (mDesktopTasksController != null
+                    // Check on the default display. Recents/gesture nav is only available there
+                    && mDesktopTasksController.getVisibleTaskCount(DEFAULT_DISPLAY) > 0) {
+                return this;
+            }
         }
         return null;
     }
@@ -662,7 +667,6 @@
         if (!consumed) {
             return false;
         }
-        //Sync desktop mode state (proto 2)
         if (mDesktopTasksController != null) {
             mDesktopTasksController.syncSurfaceState(info, finishTransaction);
             return true;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
index d310ae3..7df658e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
@@ -37,12 +37,8 @@
 import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS;
 import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_UNSPECIFIED;
 import static android.view.WindowManager.TRANSIT_CHANGE;
-import static android.view.WindowManager.TRANSIT_CLOSE;
 import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
-import static android.view.WindowManager.TRANSIT_OPEN;
 import static android.view.WindowManager.TRANSIT_RELAUNCH;
-import static android.view.WindowManager.TRANSIT_TO_FRONT;
-import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW;
 import static android.window.TransitionInfo.FLAG_BACK_GESTURE_ANIMATED;
 import static android.window.TransitionInfo.FLAG_CROSS_PROFILE_OWNER_THUMBNAIL;
 import static android.window.TransitionInfo.FLAG_CROSS_PROFILE_WORK_THUMBNAIL;
@@ -338,10 +334,6 @@
         boolean isDisplayRotationAnimationStarted = false;
         final boolean isDreamTransition = isDreamTransition(info);
         final boolean isOnlyTranslucent = isOnlyTranslucent(info);
-        final boolean isActivityReplace = checkActivityReplacement(info, startTransaction);
-        // Some patterns (eg. activity "replacement") require us to re-interpret the type
-        @WindowManager.TransitionType final int transitType =
-                isActivityReplace ? TRANSIT_OPEN : info.getType();
 
         for (int i = info.getChanges().size() - 1; i >= 0; --i) {
             final TransitionInfo.Change change = info.getChanges().get(i);
@@ -438,8 +430,7 @@
             // Don't animate anything that isn't independent.
             if (!TransitionInfo.isIndependent(change, info)) continue;
 
-            Animation a = loadAnimation(transitType, info, change, wallpaperTransit,
-                    isDreamTransition);
+            Animation a = loadAnimation(info, change, wallpaperTransit, isDreamTransition);
             if (a != null) {
                 if (isTask) {
                     final boolean isTranslucent = (change.getFlags() & FLAG_TRANSLUCENT) != 0;
@@ -613,53 +604,6 @@
         return (translucentOpen + translucentClose) > 0;
     }
 
-    /**
-     * Checks for an edge-case where an activity calls finish() followed immediately by
-     * startActivity() to "replace" itself. If in this case, it will swap the layer of the
-     * close/open activities and return `true`. This way, we pretend like we are just "opening"
-     * the new activity.
-     */
-    private static boolean checkActivityReplacement(@NonNull TransitionInfo info,
-            SurfaceControl.Transaction t) {
-        if (info.getType() != TRANSIT_CLOSE) {
-            return false;
-        }
-        int closing = -1;
-        int opening = -1;
-        for (int i = info.getChanges().size() - 1; i >= 0; --i) {
-            final TransitionInfo.Change change = info.getChanges().get(i);
-            if ((change.getTaskInfo() != null || change.hasFlags(FLAG_IS_DISPLAY))
-                    && !TransitionUtil.isOrderOnly(change)) {
-                // This isn't an activity-level transition.
-                return false;
-            }
-            if (change.getTaskInfo() != null
-                    && change.hasFlags(FLAG_IS_DISPLAY | FLAGS_IS_NON_APP_WINDOW)) {
-                // Ignore non-activity containers.
-                continue;
-            }
-            if (TransitionUtil.isClosingType(change.getMode())) {
-                closing = i;
-            } else if (change.getMode() == TRANSIT_OPEN) {
-                // OPEN implies that it is a new launch. If going "back" the opening app will be
-                // TO_FRONT
-                opening = i;
-            } else if (change.getMode() == TRANSIT_TO_FRONT) {
-                // Normal "going back", so not a replacement.
-                return false;
-            }
-        }
-        if (closing < 0 || opening < 0) {
-            return false;
-        }
-        // Swap the opening and closing z-orders since we're swapping the transit type.
-        final int numChanges = info.getChanges().size();
-        final int zSplitLine = numChanges + 1;
-        t.setLayer(info.getChanges().get(opening).getLeash(), zSplitLine + numChanges - opening);
-        t.setLayer(info.getChanges().get(closing).getLeash(), zSplitLine - closing);
-        return true;
-    }
-
     @Override
     public void mergeAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info,
             @NonNull SurfaceControl.Transaction t, @NonNull IBinder mergeTarget,
@@ -712,11 +656,12 @@
     }
 
     @Nullable
-    private Animation loadAnimation(int type, @NonNull TransitionInfo info,
+    private Animation loadAnimation(@NonNull TransitionInfo info,
             @NonNull TransitionInfo.Change change, int wallpaperTransit,
             boolean isDreamTransition) {
         Animation a;
 
+        final int type = info.getType();
         final int flags = info.getFlags();
         final int changeMode = change.getMode();
         final int changeFlags = change.getFlags();
@@ -771,8 +716,8 @@
             // If there's a scene-transition, then jump-cut.
             return null;
         } else {
-            a = loadAttributeAnimation(type, info, change, wallpaperTransit, mTransitionAnimation,
-                    isDreamTransition);
+            a = loadAttributeAnimation(
+                    info, change, wallpaperTransit, mTransitionAnimation, isDreamTransition);
         }
 
         if (a != null) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
index bbf67a6..a90edf2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/RemoteTransitionHandler.java
@@ -137,7 +137,6 @@
                 });
             }
         };
-        Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
         try {
             // If the remote is actually in the same process, then make a copy of parameters since
             // remote impls assume that they have to clean-up native references.
@@ -149,6 +148,7 @@
             remote.getRemoteTransition().startAnimation(transition, remoteInfo, remoteStartT, cb);
             // assume that remote will apply the start transaction.
             startTransaction.clear();
+            Transitions.setRunningRemoteTransitionDelegate(remote.getAppThread());
         } catch (RemoteException e) {
             Log.e(Transitions.TAG, "Error running remote transition.", e);
             unhandleDeath(remote.asBinder(), finishCallback);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
index c99911d..d07d2b7b6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
@@ -45,7 +45,6 @@
 import android.graphics.Shader;
 import android.view.Surface;
 import android.view.SurfaceControl;
-import android.view.WindowManager;
 import android.view.animation.Animation;
 import android.view.animation.Transformation;
 import android.window.ScreenCapture;
@@ -62,10 +61,10 @@
 
     /** Loads the animation that is defined through attribute id for the given transition. */
     @Nullable
-    public static Animation loadAttributeAnimation(@WindowManager.TransitionType int type,
-            @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change,
-            int wallpaperTransit, @NonNull TransitionAnimation transitionAnimation,
-            boolean isDreamTransition) {
+    public static Animation loadAttributeAnimation(@NonNull TransitionInfo info,
+            @NonNull TransitionInfo.Change change, int wallpaperTransit,
+            @NonNull TransitionAnimation transitionAnimation, boolean isDreamTransition) {
+        final int type = info.getType();
         final int changeMode = change.getMode();
         final int changeFlags = change.getFlags();
         final boolean enter = TransitionUtil.isOpeningType(changeMode);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index abd2ad4..026d0cd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -21,7 +21,6 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
 import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
 import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
-
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
 import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT;
 import static com.android.wm.shell.desktopmode.EnterDesktopTaskTransitionHandler.FINAL_FREEFORM_SCALE;
@@ -79,7 +78,7 @@
 import com.android.wm.shell.sysui.ShellController;
 import com.android.wm.shell.sysui.ShellInit;
 import com.android.wm.shell.transition.Transitions;
-import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.TaskCornersListener;
+import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.ExclusionRegionListener;
 
 import java.util.Optional;
 import java.util.function.Supplier;
@@ -106,7 +105,8 @@
 
     private SparseArray<EventReceiver> mEventReceiversByDisplay = new SparseArray<>();
 
-    private final TaskCornersListener mCornersListener = new TaskCornersListenerImpl();
+    private final ExclusionRegionListener mExclusionRegionListener =
+            new ExclusionRegionListenerImpl();
 
     private final SparseArray<DesktopModeWindowDecoration> mWindowDecorByTaskId =
             new SparseArray<>();
@@ -920,7 +920,7 @@
 
         windowDecoration.setCaptionListeners(
                 touchEventListener, touchEventListener, touchEventListener);
-        windowDecoration.setCornersListener(mCornersListener);
+        windowDecoration.setExclusionRegionListener(mExclusionRegionListener);
         windowDecoration.setDragPositioningCallback(dragPositioningCallback);
         windowDecoration.setDragDetector(touchEventListener.mDragDetector);
         windowDecoration.relayout(taskInfo, startT, finishT,
@@ -958,17 +958,17 @@
         }
     }
 
-    private class TaskCornersListenerImpl
-            implements DesktopModeWindowDecoration.TaskCornersListener {
+    private class ExclusionRegionListenerImpl
+            implements ExclusionRegionListener {
 
         @Override
-        public void onTaskCornersChanged(int taskId, Region corner) {
-            mDesktopTasksController.ifPresent(d -> d.onTaskCornersChanged(taskId, corner));
+        public void onExclusionRegionChanged(int taskId, Region region) {
+            mDesktopTasksController.ifPresent(d -> d.onExclusionRegionChanged(taskId, region));
         }
 
         @Override
-        public void onTaskCornersRemoved(int taskId) {
-            mDesktopTasksController.ifPresent(d -> d.removeCornersForTask(taskId));
+        public void onExclusionRegionDismissed(int taskId) {
+            mDesktopTasksController.ifPresent(d -> d.removeExclusionRegionForTask(taskId));
         }
     }
 
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index e954f3b..dbff20e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -92,7 +92,7 @@
     private Drawable mAppIcon;
     private CharSequence mAppName;
 
-    private TaskCornersListener mCornersListener;
+    private ExclusionRegionListener mExclusionRegionListener;
 
     private final Set<IBinder> mTransitionsPausingRelayout = new HashSet<>();
     private int mRelayoutBlock;
@@ -128,8 +128,8 @@
         mOnCaptionLongClickListener = onLongClickListener;
     }
 
-    void setCornersListener(TaskCornersListener cornersListener) {
-        mCornersListener = cornersListener;
+    void setExclusionRegionListener(ExclusionRegionListener exclusionRegionListener) {
+        mExclusionRegionListener = exclusionRegionListener;
     }
 
     void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) {
@@ -229,6 +229,10 @@
         }
 
         if (!isDragResizeable) {
+            if (!mTaskInfo.positionInParent.equals(mPositionInParent)) {
+                // We still want to track caption bar's exclusion region on a non-resizeable task.
+                updateExclusionRegion();
+            }
             closeDragResizeListener();
             return;
         }
@@ -256,13 +260,13 @@
         final int resize_corner = mResult.mRootView.getResources()
                 .getDimensionPixelSize(R.dimen.freeform_resize_corner);
 
-        // If either task geometry or position have changed, update this task's cornersListener
+        // If either task geometry or position have changed, update this task's
+        // exclusion region listener
         if (mDragResizeListener.setGeometry(
                 mResult.mWidth, mResult.mHeight, resize_handle, resize_corner, touchSlop)
                 || !mTaskInfo.positionInParent.equals(mPositionInParent)) {
-            mCornersListener.onTaskCornersChanged(mTaskInfo.taskId, getGlobalCornersRegion());
+            updateExclusionRegion();
         }
-        mPositionInParent.set(mTaskInfo.positionInParent);
 
         if (isMaximizeMenuActive()) {
             if (!mTaskInfo.isVisible()) {
@@ -282,8 +286,7 @@
 
         final int displayWidth = displayLayout.width();
         final int displayHeight = displayLayout.height();
-        final int captionHeight = loadDimensionPixelSize(
-                resources, R.dimen.freeform_decor_caption_height);
+        final int captionHeight = getCaptionHeight();
 
         final ImageButton maximizeWindowButton =
                 mResult.mRootView.findViewById(R.id.maximize_window);
@@ -537,7 +540,7 @@
     public void close() {
         closeDragResizeListener();
         closeHandleMenu();
-        mCornersListener.onTaskCornersRemoved(mTaskInfo.taskId);
+        mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId);
         disposeResizeVeil();
         super.close();
     }
@@ -548,13 +551,32 @@
                 : R.layout.desktop_mode_focused_window_decor;
     }
 
+    private void updatePositionInParent() {
+        mPositionInParent.set(mTaskInfo.positionInParent);
+    }
+
+    private void updateExclusionRegion() {
+        // An outdated position in parent is one reason for this to be called; update it here.
+        updatePositionInParent();
+        mExclusionRegionListener
+                .onExclusionRegionChanged(mTaskInfo.taskId, getGlobalExclusionRegion());
+    }
+
     /**
-     * Create a new region out of the corner rects of this task.
+     * Create a new exclusion region from the corner rects (if resizeable) and caption bounds
+     * of this task.
      */
-    Region getGlobalCornersRegion() {
-        Region cornersRegion = mDragResizeListener.getCornersRegion();
-        cornersRegion.translate(mPositionInParent.x, mPositionInParent.y);
-        return cornersRegion;
+    private Region getGlobalExclusionRegion() {
+        Region exclusionRegion;
+        if (mTaskInfo.isResizeable) {
+            exclusionRegion = mDragResizeListener.getCornersRegion();
+        } else {
+            exclusionRegion = new Region();
+        }
+        exclusionRegion.union(new Rect(0, 0, mResult.mWidth,
+                getCaptionHeight()));
+        exclusionRegion.translate(mPositionInParent.x, mPositionInParent.y);
+        return exclusionRegion;
     }
 
     /**
@@ -572,6 +594,10 @@
         return R.dimen.freeform_decor_caption_height;
     }
 
+    private int getCaptionHeight() {
+        return loadDimensionPixelSize(mContext.getResources(), getCaptionHeightId());
+    }
+
     /**
      * Add transition to mTransitionsPausingRelayout
      */
@@ -626,12 +652,14 @@
         }
     }
 
-    interface TaskCornersListener {
-        /** Inform the implementing class of this task's change in corner resize handles */
-        void onTaskCornersChanged(int taskId, Region corner);
+    interface ExclusionRegionListener {
+        /** Inform the implementing class of this task's change in region resize handles */
+        void onExclusionRegionChanged(int taskId, Region region);
 
-        /** Inform the implementing class that this task no longer needs its corners tracked,
-         * likely due to it closing. */
-        void onTaskCornersRemoved(int taskId);
+        /**
+         * Inform the implementing class that this task no longer needs an exclusion region,
+         * likely due to it closing.
+         */
+        void onExclusionRegionDismissed(int taskId);
     }
 }
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
index bfce72b..09fc3da 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ResizeVeil.java
@@ -49,11 +49,13 @@
     private final Supplier<SurfaceControl.Builder> mSurfaceControlBuilderSupplier;
     private final Supplier<SurfaceControl.Transaction> mSurfaceControlTransactionSupplier;
     private final Drawable mAppIcon;
+    private ImageView mIconView;
     private SurfaceControl mParentSurface;
     private SurfaceControl mVeilSurface;
     private final RunningTaskInfo mTaskInfo;
     private SurfaceControlViewHost mViewHost;
     private final Display mDisplay;
+    private ValueAnimator mVeilAnimator;
 
     public ResizeVeil(Context context, Drawable appIcon, RunningTaskInfo taskInfo,
             Supplier<SurfaceControl.Builder> surfaceControlBuilderSupplier, Display display,
@@ -97,8 +99,8 @@
         mViewHost = new SurfaceControlViewHost(mContext, mDisplay, windowManager, "ResizeVeil");
         mViewHost.setView(v, lp);
 
-        final ImageView appIcon = mViewHost.getView().findViewById(R.id.veil_application_icon);
-        appIcon.setImageDrawable(mAppIcon);
+        mIconView = mViewHost.getView().findViewById(R.id.veil_application_icon);
+        mIconView.setImageDrawable(mAppIcon);
     }
 
     /**
@@ -123,17 +125,27 @@
 
         relayout(taskBounds, t);
         if (fadeIn) {
-            final ValueAnimator animator = new ValueAnimator();
-            animator.setFloatValues(0f, 1f);
-            animator.setDuration(RESIZE_ALPHA_DURATION);
-            animator.addUpdateListener(animation -> {
-                t.setAlpha(mVeilSurface, animator.getAnimatedFraction());
+            mVeilAnimator = new ValueAnimator();
+            mVeilAnimator.setFloatValues(0f, 1f);
+            mVeilAnimator.setDuration(RESIZE_ALPHA_DURATION);
+            mVeilAnimator.addUpdateListener(animation -> {
+                t.setAlpha(mVeilSurface, mVeilAnimator.getAnimatedFraction());
                 t.apply();
             });
 
+            final ValueAnimator iconAnimator = new ValueAnimator();
+            iconAnimator.setFloatValues(0f, 1f);
+            iconAnimator.setDuration(RESIZE_ALPHA_DURATION);
+            iconAnimator.addUpdateListener(animation -> {
+                mIconView.setAlpha(animation.getAnimatedFraction());
+            });
+
             t.show(mVeilSurface)
                     .addTransactionCommittedListener(
-                            mContext.getMainExecutor(), () -> animator.start())
+                            mContext.getMainExecutor(), () -> {
+                                mVeilAnimator.start();
+                                iconAnimator.start();
+                            })
                     .setAlpha(mVeilSurface, 0);
         } else {
             // Show the veil immediately at full opacity.
@@ -172,11 +184,17 @@
 
     /**
      * Calls relayout to update task and veil bounds.
+     * Finishes veil fade in if animation is currently running; this is to prevent empty space
+     * being visible behind the transparent veil during a fast resize.
      *
      * @param t a transaction to be applied in sync with the veil draw.
      * @param newBounds bounds to update veil to.
      */
     public void updateResizeVeil(SurfaceControl.Transaction t, Rect newBounds) {
+        if (mVeilAnimator != null && mVeilAnimator.isStarted()) {
+            // TODO(b/300145351): Investigate why ValueAnimator#end does not work here.
+            mVeilAnimator.setCurrentPlayTime(RESIZE_ALPHA_DURATION);
+        }
         relayout(newBounds, t);
         mViewHost.getView().getViewRootImpl().applyTransactionOnDraw(t);
     }
diff --git a/libs/WindowManager/Shell/tests/flicker/Android.bp b/libs/WindowManager/Shell/tests/flicker/Android.bp
index eb650ca..6fd3354 100644
--- a/libs/WindowManager/Shell/tests/flicker/Android.bp
+++ b/libs/WindowManager/Shell/tests/flicker/Android.bp
@@ -44,6 +44,16 @@
 }
 
 filegroup {
+    name: "WMShellFlickerTestsPipCommon-src",
+    srcs: ["src/com/android/wm/shell/flicker/pip/common/*.kt"],
+}
+
+filegroup {
+    name: "WMShellFlickerTestsPipApps-src",
+    srcs: ["src/com/android/wm/shell/flicker/pip/apps/*.kt"],
+}
+
+filegroup {
     name: "WMShellFlickerTestsSplitScreenBase-src",
     srcs: [
         "src/com/android/wm/shell/flicker/splitscreen/benchmark/*.kt",
@@ -152,6 +162,8 @@
     exclude_srcs: [
         ":WMShellFlickerTestsBubbles-src",
         ":WMShellFlickerTestsPip-src",
+        ":WMShellFlickerTestsPipCommon-src",
+        ":WMShellFlickerTestsPipApps-src",
         ":WMShellFlickerTestsSplitScreenGroup1-src",
         ":WMShellFlickerTestsSplitScreenGroup2-src",
         ":WMShellFlickerTestsSplitScreenBase-src",
@@ -181,6 +193,20 @@
     srcs: [
         ":WMShellFlickerTestsBase-src",
         ":WMShellFlickerTestsPip-src",
+        ":WMShellFlickerTestsPipCommon-src",
+    ],
+}
+
+android_test {
+    name: "WMShellFlickerTestsPipApps",
+    defaults: ["WMShellFlickerTestsDefault"],
+    additional_manifests: ["manifests/AndroidManifestPip.xml"],
+    package_name: "com.android.wm.shell.flicker.pip.apps",
+    instrumentation_target_package: "com.android.wm.shell.flicker.pip.apps",
+    srcs: [
+        ":WMShellFlickerTestsBase-src",
+        ":WMShellFlickerTestsPipApps-src",
+        ":WMShellFlickerTestsPipCommon-src",
     ],
 }
 
diff --git a/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml b/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
index 57df4e8..b13e9a2 100644
--- a/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
+++ b/libs/WindowManager/Shell/tests/flicker/AndroidTestTemplate.xml
@@ -60,9 +60,9 @@
     <!-- Enable mocking GPS location by the test app -->
     <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
         <option name="run-command"
-                value="appops set com.android.wm.shell.flicker.pip android:mock_location allow"/>
+                value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location allow"/>
         <option name="teardown-command"
-                value="appops set com.android.wm.shell.flicker.pip android:mock_location deny"/>
+                value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location deny"/>
     </target_preparer>
 
     <!-- Needed for pushing the trace config file -->
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
index ca28f52..9256725 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
@@ -21,6 +21,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ClosePipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
index 4da628c..002c019 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
@@ -20,6 +20,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ClosePipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
index e0b18de..6dd68b0 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
@@ -20,6 +20,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
 import org.junit.Assume
 import org.junit.FixMethodOrder
 import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
index b4cedd9..8207b85 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
@@ -32,8 +32,9 @@
 import com.android.server.wm.flicker.helpers.FixedOrientationAppHelper
 import com.android.server.wm.flicker.testapp.ActivityOptions.Pip.ACTION_ENTER_PIP
 import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
+import com.android.wm.shell.flicker.pip.common.PipTransition
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
 import org.junit.Assume
 import org.junit.Before
 import org.junit.FixMethodOrder
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
index f9efffe..cc94367 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
@@ -19,6 +19,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
 import org.junit.FixMethodOrder
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
index c4e63c3..7da4429 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
@@ -19,6 +19,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
 import org.junit.FixMethodOrder
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
index 839bbd4..0ad9e4c 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
@@ -19,6 +19,7 @@
 import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
 import org.junit.FixMethodOrder
 import org.junit.runner.RunWith
 import org.junit.runners.MethodSorters
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
index ea67e3d..89a6c93 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
@@ -23,6 +23,7 @@
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
index 0f30cef..8978af0 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
@@ -22,6 +22,7 @@
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
index 421ad75..4776206 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
@@ -21,6 +21,7 @@
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
 import com.android.wm.shell.flicker.utils.Direction
 import org.junit.FixMethodOrder
 import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
index c10860a..425cbfaff 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
@@ -27,6 +27,7 @@
 import android.tools.device.helpers.WindowUtils
 import com.android.server.wm.flicker.helpers.ImeAppHelper
 import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
index 992f1bc..18f30d9 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
@@ -21,6 +21,7 @@
 import android.tools.device.flicker.legacy.FlickerBuilder
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
 import com.android.wm.shell.flicker.utils.Direction
 import org.junit.FixMethodOrder
 import org.junit.Test
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
index 0c6fc56..c7f2786 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
@@ -23,6 +23,7 @@
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
 import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
index 43e7696..cabc1cc 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
@@ -27,6 +27,7 @@
 import androidx.test.filters.RequiresDevice
 import com.android.server.wm.flicker.helpers.setRotation
 import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
index 0295741..6748626 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
@@ -23,6 +23,7 @@
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
 import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
index a236126..1f69847 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
@@ -30,7 +30,8 @@
 import androidx.test.filters.RequiresDevice
 import com.android.server.wm.flicker.testapp.ActivityOptions
 import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
-import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
+import com.android.wm.shell.flicker.pip.common.PipTransition
+import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
 import org.junit.Assume
 import org.junit.Before
 import org.junit.FixMethodOrder
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
index e588f87..308ece4 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
@@ -25,6 +25,7 @@
 import android.tools.device.helpers.WindowUtils
 import com.android.server.wm.flicker.helpers.SimpleAppHelper
 import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.flicker.pip.common.PipTransition
 import org.junit.FixMethodOrder
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt
similarity index 98%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt
index 9a28439..fb6c093 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/AppsEnterPipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.apps
 
 import android.platform.test.annotations.Postsubmit
 import android.tools.common.Rotation
@@ -22,6 +22,7 @@
 import android.tools.device.apphelpers.StandardAppHelper
 import android.tools.device.flicker.legacy.LegacyFlickerTest
 import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.flicker.pip.common.EnterPipTransition
 import org.junit.Test
 import org.junit.runners.Parameterized
 
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt
similarity index 98%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt
index 258c0588..54b3e2a8 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MapsEnterPipTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.apps
 
 import android.os.Handler
 import android.os.Looper
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt
new file mode 100644
index 0000000..ad34634
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm.shell.flicker.pip.apps
+
+import android.tools.common.traces.component.ComponentNameMatcher
+import android.tools.device.apphelpers.YouTubeAppHelper
+import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
+import android.tools.device.flicker.legacy.FlickerBuilder
+import android.tools.device.flicker.legacy.LegacyFlickerTest
+import androidx.test.filters.RequiresDevice
+import org.junit.FixMethodOrder
+import org.junit.runner.RunWith
+import org.junit.runners.MethodSorters
+import org.junit.runners.Parameterized
+
+/**
+ * Test entering pip from YouTube app by interacting with the app UI
+ *
+ * To run this test: `atest WMShellFlickerTests:YouTubeEnterPipTest`
+ *
+ * Actions:
+ * ```
+ *     Launch YouTube and start playing a video
+ *     Go home to enter PiP
+ * ```
+ *
+ * Notes:
+ * ```
+ *     1. Some default assertions (e.g., nav bar, status bar and screen covered)
+ *        are inherited from [PipTransition]
+ *     2. Part of the test setup occurs automatically via
+ *        [android.tools.device.flicker.legacy.runner.TransitionRunner],
+ *        including configuring navigation mode, initial orientation and ensuring no
+ *        apps are running before setup
+ * ```
+ */
+@RequiresDevice
+@RunWith(Parameterized::class)
+@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+open class YouTubeEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition(flicker) {
+    override val standardAppHelper: YouTubeAppHelper = YouTubeAppHelper(instrumentation)
+
+    override val defaultEnterPip: FlickerBuilder.() -> Unit = {
+        setup {
+            standardAppHelper.launchViaIntent(
+                wmHelper,
+                YouTubeAppHelper.getYoutubeVideoIntent("HPcEAtoXXLA"),
+                ComponentNameMatcher(YouTubeAppHelper.PACKAGE_NAME, "")
+            )
+            standardAppHelper.waitForVideoPlaying()
+        }
+    }
+
+    override val defaultTeardown: FlickerBuilder.() -> Unit = {
+        teardown {
+            standardAppHelper.exit(wmHelper)
+        }
+    }
+
+    override val thisTransition: FlickerBuilder.() -> Unit = {
+        transitions { tapl.goHome() }
+    }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt
similarity index 96%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt
index a17144b..751f2bc 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ClosePipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ClosePipTransition.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open 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,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
 
 import android.platform.test.annotations.Presubmit
 import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt
similarity index 98%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt
index d547b9c..9c129e4 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/EnterPipTransition.kt
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
 
 import android.platform.test.annotations.Presubmit
 import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt
similarity index 97%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt
index dfffba8..9450bdd 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/ExitPipToAppTransition.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open 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,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
 
 import android.platform.test.annotations.Presubmit
 import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt
similarity index 97%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt
index a8fb63d..7e42bc1 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/MovePipShelfHeightTransition.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open 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,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
 
 import android.platform.test.annotations.Presubmit
 import android.tools.common.Rotation
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
similarity index 97%
rename from libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt
rename to libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
index 2008d01..7b7f1d7 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open 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,7 @@
  * limitations under the License.
  */
 
-package com.android.wm.shell.flicker.pip
+package com.android.wm.shell.flicker.pip.common
 
 import android.app.Instrumentation
 import android.content.Intent
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
index fa1be63..2539fd5 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/DismissSplitScreenByDividerGesturalNavPortrait.kt
@@ -31,7 +31,8 @@
 class DismissSplitScreenByDividerGesturalNavPortrait :
     DismissSplitScreenByDivider(Rotation.ROTATION_0) {
 
-    @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
+    // TODO(b/300260196): Not detecting this scenario right now
+    @ExpectedScenarios(["ENTIRE_TRACE"])
     @Test
     override fun dismissSplitScreenByDivider() = super.dismissSplitScreenByDivider()
 
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
index 00f6073..4ff0b4362 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavLandscape.kt
@@ -31,7 +31,7 @@
 class SwitchBackToSplitFromRecentGesturalNavLandscape :
     SwitchBackToSplitFromRecent(Rotation.ROTATION_90) {
 
-    @ExpectedScenarios(["QUICKSWITCH"])
+    @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
     @Test
     override fun switchBackToSplitFromRecent() = super.switchBackToSplitFromRecent()
 
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
index b3340e7..930f31d 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/SwitchBackToSplitFromRecentGesturalNavPortrait.kt
@@ -31,7 +31,7 @@
 class SwitchBackToSplitFromRecentGesturalNavPortrait :
     SwitchBackToSplitFromRecent(Rotation.ROTATION_0) {
 
-    @ExpectedScenarios(["QUICKSWITCH"])
+    @ExpectedScenarios(["SPLIT_SCREEN_ENTER"])
     @Test
     override fun switchBackToSplitFromRecent() = super.switchBackToSplitFromRecent()
 
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
index f4e7298..c744103 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavLandscape.kt
@@ -29,7 +29,7 @@
 @RunWith(FlickerServiceJUnit4ClassRunner::class)
 class UnlockKeyguardToSplitScreenGesturalNavLandscape : UnlockKeyguardToSplitScreen() {
 
-    @ExpectedScenarios(["QUICKSWITCH"])
+    @ExpectedScenarios(["LOCKSCREEN_UNLOCK_ANIMATION"])
     @Test
     override fun unlockKeyguardToSplitScreen() = super.unlockKeyguardToSplitScreen()
 
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
index f38b2e8..11a4e02 100644
--- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
+++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/service/splitscreen/flicker/UnlockKeyguardToSplitScreenGesturalNavPortrait.kt
@@ -29,7 +29,7 @@
 @RunWith(FlickerServiceJUnit4ClassRunner::class)
 class UnlockKeyguardToSplitScreenGesturalNavPortrait : UnlockKeyguardToSplitScreen() {
 
-    @ExpectedScenarios(["QUICKSWITCH"])
+    @ExpectedScenarios(["LOCKSCREEN_UNLOCK_ANIMATION"])
     @Test
     override fun unlockKeyguardToSplitScreen() = super.unlockKeyguardToSplitScreen()
 
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
index 17ed396..e727491 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/animation/PhysicsAnimatorTest.kt
@@ -424,6 +424,7 @@
                         eq(-5f), anyFloat(), eq(true))
     }
 
+    @Ignore("Started flaking despite no changes, tracking in b/299636216")
     @Test
     fun testIsPropertyAnimating() {
         PhysicsAnimatorTestUtils.setAllAnimationsBlock(false)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
index 4a55429..26c7394 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
@@ -111,6 +111,8 @@
     @Mock
     private BubbleLogger mBubbleLogger;
     @Mock
+    private BubbleEducationController mEducationController;
+    @Mock
     private ShellExecutor mMainExecutor;
 
     @Captor
@@ -191,7 +193,7 @@
 
         mPositioner = new TestableBubblePositioner(mContext,
                 mock(WindowManager.class));
-        mBubbleData = new BubbleData(getContext(), mBubbleLogger, mPositioner,
+        mBubbleData = new BubbleData(getContext(), mBubbleLogger, mPositioner, mEducationController,
                 mMainExecutor);
 
         // Used by BubbleData to set lastAccessedTime
@@ -385,6 +387,65 @@
         assertOverflowChangedTo(ImmutableList.of());
     }
 
+    /**
+     * Verifies that the update shouldn't show the user education, if the education is not required
+     */
+    @Test
+    public void test_shouldNotShowEducation() {
+        // Setup
+        when(mEducationController.shouldShowStackEducation(any())).thenReturn(false);
+        mBubbleData.setListener(mListener);
+
+        // Test
+        mBubbleData.notificationEntryUpdated(mBubbleA1, /* suppressFlyout */ true, /* showInShade */
+                true);
+
+        // Verify
+        verifyUpdateReceived();
+        BubbleData.Update update = mUpdateCaptor.getValue();
+        assertThat(update.shouldShowEducation).isFalse();
+    }
+
+    /**
+     * Verifies that the update should show the user education, if the education is required
+     */
+    @Test
+    public void test_shouldShowEducation() {
+        // Setup
+        when(mEducationController.shouldShowStackEducation(any())).thenReturn(true);
+        mBubbleData.setListener(mListener);
+
+        // Test
+        mBubbleData.notificationEntryUpdated(mBubbleA1, /* suppressFlyout */ true, /* showInShade */
+                true);
+
+        // Verify
+        verifyUpdateReceived();
+        BubbleData.Update update = mUpdateCaptor.getValue();
+        assertThat(update.shouldShowEducation).isTrue();
+    }
+
+    /**
+     * Verifies that the update shouldn't show the user education, if the education is required but
+     * the bubble should auto-expand
+     */
+    @Test
+    public void test_shouldShowEducation_shouldAutoExpand() {
+        // Setup
+        when(mEducationController.shouldShowStackEducation(any())).thenReturn(true);
+        mBubbleData.setListener(mListener);
+        mBubbleA1.setShouldAutoExpand(true);
+
+        // Test
+        mBubbleData.notificationEntryUpdated(mBubbleA1, /* suppressFlyout */ true, /* showInShade */
+                true);
+
+        // Verify
+        verifyUpdateReceived();
+        BubbleData.Update update = mUpdateCaptor.getValue();
+        assertThat(update.shouldShowEducation).isFalse();
+    }
+
     // COLLAPSED / ADD
 
     /**
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
index fe2da5d..ad84c7f 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/SplitLayoutTests.java
@@ -18,9 +18,9 @@
 
 import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
-
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_END_AND_DISMISS;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SNAP_TO_START_AND_DISMISS;
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
@@ -146,7 +146,7 @@
     public void testSnapToDismissStart() {
         // verify it callbacks properly when the snap target indicates dismissing split.
         DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */,
-                DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_START);
+                SNAP_TO_START_AND_DISMISS);
 
         mSplitLayout.snapToTarget(mSplitLayout.getDividePosition(), snapTarget);
         waitDividerFlingFinished();
@@ -158,7 +158,7 @@
     public void testSnapToDismissEnd() {
         // verify it callbacks properly when the snap target indicates dismissing split.
         DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */,
-                DividerSnapAlgorithm.SnapTarget.FLAG_DISMISS_END);
+                SNAP_TO_END_AND_DISMISS);
 
         mSplitLayout.snapToTarget(mSplitLayout.getDividePosition(), snapTarget);
         waitDividerFlingFinished();
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
index 568db91..99cd4f3 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
@@ -36,6 +36,7 @@
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -218,8 +219,7 @@
     }
 
     @Test
-    public void startIntent_multiInstancesSupported_startTaskInBackgroundBeforeSplitActivated() {
-        doReturn(true).when(mSplitScreenController).supportMultiInstancesSplit(any());
+    public void startIntent_multiInstancesNotSupported_startTaskInBackgroundBeforeSplitActivated() {
         doNothing().when(mSplitScreenController).startTask(anyInt(), anyInt(), any());
         Intent startIntent = createStartIntent("startActivity");
         PendingIntent pendingIntent =
@@ -237,6 +237,8 @@
 
         verify(mSplitScreenController).startTask(anyInt(), eq(SPLIT_POSITION_TOP_OR_LEFT),
                 isNull());
+        verify(mSplitScreenController, never()).supportMultiInstancesSplit(any());
+        verify(mStageCoordinator, never()).switchSplitPosition(any());
     }
 
     @Test
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index fd6e18e..68befff 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -812,10 +812,10 @@
         /* check the appropriate Zip file */
         ZipFileRO* pZip = getZipFileLocked(ap);
         if (pZip != NULL) {
-            ALOGV("GOT zip, checking NA '%s'", (const char*) path);
+            ALOGV("GOT zip, checking NA '%s'", path.c_str());
             ZipEntryRO entry = pZip->findEntryByName(path.c_str());
             if (entry != NULL) {
-                ALOGV("FOUND NA in Zip file for %s", (const char*) path);
+                ALOGV("FOUND NA in Zip file for %s", path.c_str());
                 pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
                 pZip->releaseEntry(entry);
             }
@@ -1425,7 +1425,7 @@
       mResourceTableAsset(NULL), mResourceTable(NULL)
 {
     if (kIsDebug) {
-        ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
+        ALOGI("Creating SharedZip %p %s\n", this, mPath.c_str());
     }
     ALOGV("+++ opening zip '%s'\n", mPath.c_str());
     mZipFile = ZipFileRO::open(mPath.c_str());
@@ -1439,7 +1439,7 @@
       mResourceTableAsset(NULL), mResourceTable(NULL)
 {
     if (kIsDebug) {
-        ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, (const char*)mPath);
+        ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, mPath.c_str());
     }
     ALOGV("+++ opening zip fd=%d '%s'\n", fd, mPath.c_str());
     mZipFile = ZipFileRO::openFd(fd, mPath.c_str());
@@ -1453,7 +1453,7 @@
         bool createIfNotPresent)
 {
     AutoMutex _l(gLock);
-    time_t modWhen = getFileModDate(path);
+    time_t modWhen = getFileModDate(path.c_str());
     sp<SharedZip> zip = gOpen.valueFor(path).promote();
     if (zip != NULL && zip->mModWhen == modWhen) {
         return zip;
@@ -1541,7 +1541,7 @@
 AssetManager::SharedZip::~SharedZip()
 {
     if (kIsDebug) {
-        ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
+        ALOGI("Destroying SharedZip %p %s\n", this, mPath.c_str());
     }
     if (mResourceTable != NULL) {
         delete mResourceTable;
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index edccb8a..7f22693 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -1026,7 +1026,7 @@
 
   log_stream << "\nBest matching is from "
              << (last_resolution_.best_config_name.empty() ? "default"
-                                                   : last_resolution_.best_config_name)
+                    : last_resolution_.best_config_name.c_str())
              << " configuration of " << last_resolution_.best_package_name;
   return log_stream.str();
 }
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 099287c..4c992be 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -5286,19 +5286,19 @@
         *outType = *defType;
     }
     *outName = String16(p, end-p);
-    if(**outPackage == 0) {
+    if(outPackage->empty()) {
         if(outErrorMsg) {
             *outErrorMsg = "Resource package cannot be an empty string";
         }
         return false;
     }
-    if(**outType == 0) {
+    if(outType->empty()) {
         if(outErrorMsg) {
             *outErrorMsg = "Resource type cannot be an empty string";
         }
         return false;
     }
-    if(**outName == 0) {
+    if(outName->empty()) {
         if(outErrorMsg) {
             *outErrorMsg = "Resource id cannot be an empty string";
         }
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index ce6b4b7..502ff87 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -737,6 +737,7 @@
         "tests/unit/EglManagerTests.cpp",
         "tests/unit/FatVectorTests.cpp",
         "tests/unit/GraphicsStatsServiceTests.cpp",
+        "tests/unit/HintSessionWrapperTests.cpp",
         "tests/unit/JankTrackerTests.cpp",
         "tests/unit/FrameMetricsReporterTests.cpp",
         "tests/unit/LayerUpdateQueueTests.cpp",
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp
index 19a1dfa..16de21d 100644
--- a/libs/hwui/HardwareBitmapUploader.cpp
+++ b/libs/hwui/HardwareBitmapUploader.cpp
@@ -22,6 +22,7 @@
 #include <GLES2/gl2ext.h>
 #include <GLES3/gl3.h>
 #include <GrDirectContext.h>
+#include <GrTypes.h>
 #include <SkBitmap.h>
 #include <SkCanvas.h>
 #include <SkImage.h>
@@ -265,7 +266,7 @@
           sk_sp<SkImage> image =
               SkImages::TextureFromAHardwareBufferWithData(mGrContext.get(), bitmap.pixmap(),
                                                            ahb);
-          mGrContext->submit(true);
+          mGrContext->submit(GrSyncCpu::kYes);
 
           uploadSucceeded = (image.get() != nullptr);
         });
diff --git a/libs/hwui/jni/text/MeasuredText.cpp b/libs/hwui/jni/text/MeasuredText.cpp
index f6ae169..746745a 100644
--- a/libs/hwui/jni/text/MeasuredText.cpp
+++ b/libs/hwui/jni/text/MeasuredText.cpp
@@ -62,13 +62,14 @@
 
 // Regular JNI
 static void nAddStyleRun(JNIEnv* /* unused */, jclass /* unused */, jlong builderPtr,
-                         jlong paintPtr, jint lbStyle, jint lbWordStyle, jint start, jint end,
-                         jboolean isRtl) {
+                         jlong paintPtr, jint lbStyle, jint lbWordStyle, jboolean hyphenation,
+                         jint start, jint end, jboolean isRtl) {
     Paint* paint = toPaint(paintPtr);
     const Typeface* typeface = Typeface::resolveDefault(paint->getAndroidTypeface());
     minikin::MinikinPaint minikinPaint = MinikinUtils::prepareMinikinPaint(paint, typeface);
     toBuilder(builderPtr)
-            ->addStyleRun(start, end, std::move(minikinPaint), lbStyle, lbWordStyle, isRtl);
+            ->addStyleRun(start, end, std::move(minikinPaint), lbStyle, lbWordStyle, hyphenation,
+                          isRtl);
 }
 
 // Regular JNI
@@ -159,7 +160,7 @@
 static const JNINativeMethod gMTBuilderMethods[] = {
         // MeasuredParagraphBuilder native functions.
         {"nInitBuilder", "()J", (void*)nInitBuilder},
-        {"nAddStyleRun", "(JJIIIIZ)V", (void*)nAddStyleRun},
+        {"nAddStyleRun", "(JJIIZIIZ)V", (void*)nAddStyleRun},
         {"nAddReplacementRun", "(JJIIF)V", (void*)nAddReplacementRun},
         {"nBuildMeasuredText", "(JJ[CZZZZ)J", (void*)nBuildMeasuredText},
         {"nFreeBuilder", "(J)V", (void*)nFreeBuilder},
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
index 6679f8f..e0f1f6e 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
@@ -18,6 +18,7 @@
 
 #include <include/android/SkSurfaceAndroid.h>
 #include <include/gpu/ganesh/SkSurfaceGanesh.h>
+#include <include/encode/SkPngEncoder.h>
 #include <SkCanvas.h>
 #include <SkColor.h>
 #include <SkColorSpace.h>
@@ -440,6 +441,13 @@
                 procs.fTypefaceProc = [](SkTypeface* tf, void* ctx){
                     return tf->serialize(SkTypeface::SerializeBehavior::kDoIncludeData);
                 };
+                procs.fImageProc = [](SkImage* img, void* ctx) -> sk_sp<SkData> {
+                    GrDirectContext* dCtx = static_cast<GrDirectContext*>(ctx);
+                    return SkPngEncoder::Encode(dCtx,
+                                                img,
+                                                SkPngEncoder::Options{});
+                };
+                procs.fImageCtx = mRenderThread.getGrContext();
                 auto data = picture->serialize(&procs);
                 savePictureAsync(data, mCapturedFile);
                 mCaptureSequence = 0;
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index 8f81dba..735fc07 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -17,6 +17,7 @@
 #include "CacheManager.h"
 
 #include <GrContextOptions.h>
+#include <GrTypes.h>
 #include <SkExecutor.h>
 #include <SkGraphics.h>
 #include <math.h>
@@ -110,13 +111,18 @@
     contextOptions->fPersistentCache = &cache;
 }
 
+static GrPurgeResourceOptions toSkiaEnum(bool scratchOnly) {
+    return scratchOnly ? GrPurgeResourceOptions::kScratchResourcesOnly :
+                         GrPurgeResourceOptions::kAllResources;
+}
+
 void CacheManager::trimMemory(TrimLevel mode) {
     if (!mGrContext) {
         return;
     }
 
     // flush and submit all work to the gpu and wait for it to finish
-    mGrContext->flushAndSubmit(/*syncCpu=*/true);
+    mGrContext->flushAndSubmit(GrSyncCpu::kYes);
 
     switch (mode) {
         case TrimLevel::BACKGROUND:
@@ -130,7 +136,7 @@
             // that have persistent data to be purged in LRU order.
             mGrContext->setResourceCacheLimit(mBackgroundResourceBytes);
             SkGraphics::SetFontCacheLimit(mBackgroundCpuFontCacheBytes);
-            mGrContext->purgeUnlockedResources(mMemoryPolicy.purgeScratchOnly);
+            mGrContext->purgeUnlockedResources(toSkiaEnum(mMemoryPolicy.purgeScratchOnly));
             mGrContext->setResourceCacheLimit(mMaxResourceBytes);
             SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes);
             break;
@@ -150,7 +156,7 @@
         case CacheTrimLevel::ALL_CACHES:
             SkGraphics::PurgeAllCaches();
             if (mGrContext) {
-                mGrContext->purgeUnlockedResources(false);
+                mGrContext->purgeUnlockedResources(GrPurgeResourceOptions::kAllResources);
             }
             break;
         default:
@@ -285,7 +291,7 @@
                 ns2ms(std::clamp(frameDiffNanos, mMemoryPolicy.minimumResourceRetention,
                                  mMemoryPolicy.maximumResourceRetention));
         mGrContext->performDeferredCleanup(std::chrono::milliseconds(cleanupMillis),
-                                           mMemoryPolicy.purgeScratchOnly);
+                                           toSkiaEnum(mMemoryPolicy.purgeScratchOnly));
     }
 }
 
diff --git a/libs/hwui/renderthread/HintSessionWrapper.cpp b/libs/hwui/renderthread/HintSessionWrapper.cpp
index 1f338ee..b34da51 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.cpp
+++ b/libs/hwui/renderthread/HintSessionWrapper.cpp
@@ -32,65 +32,30 @@
 namespace uirenderer {
 namespace renderthread {
 
-namespace {
+#define BIND_APH_METHOD(name)                                         \
+    name = (decltype(name))dlsym(handle_, "APerformanceHint_" #name); \
+    LOG_ALWAYS_FATAL_IF(name == nullptr, "Failed to find required symbol APerformanceHint_" #name)
 
-typedef APerformanceHintManager* (*APH_getManager)();
-typedef APerformanceHintSession* (*APH_createSession)(APerformanceHintManager*, const int32_t*,
-                                                      size_t, int64_t);
-typedef void (*APH_closeSession)(APerformanceHintSession* session);
-typedef void (*APH_updateTargetWorkDuration)(APerformanceHintSession*, int64_t);
-typedef void (*APH_reportActualWorkDuration)(APerformanceHintSession*, int64_t);
-typedef void (*APH_sendHint)(APerformanceHintSession* session, int32_t);
-
-bool gAPerformanceHintBindingInitialized = false;
-APH_getManager gAPH_getManagerFn = nullptr;
-APH_createSession gAPH_createSessionFn = nullptr;
-APH_closeSession gAPH_closeSessionFn = nullptr;
-APH_updateTargetWorkDuration gAPH_updateTargetWorkDurationFn = nullptr;
-APH_reportActualWorkDuration gAPH_reportActualWorkDurationFn = nullptr;
-APH_sendHint gAPH_sendHintFn = nullptr;
-
-void ensureAPerformanceHintBindingInitialized() {
-    if (gAPerformanceHintBindingInitialized) return;
+void HintSessionWrapper::HintSessionBinding::init() {
+    if (mInitialized) return;
 
     void* handle_ = dlopen("libandroid.so", RTLD_NOW | RTLD_NODELETE);
     LOG_ALWAYS_FATAL_IF(handle_ == nullptr, "Failed to dlopen libandroid.so!");
 
-    gAPH_getManagerFn = (APH_getManager)dlsym(handle_, "APerformanceHint_getManager");
-    LOG_ALWAYS_FATAL_IF(gAPH_getManagerFn == nullptr,
-                        "Failed to find required symbol APerformanceHint_getManager!");
+    BIND_APH_METHOD(getManager);
+    BIND_APH_METHOD(createSession);
+    BIND_APH_METHOD(closeSession);
+    BIND_APH_METHOD(updateTargetWorkDuration);
+    BIND_APH_METHOD(reportActualWorkDuration);
+    BIND_APH_METHOD(sendHint);
 
-    gAPH_createSessionFn = (APH_createSession)dlsym(handle_, "APerformanceHint_createSession");
-    LOG_ALWAYS_FATAL_IF(gAPH_createSessionFn == nullptr,
-                        "Failed to find required symbol APerformanceHint_createSession!");
-
-    gAPH_closeSessionFn = (APH_closeSession)dlsym(handle_, "APerformanceHint_closeSession");
-    LOG_ALWAYS_FATAL_IF(gAPH_closeSessionFn == nullptr,
-                        "Failed to find required symbol APerformanceHint_closeSession!");
-
-    gAPH_updateTargetWorkDurationFn = (APH_updateTargetWorkDuration)dlsym(
-            handle_, "APerformanceHint_updateTargetWorkDuration");
-    LOG_ALWAYS_FATAL_IF(
-            gAPH_updateTargetWorkDurationFn == nullptr,
-            "Failed to find required symbol APerformanceHint_updateTargetWorkDuration!");
-
-    gAPH_reportActualWorkDurationFn = (APH_reportActualWorkDuration)dlsym(
-            handle_, "APerformanceHint_reportActualWorkDuration");
-    LOG_ALWAYS_FATAL_IF(
-            gAPH_reportActualWorkDurationFn == nullptr,
-            "Failed to find required symbol APerformanceHint_reportActualWorkDuration!");
-
-    gAPH_sendHintFn = (APH_sendHint)dlsym(handle_, "APerformanceHint_sendHint");
-    LOG_ALWAYS_FATAL_IF(gAPH_sendHintFn == nullptr,
-                        "Failed to find required symbol APerformanceHint_sendHint!");
-
-    gAPerformanceHintBindingInitialized = true;
+    mInitialized = true;
 }
 
-}  // namespace
-
 HintSessionWrapper::HintSessionWrapper(pid_t uiThreadId, pid_t renderThreadId)
-        : mUiThreadId(uiThreadId), mRenderThreadId(renderThreadId) {}
+        : mUiThreadId(uiThreadId)
+        , mRenderThreadId(renderThreadId)
+        , mBinding(std::make_shared<HintSessionBinding>()) {}
 
 HintSessionWrapper::~HintSessionWrapper() {
     destroy();
@@ -101,7 +66,7 @@
         mHintSession = mHintSessionFuture.get();
     }
     if (mHintSession) {
-        gAPH_closeSessionFn(mHintSession);
+        mBinding->closeSession(mHintSession);
         mSessionValid = true;
         mHintSession = nullptr;
     }
@@ -133,9 +98,9 @@
     // Assume that if we return before the end, it broke
     mSessionValid = false;
 
-    ensureAPerformanceHintBindingInitialized();
+    mBinding->init();
 
-    APerformanceHintManager* manager = gAPH_getManagerFn();
+    APerformanceHintManager* manager = mBinding->getManager();
     if (!manager) return false;
 
     std::vector<pid_t> tids = CommonPool::getThreadIds();
@@ -145,8 +110,9 @@
     // Use a placeholder target value to initialize,
     // this will always be replaced elsewhere before it gets used
     int64_t defaultTargetDurationNanos = 16666667;
-    mHintSessionFuture = CommonPool::async([=, tids = std::move(tids)] {
-        return gAPH_createSessionFn(manager, tids.data(), tids.size(), defaultTargetDurationNanos);
+    mHintSessionFuture = CommonPool::async([=, this, tids = std::move(tids)] {
+        return mBinding->createSession(manager, tids.data(), tids.size(),
+                                       defaultTargetDurationNanos);
     });
     return false;
 }
@@ -158,7 +124,7 @@
         targetWorkDurationNanos > kSanityCheckLowerBound &&
         targetWorkDurationNanos < kSanityCheckUpperBound) {
         mLastTargetWorkDuration = targetWorkDurationNanos;
-        gAPH_updateTargetWorkDurationFn(mHintSession, targetWorkDurationNanos);
+        mBinding->updateTargetWorkDuration(mHintSession, targetWorkDurationNanos);
     }
     mLastFrameNotification = systemTime();
 }
@@ -168,7 +134,7 @@
     mResetsSinceLastReport = 0;
     if (actualDurationNanos > kSanityCheckLowerBound &&
         actualDurationNanos < kSanityCheckUpperBound) {
-        gAPH_reportActualWorkDurationFn(mHintSession, actualDurationNanos);
+        mBinding->reportActualWorkDuration(mHintSession, actualDurationNanos);
     }
 }
 
@@ -179,14 +145,14 @@
     if (now - mLastFrameNotification > kResetHintTimeout &&
         mResetsSinceLastReport <= kMaxResetsSinceLastReport) {
         ++mResetsSinceLastReport;
-        gAPH_sendHintFn(mHintSession, static_cast<int>(SessionHint::CPU_LOAD_RESET));
+        mBinding->sendHint(mHintSession, static_cast<int32_t>(SessionHint::CPU_LOAD_RESET));
     }
     mLastFrameNotification = now;
 }
 
 void HintSessionWrapper::sendLoadIncreaseHint() {
     if (!init()) return;
-    gAPH_sendHintFn(mHintSession, static_cast<int>(SessionHint::CPU_LOAD_UP));
+    mBinding->sendHint(mHintSession, static_cast<int32_t>(SessionHint::CPU_LOAD_UP));
 }
 
 } /* namespace renderthread */
diff --git a/libs/hwui/renderthread/HintSessionWrapper.h b/libs/hwui/renderthread/HintSessionWrapper.h
index bdb9959..f8b876e 100644
--- a/libs/hwui/renderthread/HintSessionWrapper.h
+++ b/libs/hwui/renderthread/HintSessionWrapper.h
@@ -29,6 +29,8 @@
 
 class HintSessionWrapper {
 public:
+    friend class HintSessionWrapperTests;
+
     HintSessionWrapper(pid_t uiThreadId, pid_t renderThreadId);
     ~HintSessionWrapper();
 
@@ -55,6 +57,28 @@
     static constexpr nsecs_t kResetHintTimeout = 100_ms;
     static constexpr int64_t kSanityCheckLowerBound = 100_us;
     static constexpr int64_t kSanityCheckUpperBound = 10_s;
+
+    // Allows easier stub when testing
+    class HintSessionBinding {
+    public:
+        virtual ~HintSessionBinding() = default;
+        virtual void init();
+        APerformanceHintManager* (*getManager)();
+        APerformanceHintSession* (*createSession)(APerformanceHintManager* manager,
+                                                  const int32_t* tids, size_t tidCount,
+                                                  int64_t defaultTarget) = nullptr;
+        void (*closeSession)(APerformanceHintSession* session) = nullptr;
+        void (*updateTargetWorkDuration)(APerformanceHintSession* session,
+                                         int64_t targetDuration) = nullptr;
+        void (*reportActualWorkDuration)(APerformanceHintSession* session,
+                                         int64_t actualDuration) = nullptr;
+        void (*sendHint)(APerformanceHintSession* session, int32_t hintId) = nullptr;
+
+    private:
+        bool mInitialized = false;
+    };
+
+    std::shared_ptr<HintSessionBinding> mBinding;
 };
 
 } /* namespace renderthread */
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index ee3b2e4..90850d3 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -515,7 +515,7 @@
                         // The following flush blocks the GPU immediately instead of waiting for
                         // other drawing ops. It seems dequeue_fence is not respected otherwise.
                         // TODO: remove the flush after finding why backendSemaphore is not working.
-                        skgpu::ganesh::FlushAndSubmit(bufferInfo->skSurface);
+                        skgpu::ganesh::FlushAndSubmit(bufferInfo->skSurface.get());
                     }
                 }
             }
diff --git a/libs/hwui/tests/unit/HintSessionWrapperTests.cpp b/libs/hwui/tests/unit/HintSessionWrapperTests.cpp
new file mode 100644
index 0000000..623be1e
--- /dev/null
+++ b/libs/hwui/tests/unit/HintSessionWrapperTests.cpp
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <private/performance_hint_private.h>
+#include <renderthread/HintSessionWrapper.h>
+#include <utils/Log.h>
+
+#include <chrono>
+
+#include "Properties.h"
+
+using namespace testing;
+using namespace std::chrono_literals;
+
+APerformanceHintManager* managerPtr = reinterpret_cast<APerformanceHintManager*>(123);
+APerformanceHintSession* sessionPtr = reinterpret_cast<APerformanceHintSession*>(456);
+int uiThreadId = 1;
+int renderThreadId = 2;
+
+namespace android::uirenderer::renderthread {
+
+class HintSessionWrapperTests : public testing::Test {
+public:
+    void SetUp() override;
+    void TearDown() override;
+
+protected:
+    std::shared_ptr<HintSessionWrapper> mWrapper;
+
+    class MockHintSessionBinding : public HintSessionWrapper::HintSessionBinding {
+    public:
+        void init() override;
+
+        MOCK_METHOD(APerformanceHintManager*, fakeGetManager, ());
+        MOCK_METHOD(APerformanceHintSession*, fakeCreateSession,
+                    (APerformanceHintManager*, const int32_t*, size_t, int64_t));
+        MOCK_METHOD(void, fakeCloseSession, (APerformanceHintSession*));
+        MOCK_METHOD(void, fakeUpdateTargetWorkDuration, (APerformanceHintSession*, int64_t));
+        MOCK_METHOD(void, fakeReportActualWorkDuration, (APerformanceHintSession*, int64_t));
+        MOCK_METHOD(void, fakeSendHint, (APerformanceHintSession*, int32_t));
+    };
+
+    // Must be static so it can have function pointers we can point to with static methods
+    static std::shared_ptr<MockHintSessionBinding> sMockBinding;
+
+    // Must be static so we can point to them as normal fn pointers with HintSessionBinding
+    static APerformanceHintManager* stubGetManager() { return sMockBinding->fakeGetManager(); };
+    static APerformanceHintSession* stubCreateSession(APerformanceHintManager* manager,
+                                                      const int32_t* ids, size_t idsSize,
+                                                      int64_t initialTarget) {
+        return sMockBinding->fakeCreateSession(manager, ids, idsSize, initialTarget);
+    }
+    static APerformanceHintSession* stubSlowCreateSession(APerformanceHintManager* manager,
+                                                          const int32_t* ids, size_t idsSize,
+                                                          int64_t initialTarget) {
+        std::this_thread::sleep_for(50ms);
+        return sMockBinding->fakeCreateSession(manager, ids, idsSize, initialTarget);
+    }
+    static void stubCloseSession(APerformanceHintSession* session) {
+        sMockBinding->fakeCloseSession(session);
+    };
+    static void stubUpdateTargetWorkDuration(APerformanceHintSession* session,
+                                             int64_t workDuration) {
+        sMockBinding->fakeUpdateTargetWorkDuration(session, workDuration);
+    }
+    static void stubReportActualWorkDuration(APerformanceHintSession* session,
+                                             int64_t workDuration) {
+        sMockBinding->fakeReportActualWorkDuration(session, workDuration);
+    }
+    static void stubSendHint(APerformanceHintSession* session, int32_t hintId) {
+        sMockBinding->fakeSendHint(session, hintId);
+    };
+    void waitForWrapperReady() { mWrapper->mHintSessionFuture.wait(); }
+};
+
+std::shared_ptr<HintSessionWrapperTests::MockHintSessionBinding>
+        HintSessionWrapperTests::sMockBinding;
+
+void HintSessionWrapperTests::SetUp() {
+    // Pretend it's supported even if we're in an emulator
+    Properties::useHintManager = true;
+    sMockBinding = std::make_shared<NiceMock<MockHintSessionBinding>>();
+    mWrapper = std::make_shared<HintSessionWrapper>(uiThreadId, renderThreadId);
+    mWrapper->mBinding = sMockBinding;
+    EXPECT_CALL(*sMockBinding, fakeGetManager).WillOnce(Return(managerPtr));
+    ON_CALL(*sMockBinding, fakeCreateSession).WillByDefault(Return(sessionPtr));
+}
+
+void HintSessionWrapperTests::MockHintSessionBinding::init() {
+    sMockBinding->getManager = &stubGetManager;
+    if (sMockBinding->createSession == nullptr) {
+        sMockBinding->createSession = &stubCreateSession;
+    }
+    sMockBinding->closeSession = &stubCloseSession;
+    sMockBinding->updateTargetWorkDuration = &stubUpdateTargetWorkDuration;
+    sMockBinding->reportActualWorkDuration = &stubReportActualWorkDuration;
+    sMockBinding->sendHint = &stubSendHint;
+}
+
+void HintSessionWrapperTests::TearDown() {
+    mWrapper = nullptr;
+    sMockBinding = nullptr;
+}
+
+TEST_F(HintSessionWrapperTests, destructorClosesBackgroundSession) {
+    EXPECT_CALL(*sMockBinding, fakeCloseSession(sessionPtr)).Times(1);
+    sMockBinding->createSession = stubSlowCreateSession;
+    mWrapper->init();
+    mWrapper = nullptr;
+}
+
+TEST_F(HintSessionWrapperTests, sessionInitializesCorrectly) {
+    EXPECT_CALL(*sMockBinding, fakeCreateSession(managerPtr, _, Gt(1), _)).Times(1);
+    mWrapper->init();
+    waitForWrapperReady();
+}
+
+TEST_F(HintSessionWrapperTests, loadUpHintsSendCorrectly) {
+    EXPECT_CALL(*sMockBinding,
+                fakeSendHint(sessionPtr, static_cast<int32_t>(SessionHint::CPU_LOAD_UP)))
+            .Times(1);
+    mWrapper->init();
+    waitForWrapperReady();
+    mWrapper->sendLoadIncreaseHint();
+}
+
+TEST_F(HintSessionWrapperTests, loadResetHintsSendCorrectly) {
+    EXPECT_CALL(*sMockBinding,
+                fakeSendHint(sessionPtr, static_cast<int32_t>(SessionHint::CPU_LOAD_RESET)))
+            .Times(1);
+    mWrapper->init();
+    waitForWrapperReady();
+    mWrapper->sendLoadResetHint();
+}
+
+}  // namespace android::uirenderer::renderthread
\ No newline at end of file
diff --git a/libs/protoutil/include/android/util/ProtoOutputStream.h b/libs/protoutil/include/android/util/ProtoOutputStream.h
index f4a358d..1bfb874 100644
--- a/libs/protoutil/include/android/util/ProtoOutputStream.h
+++ b/libs/protoutil/include/android/util/ProtoOutputStream.h
@@ -102,7 +102,7 @@
     bool write(uint64_t fieldId, long val);
     bool write(uint64_t fieldId, long long val);
     bool write(uint64_t fieldId, bool val);
-    bool write(uint64_t fieldId, std::string val);
+    bool write(uint64_t fieldId, std::string_view val);
     bool write(uint64_t fieldId, const char* val, size_t size);
 
     /**
diff --git a/libs/protoutil/src/ProtoOutputStream.cpp b/libs/protoutil/src/ProtoOutputStream.cpp
index fcf82ee..a44a1b2 100644
--- a/libs/protoutil/src/ProtoOutputStream.cpp
+++ b/libs/protoutil/src/ProtoOutputStream.cpp
@@ -170,13 +170,13 @@
 }
 
 bool
-ProtoOutputStream::write(uint64_t fieldId, std::string val)
+ProtoOutputStream::write(uint64_t fieldId, std::string_view val)
 {
     if (mCompact) return false;
     const uint32_t id = (uint32_t)fieldId;
     switch (fieldId & FIELD_TYPE_MASK) {
         case FIELD_TYPE_STRING:
-            writeUtf8StringImpl(id, val.c_str(), val.size());
+            writeUtf8StringImpl(id, val.data(), val.size());
             return true;
         default:
             ALOGW("Field type %" PRIu64 " is not supported when writing string val.",
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index ceb3858..a311296 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -1284,7 +1284,8 @@
          *    {@link AudioFormat#CHANNEL_OUT_SIDE_RIGHT}.
          *    <p> For a valid {@link AudioTrack} channel position mask,
          *    the following conditions apply:
-         *    <br> (1) at most eight channel positions may be used;
+         *    <br> (1) at most {@link AudioSystem#OUT_CHANNEL_COUNT_MAX} channel positions may be
+         *    used;
          *    <br> (2) right/left pairs should be matched.
          *    <p> For input or {@link AudioRecord}, the mask should be
          *    {@link AudioFormat#CHANNEL_IN_MONO} or
diff --git a/media/java/android/media/MediaRouter2.java b/media/java/android/media/MediaRouter2.java
index d6921c8..8c63580 100644
--- a/media/java/android/media/MediaRouter2.java
+++ b/media/java/android/media/MediaRouter2.java
@@ -17,9 +17,11 @@
 package android.media;
 
 import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
+import static com.android.media.flags.Flags.FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2;
 
 import android.Manifest;
 import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
@@ -370,14 +372,14 @@
     }
 
     /**
-     * Registers callback to be invoked when the {@link RouteListingPreference} of the target
-     * router changes.
+     * Registers the given callback to be invoked when the {@link RouteListingPreference} of the
+     * target router changes.
      *
-     * <p>Calls using a previously registered callback will overwrite the callback record.
+     * <p>Calls using a previously registered callback will overwrite the previous executor.
      *
      * @see #setRouteListingPreference(RouteListingPreference)
-     * @hide
      */
+    @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
     public void registerRouteListingPreferenceCallback(
             @NonNull @CallbackExecutor Executor executor,
             @NonNull RouteListingPreferenceCallback routeListingPreferenceCallback) {
@@ -393,9 +395,8 @@
 
     /**
      * Unregisters the given callback to not receive {@link RouteListingPreference} change events.
-     *
-     * @hide
      */
+    @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
     public void unregisterRouteListingPreferenceCallback(
             @NonNull RouteListingPreferenceCallback callback) {
         Objects.requireNonNull(callback, "callback must not be null");
@@ -462,9 +463,12 @@
     /**
      * Returns the current {@link RouteListingPreference} of the target router.
      *
+     * <p>If this instance was created using {@link #getInstance(Context, String)}, then it returns
+     * the last {@link RouteListingPreference} set by the process this router was created for.
+     *
      * @see #setRouteListingPreference(RouteListingPreference)
-     * @hide
      */
+    @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
     @Nullable
     public RouteListingPreference getRouteListingPreference() {
         synchronized (mLock) {
@@ -1201,9 +1205,19 @@
         public void onPreferredFeaturesChanged(@NonNull List<String> preferredFeatures) {}
     }
 
-    /** @hide */
+    /** Callback for receiving events related to {@link RouteListingPreference}. */
+    @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
     public abstract static class RouteListingPreferenceCallback {
-        /** @hide */
+
+        @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
+        public RouteListingPreferenceCallback() {}
+
+        /**
+         * Called when the {@link RouteListingPreference} changes.
+         *
+         * @see #getRouteListingPreference
+         */
+        @FlaggedApi(FLAG_ENABLE_RLP_CALLBACKS_IN_MEDIA_ROUTER2)
         public void onRouteListingPreferenceChanged(@Nullable RouteListingPreference preference) {}
     }
 
diff --git a/media/java/android/media/flags/media_better_together.aconfig b/media/java/android/media/flags/media_better_together.aconfig
new file mode 100644
index 0000000..83d2b61
--- /dev/null
+++ b/media/java/android/media/flags/media_better_together.aconfig
@@ -0,0 +1,22 @@
+package: "com.android.media.flags"
+
+flag {
+    name: "enable_rlp_callbacks_in_media_router2"
+    namespace: "media_solutions"
+    description: "Make RouteListingPreference getter and callbacks public in MediaRouter2."
+    bug: "281067101"
+}
+
+flag {
+    name: "adjust_volume_for_foreground_app_playing_audio_without_media_session"
+    namespace: "media_solutions"
+    description: "Gates whether to adjust local stream volume when the app in the foreground is the last app to play audio or adjust the volume of the last active media session that the user interacted with."
+    bug: "275185436"
+}
+
+flag {
+     namespace: "media_solutions"
+     name: "enable_audio_policies_device_and_bluetooth_controller"
+     description: "Use Audio Policies implementation for device and Bluetooth route controllers."
+     bug: "280576228"
+}
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index b03a039..ef90bf9 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -1043,7 +1043,7 @@
     CHECK(ctor != NULL);
 
     ScopedLocalRef<jstring> msgObj(
-            env, env->NewStringUTF(msg != NULL ? msg : String8::format("Error %#x", err)));
+            env, env->NewStringUTF(msg != NULL ? msg : String8::format("Error %#x", err).c_str()));
 
     // translate action code to Java equivalent
     switch (actionCode) {
@@ -3036,7 +3036,7 @@
     if (mode != NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW
             && mode != NATIVE_WINDOW_SCALING_MODE_SCALE_CROP) {
         jniThrowException(env, "java/lang/IllegalArgumentException",
-                          String8::format("Unrecognized mode: %d", mode));
+                          String8::format("Unrecognized mode: %d", mode).c_str());
         return;
     }
 
@@ -3467,27 +3467,27 @@
     if (err == NAME_NOT_FOUND) {
         // fail and do not try again.
         jniThrowException(env, "java/lang/IllegalArgumentException",
-                String8::format("Failed to initialize %s, error %#x (NAME_NOT_FOUND)", tmp, err));
+                String8::format("Failed to initialize %s, error %#x (NAME_NOT_FOUND)", tmp, err).c_str());
         env->ReleaseStringUTFChars(name, tmp);
         return;
     }
     if (err == NO_MEMORY) {
         throwCodecException(env, err, ACTION_CODE_TRANSIENT,
-                String8::format("Failed to initialize %s, error %#x (NO_MEMORY)", tmp, err));
+                String8::format("Failed to initialize %s, error %#x (NO_MEMORY)", tmp, err).c_str());
         env->ReleaseStringUTFChars(name, tmp);
         return;
     }
     if (err == PERMISSION_DENIED) {
         jniThrowException(env, "java/lang/SecurityException",
                 String8::format("Failed to initialize %s, error %#x (PERMISSION_DENIED)", tmp,
-                err));
+                err).c_str());
         env->ReleaseStringUTFChars(name, tmp);
         return;
     }
     if (err != OK) {
         // believed possible to try again
         jniThrowException(env, "java/io/IOException",
-                String8::format("Failed to find matching codec %s, error %#x (?)", tmp, err));
+                String8::format("Failed to find matching codec %s, error %#x (?)", tmp, err).c_str());
         env->ReleaseStringUTFChars(name, tmp);
         return;
     }
diff --git a/media/jni/android_media_MediaDescrambler.cpp b/media/jni/android_media_MediaDescrambler.cpp
index c61365a..37111c2 100644
--- a/media/jni/android_media_MediaDescrambler.cpp
+++ b/media/jni/android_media_MediaDescrambler.cpp
@@ -368,7 +368,7 @@
 
     ScopedLocalRef<jstring> msgObj(
             env, env->NewStringUTF(msg != NULL ?
-                    msg : String8::format("Error %#x", serviceSpecificError)));
+                    msg : String8::format("Error %#x", serviceSpecificError).c_str()));
 
     return (jthrowable)env->NewObject(
             clazz.get(), ctor, serviceSpecificError, msgObj.get());
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 3551ea4..d05ee55 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -260,7 +260,7 @@
     status_t opStatus =
         mp->setDataSource(
                 httpService,
-                pathStr,
+                pathStr.c_str(),
                 headersVector.size() > 0? &headersVector : NULL);
 
     process_media_player_call(
diff --git a/native/android/obb.cpp b/native/android/obb.cpp
index e990024..a14fa7e 100644
--- a/native/android/obb.cpp
+++ b/native/android/obb.cpp
@@ -42,7 +42,7 @@
 }
 
 const char* AObbInfo_getPackageName(AObbInfo* obbInfo) {
-    return obbInfo->getPackageName();
+    return obbInfo->getPackageName().c_str();
 }
 
 int32_t AObbInfo_getVersion(AObbInfo* obbInfo) {
diff --git a/packages/CarrierDefaultApp/res/values-sq/strings.xml b/packages/CarrierDefaultApp/res/values-sq/strings.xml
index 238921a..d8a1ed7 100644
--- a/packages/CarrierDefaultApp/res/values-sq/strings.xml
+++ b/packages/CarrierDefaultApp/res/values-sq/strings.xml
@@ -5,7 +5,7 @@
     <string name="android_system_label" msgid="2797790869522345065">"Operatori celular"</string>
     <string name="portal_notification_id" msgid="5155057562457079297">"Të dhënat celulare kanë përfunduar"</string>
     <string name="no_data_notification_id" msgid="668400731803969521">"Të dhënat celulare janë çaktivizuar"</string>
-    <string name="portal_notification_detail" msgid="2295729385924660881">"Trokit për të vizituar sajtin e uebit të %s"</string>
+    <string name="portal_notification_detail" msgid="2295729385924660881">"Trokit për të vizituar uebsajtin e %s"</string>
     <string name="no_data_notification_detail" msgid="3112125343857014825">"Kontakto me ofruesin e shërbimit %s"</string>
     <string name="no_mobile_data_connection_title" msgid="7449525772416200578">"Nuk ka lidhje të të dhënave celulare"</string>
     <string name="no_mobile_data_connection" msgid="544980465184147010">"Shto plan të dhënash ose plan roaming përmes %s"</string>
@@ -16,7 +16,7 @@
     <string name="ssl_error_continue" msgid="1138548463994095584">"Vazhdo gjithsesi nëpërmjet shfletuesit"</string>
     <string name="performance_boost_notification_channel" msgid="3475440855635538592">"Përforcimi i performancës"</string>
     <string name="performance_boost_notification_title" msgid="3126203390685781861">"Opsionet 5G nga operatori yt celular"</string>
-    <string name="performance_boost_notification_detail" msgid="216569851036236346">"Vizito sajtin e uebit të %s për të parë opsione për përvojën tënde me aplikacionin"</string>
+    <string name="performance_boost_notification_detail" msgid="216569851036236346">"Vizito uebsajtin e %s për të parë opsione për përvojën tënde me aplikacionin"</string>
     <string name="performance_boost_notification_button_not_now" msgid="6459755324243683785">"Jo tani"</string>
     <string name="performance_boost_notification_button_manage" msgid="4976836444046497973">"Menaxho"</string>
     <string name="slice_purchase_app_label" msgid="7170191659233241166">"Bli një paketë përforcimi të performancës."</string>
diff --git a/packages/CredentialManager/Android.bp b/packages/CredentialManager/Android.bp
index fe26dc3..233aee2 100644
--- a/packages/CredentialManager/Android.bp
+++ b/packages/CredentialManager/Android.bp
@@ -50,3 +50,46 @@
         proguard_compatibility: false,
     },
 }
+
+android_app {
+    name: "ClockworkCredentialManager",
+    defaults: ["platform_app_defaults"],
+    certificate: "platform",
+    manifest: "wear/AndroidManifest.xml",
+    srcs: ["wear/src/**/*.kt"],
+    resource_dirs: ["wear/res"],
+
+    dex_preopt: {
+        profile_guided: true,
+        profile: "wear/profile.txt.prof",
+    },
+
+    static_libs: [
+        "PlatformComposeCore",
+        "androidx.activity_activity-compose",
+        "androidx.appcompat_appcompat",
+        "androidx.compose.foundation_foundation",
+        "androidx.compose.foundation_foundation-layout",
+        "androidx.compose.material_material-icons-core",
+        "androidx.compose.material_material-icons-extended",
+        "androidx.compose.ui_ui",
+        "androidx.core_core-ktx",
+        "androidx.credentials_credentials",
+        "androidx.lifecycle_lifecycle-extensions",
+        "androidx.lifecycle_lifecycle-livedata",
+        "androidx.lifecycle_lifecycle-runtime-ktx",
+        "androidx.lifecycle_lifecycle-viewmodel-compose",
+        "androidx.wear.compose_compose-foundation",
+        "androidx.wear.compose_compose-material",
+        "kotlinx-coroutines-core",
+    ],
+
+    platform_apis: true,
+    privileged: true,
+
+    kotlincflags: ["-Xjvm-default=all"],
+
+    optimize: {
+        proguard_compatibility: false,
+    },
+}
diff --git a/packages/CredentialManager/horologist/OWNERS b/packages/CredentialManager/horologist/OWNERS
new file mode 100644
index 0000000..b679328
--- /dev/null
+++ b/packages/CredentialManager/horologist/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/horologist/README.md b/packages/CredentialManager/horologist/README.md
new file mode 100644
index 0000000..005ad2d
--- /dev/null
+++ b/packages/CredentialManager/horologist/README.md
@@ -0,0 +1,3 @@
+This folder is to place the code from Horologist (go/horologist).
+It should be removed once Horologist is imported to the platform and the dependencies to this
+module are updated to point to the imported Horologist.
diff --git a/packages/CredentialManager/res/values-b+sr+Latn/strings.xml b/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
index 89e48f9..780274c 100644
--- a/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
+++ b/packages/CredentialManager/res/values-b+sr+Latn/strings.xml
@@ -49,7 +49,7 @@
     <string name="sign_ins" msgid="4710739369149469208">"prijavljivanja"</string>
     <string name="sign_in_info" msgid="2627704710674232328">"podaci za prijavljivanje"</string>
     <string name="save_credential_to_title" msgid="3172811692275634301">"Sačuvaj <xliff:g id="CREDENTIALTYPES">%1$s</xliff:g> u"</string>
-    <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Želite da napravite pristupni kôd na drugom uređaju?"</string>
+    <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Želite da napravite pristupni ključ na drugom uređaju?"</string>
     <string name="save_password_on_other_device_title" msgid="5829084591948321207">"Želite da sačuvate lozinku na drugom uređaju?"</string>
     <string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Želite da sačuvate akreditive za prijavu na drugom uređaju?"</string>
     <string name="use_provider_for_all_title" msgid="4201020195058980757">"Želite da za sva prijavljivanja koristite: <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g>?"</string>
@@ -72,7 +72,7 @@
     <string name="get_dialog_title_use_password_for" msgid="625828023234318484">"Želite da koristite sačuvanu lozinku za: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
     <string name="get_dialog_title_use_sign_in_for" msgid="790049858275131785">"Želite li da koristite svoje podatke za prijavljivanje za aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
     <string name="get_dialog_title_unlock_options_for" msgid="7605568190597632433">"Želite da otključate opcije prijavljivanja za: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
-    <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Izaberite sačuvan pristupni kôd za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+    <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Izaberite sačuvan pristupni ključ za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_password_for" msgid="1724435823820819221">"Izaberite sačuvanu lozinku za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_saved_sign_in_for" msgid="2420298653461652728">"Izaberite sačuvane podatke za prijavljivanje za: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_sign_in_for" msgid="3048870756117876514">"Odaberite podatke za prijavljivanje za aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/res/values-in/strings.xml b/packages/CredentialManager/res/values-in/strings.xml
index e47cf7b..d6bf946 100644
--- a/packages/CredentialManager/res/values-in/strings.xml
+++ b/packages/CredentialManager/res/values-in/strings.xml
@@ -54,7 +54,7 @@
     <string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Simpan info login di perangkat lain?"</string>
     <string name="use_provider_for_all_title" msgid="4201020195058980757">"Gunakan <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g> untuk semua info login Anda?"</string>
     <string name="use_provider_for_all_description" msgid="1998772715863958997">"Pengelola sandi untuk <xliff:g id="USERNAME">%1$s</xliff:g> ini akan menyimpan sandi dan kunci sandi guna membantu Anda login dengan mudah"</string>
-    <string name="set_as_default" msgid="4415328591568654603">"Setel sebagai default"</string>
+    <string name="set_as_default" msgid="4415328591568654603">"Jadikan default"</string>
     <string name="settings" msgid="6536394145760913145">"Setelan"</string>
     <string name="use_once" msgid="9027366575315399714">"Gunakan sekali"</string>
     <string name="more_options_usage_passwords_passkeys" msgid="3470113942332934279">"<xliff:g id="PASSWORDSNUMBER">%1$s</xliff:g> sandi • <xliff:g id="PASSKEYSNUMBER">%2$s</xliff:g> kunci sandi"</string>
diff --git a/packages/CredentialManager/res/values-sq/strings.xml b/packages/CredentialManager/res/values-sq/strings.xml
index 40f8dc4..bf6bc8b 100644
--- a/packages/CredentialManager/res/values-sq/strings.xml
+++ b/packages/CredentialManager/res/values-sq/strings.xml
@@ -34,7 +34,7 @@
     <string name="public_key_cryptography_title" msgid="6751970819265298039">"Kriptografia e çelësit publik"</string>
     <string name="public_key_cryptography_detail" msgid="6937631710280562213">"Bazuar në aleancën FIDO (e cila përfshin Google, Apple, Microsoft e të tjera) dhe standardet W3C, çelësat e kalimit përdorin çifte çelësash kriptografikë. Ndryshe nga emri i përdoruesit dhe vargu i karaktereve që përdorim për fjalëkalime, një çift çelësash privat-publik krijohet për aplikacion ose sajtin e uebit. Çelësi privat ruhet i sigurt në pajisjen tënde ose në menaxherin e fjalëkalimeve dhe konfirmon identitetin tënd. Çelësi publik ndahet me aplikacionin ose serverin e sajtit të uebit. Me çelësat përkatës, mund të regjistrohesh dhe të identifikohesh në çast."</string>
     <string name="improved_account_security_title" msgid="1069841917893513424">"Siguri e përmirësuar e llogarisë"</string>
-    <string name="improved_account_security_detail" msgid="9123750251551844860">"Secili çelës është i lidhur ekskluzivisht me aplikacionin ose sajtin e uebit për të cilin është krijuar, kështu që nuk do të identifikohesh asnjëherë gabimisht në një aplikacion ose sajt uebi mashtrues. Gjithashtu, me serverët që mbajnë vetëm çelësa publikë, pirateria informatike është shumë më e vështirë."</string>
+    <string name="improved_account_security_detail" msgid="9123750251551844860">"Secili çelës është i lidhur ekskluzivisht me aplikacionin ose uebsajtin për të cilin është krijuar, kështu që nuk do të identifikohesh asnjëherë gabimisht në një aplikacion ose uebsajt mashtrues. Gjithashtu, me serverët që mbajnë vetëm çelësa publikë, pirateria informatike është shumë më e vështirë."</string>
     <string name="seamless_transition_title" msgid="5335622196351371961">"Kalim i thjeshtuar"</string>
     <string name="seamless_transition_detail" msgid="4475509237171739843">"Teksa shkojmë drejt një të ardhmeje pa fjalëkalime, këto të fundit do të ofrohen ende së bashku me çelësat e kalimit."</string>
     <string name="choose_provider_title" msgid="8870795677024868108">"Zgjidh se ku t\'i ruash <xliff:g id="CREATETYPES">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/res/values-sr/strings.xml b/packages/CredentialManager/res/values-sr/strings.xml
index f5a29a2..b83c698 100644
--- a/packages/CredentialManager/res/values-sr/strings.xml
+++ b/packages/CredentialManager/res/values-sr/strings.xml
@@ -49,7 +49,7 @@
     <string name="sign_ins" msgid="4710739369149469208">"пријављивања"</string>
     <string name="sign_in_info" msgid="2627704710674232328">"подаци за пријављивање"</string>
     <string name="save_credential_to_title" msgid="3172811692275634301">"Сачувај <xliff:g id="CREDENTIALTYPES">%1$s</xliff:g> у"</string>
-    <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Желите да направите приступни кôд на другом уређају?"</string>
+    <string name="create_passkey_in_other_device_title" msgid="2360053098931886245">"Желите да направите приступни кључ на другом уређају?"</string>
     <string name="save_password_on_other_device_title" msgid="5829084591948321207">"Желите да сачувате лозинку на другом уређају?"</string>
     <string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Желите да сачувате акредитиве за пријаву на другом уређају?"</string>
     <string name="use_provider_for_all_title" msgid="4201020195058980757">"Желите да за сва пријављивања користите: <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g>?"</string>
@@ -72,7 +72,7 @@
     <string name="get_dialog_title_use_password_for" msgid="625828023234318484">"Желите да користите сачувану лозинку за: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
     <string name="get_dialog_title_use_sign_in_for" msgid="790049858275131785">"Желите ли да користите своје податке за пријављивање за апликацију <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
     <string name="get_dialog_title_unlock_options_for" msgid="7605568190597632433">"Желите да откључате опције пријављивања за: <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
-    <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Изаберите сачуван приступни кôд за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+    <string name="get_dialog_title_choose_passkey_for" msgid="9175997688078538490">"Изаберите сачуван приступни кључ за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_password_for" msgid="1724435823820819221">"Изаберите сачувану лозинку за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_saved_sign_in_for" msgid="2420298653461652728">"Изаберите сачуване податке за пријављивање за: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="get_dialog_title_choose_sign_in_for" msgid="3048870756117876514">"Одаберите податке за пријављивање за апликацију <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/shared/OWNERS b/packages/CredentialManager/shared/OWNERS
new file mode 100644
index 0000000..b679328
--- /dev/null
+++ b/packages/CredentialManager/shared/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/shared/README.md b/packages/CredentialManager/shared/README.md
new file mode 100644
index 0000000..d2375a0
--- /dev/null
+++ b/packages/CredentialManager/shared/README.md
@@ -0,0 +1,2 @@
+This folder is to place the common code that will be shared between the phone project and the wear
+project of the Credential Manager implementation.
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt b/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
index 1ede64d..145e44d 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/logging/LifecycleEvent.kt
@@ -15,8 +15,6 @@
  */
 package com.android.credentialmanager.logging
 
-import com.android.internal.logging.UiEventLogger.UiEventEnum.RESERVE_NEW_UI_EVENT_ID
-
 import com.android.internal.logging.UiEvent
 import com.android.internal.logging.UiEventLogger
 
diff --git a/packages/CredentialManager/wear/AndroidManifest.xml b/packages/CredentialManager/wear/AndroidManifest.xml
new file mode 100644
index 0000000..001a56d
--- /dev/null
+++ b/packages/CredentialManager/wear/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<?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.credentialmanager">
+
+    <uses-permission android:name="android.permission.LAUNCH_CREDENTIAL_SELECTOR"/>
+    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
+    <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>
+
+    <application
+      android:allowBackup="true"
+      android:dataExtractionRules="@xml/data_extraction_rules"
+      android:fullBackupContent="@xml/backup_rules"
+      android:label="@string/app_name"
+      android:supportsRtl="true"
+      android:theme="@style/Theme.CredentialSelector">
+
+        <activity
+            android:name=".CredentialSelectorActivity"
+            android:exported="true"
+            android:permission="android.permission.LAUNCH_CREDENTIAL_SELECTOR"
+            android:launchMode="singleTop"
+            android:label="@string/app_name"
+            android:excludeFromRecents="true"
+            android:theme="@style/Theme.CredentialSelector">
+        </activity>
+  </application>
+
+</manifest>
diff --git a/packages/CredentialManager/wear/OWNERS b/packages/CredentialManager/wear/OWNERS
new file mode 100644
index 0000000..b679328
--- /dev/null
+++ b/packages/CredentialManager/wear/OWNERS
@@ -0,0 +1,4 @@
+include /core/java/android/credentials/OWNERS
+
+shuanghao@google.com
+gustavopagani@google.com
diff --git a/packages/CredentialManager/wear/README.md b/packages/CredentialManager/wear/README.md
new file mode 100644
index 0000000..b9d27b9
--- /dev/null
+++ b/packages/CredentialManager/wear/README.md
@@ -0,0 +1 @@
+This project is the wear implementation of the Credential Manager feature.
\ No newline at end of file
diff --git a/packages/CredentialManager/wear/profile.txt.prof b/packages/CredentialManager/wear/profile.txt.prof
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/CredentialManager/wear/profile.txt.prof
diff --git a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml b/packages/CredentialManager/wear/res/values/strings.xml
similarity index 69%
rename from packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml
rename to packages/CredentialManager/wear/res/values/strings.xml
index 1a52e93..10ea918 100644
--- a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml
+++ b/packages/CredentialManager/wear/res/values/strings.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ Copyright (C) 2021 The Android Open Source Project
+  ~ Copyright (C) 2023 The Android Open 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,8 +14,8 @@
   ~ 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">
-    <!-- Don't use the smaller PIN pad keys if we have the screen space to support it. -->
-    <string name="num_pad_key_ratio">1.0</string>
-</resources>
+  <!-- The name of this application. Credential Manager is a service that centralizes and provides
+  access to a user's credentials used to sign in to various apps. [CHAR LIMIT=80] -->
+  <string name="app_name">Credential Manager</string>
+</resources>
\ No newline at end of file
diff --git a/packages/CredentialManager/wear/res/values/themes.xml b/packages/CredentialManager/wear/res/values/themes.xml
new file mode 100644
index 0000000..22329e9f
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values/themes.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2023 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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="Theme.CredentialSelector" parent="@*android:style/ThemeOverlay.DeviceDefault.Accent.DayNight">
+    <item name="android:windowContentOverlay">@null</item>
+    <item name="android:windowNoTitle">true</item>
+    <item name="android:windowBackground">@android:color/transparent</item>
+    <item name="android:windowIsTranslucent">true</item>
+  </style>
+</resources>
\ No newline at end of file
diff --git a/packages/CredentialManager/wear/res/xml/backup_rules.xml b/packages/CredentialManager/wear/res/xml/backup_rules.xml
new file mode 100644
index 0000000..9b42d90
--- /dev/null
+++ b/packages/CredentialManager/wear/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+   Sample backup rules file; uncomment and customize as necessary.
+   See https://developer.android.com/guide/topics/data/autobackup
+   for details.
+   Note: This file is ignored for devices older that API 31
+   See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+  <!--
+   <include domain="sharedpref" path="."/>
+   <exclude domain="sharedpref" path="device.xml"/>
+-->
+</full-backup-content>
\ No newline at end of file
diff --git a/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml b/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..c6c3bb0
--- /dev/null
+++ b/packages/CredentialManager/wear/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+   Sample data extraction rules file; uncomment and customize as necessary.
+   See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+   for details.
+-->
+<data-extraction-rules>
+  <cloud-backup>
+    <!-- TODO: Use <include> and <exclude> to control what is backed up.
+        <include .../>
+        <exclude .../>
+        -->
+  </cloud-backup>
+  <!--
+    <device-transfer>
+        <include .../>
+        <exclude .../>
+    </device-transfer>
+    -->
+</data-extraction-rules>
\ No newline at end of file
diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt
new file mode 100644
index 0000000..f7b2499
--- /dev/null
+++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0N
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import android.os.Bundle
+import androidx.activity.compose.setContent
+import androidx.activity.ComponentActivity
+import androidx.wear.compose.material.MaterialTheme
+import androidx.wear.compose.material.Text
+
+class CredentialSelectorActivity : ComponentActivity() {
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+        setContent {
+            MaterialTheme {
+                Text("Credential Manager entry point")
+            }
+        }
+    }
+}
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
index 4a252a9..471f3b9 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
@@ -22,6 +22,7 @@
 import com.android.settingslib.spa.framework.common.SpaEnvironment
 import com.android.settingslib.spa.framework.common.createSettingsPage
 import com.android.settingslib.spa.gallery.button.ActionButtonPageProvider
+import com.android.settingslib.spa.gallery.chart.ChartPageProvider
 import com.android.settingslib.spa.gallery.dialog.AlertDialogPageProvider
 import com.android.settingslib.spa.gallery.editor.EditorMainPageProvider
 import com.android.settingslib.spa.gallery.editor.SettingsExposedDropdownMenuBoxPageProvider
@@ -32,7 +33,6 @@
 import com.android.settingslib.spa.gallery.itemList.OperateListPageProvider
 import com.android.settingslib.spa.gallery.editor.SettingsOutlinedTextFieldPageProvider
 import com.android.settingslib.spa.gallery.page.ArgumentPageProvider
-import com.android.settingslib.spa.gallery.page.ChartPageProvider
 import com.android.settingslib.spa.gallery.page.FooterPageProvider
 import com.android.settingslib.spa.gallery.page.IllustrationPageProvider
 import com.android.settingslib.spa.gallery.page.LoadingBarPageProvider
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/BarChartEntry.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/BarChartEntry.kt
new file mode 100644
index 0000000..bf7a8e1
--- /dev/null
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/BarChartEntry.kt
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.spa.gallery.chart
+
+import com.android.settingslib.spa.framework.common.SettingsEntryBuilder
+import com.android.settingslib.spa.framework.common.SettingsPage
+import com.android.settingslib.spa.widget.chart.BarChart
+import com.android.settingslib.spa.widget.chart.BarChartData
+import com.android.settingslib.spa.widget.chart.BarChartModel
+import com.android.settingslib.spa.widget.chart.ColorPalette
+import com.android.settingslib.spa.widget.preference.Preference
+import com.android.settingslib.spa.widget.preference.PreferenceModel
+import com.github.mikephil.charting.formatter.IAxisValueFormatter
+
+fun createBarChartEntry(owner: SettingsPage) = SettingsEntryBuilder.create("Bar Chart", owner)
+    .setUiLayoutFn {
+        Preference(object : PreferenceModel {
+            override val title = "Bar Chart"
+        })
+        BarChart(
+            barChartModel = object : BarChartModel {
+                override val chartDataList = listOf(
+                    BarChartData(x = 0f, y = listOf(12f, 2f)),
+                    BarChartData(x = 1f, y = listOf(5f, 1f)),
+                    BarChartData(x = 2f, y = listOf(21f, 2f)),
+                    BarChartData(x = 3f, y = listOf(5f, 1f)),
+                    BarChartData(x = 4f, y = listOf(10f, 0f)),
+                    BarChartData(x = 5f, y = listOf(9f, 1f)),
+                    BarChartData(x = 6f, y = listOf(1f, 1f)),
+                )
+                override val colors = listOf(ColorPalette.green, ColorPalette.yellow)
+                override val xValueFormatter = IAxisValueFormatter { value, _ ->
+                    "4/${value.toInt() + 1}"
+                }
+                override val yValueFormatter = IAxisValueFormatter { value, _ ->
+                    "${value.toInt()}m"
+                }
+                override val yAxisMaxValue = 30f
+            }
+        )
+    }.build()
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/page/ChartPage.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/ChartPageProvider.kt
similarity index 73%
rename from packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/page/ChartPage.kt
rename to packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/ChartPageProvider.kt
index 69c4705..7a6ae2c 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/page/ChartPage.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/ChartPageProvider.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open 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,7 @@
  * limitations under the License.
  */
 
-package com.android.settingslib.spa.gallery.page
+package com.android.settingslib.spa.gallery.chart
 
 import android.os.Bundle
 import androidx.compose.runtime.Composable
@@ -25,9 +25,6 @@
 import com.android.settingslib.spa.framework.common.createSettingsPage
 import com.android.settingslib.spa.framework.compose.navigator
 import com.android.settingslib.spa.framework.theme.SettingsTheme
-import com.android.settingslib.spa.widget.chart.BarChart
-import com.android.settingslib.spa.widget.chart.BarChartData
-import com.android.settingslib.spa.widget.chart.BarChartModel
 import com.android.settingslib.spa.widget.chart.LineChart
 import com.android.settingslib.spa.widget.chart.LineChartData
 import com.android.settingslib.spa.widget.chart.LineChartModel
@@ -83,36 +80,7 @@
                     )
                 }.build()
         )
-        entryList.add(
-            SettingsEntryBuilder.create("Bar Chart", owner)
-                .setUiLayoutFn {
-                    Preference(object : PreferenceModel {
-                        override val title = "Bar Chart"
-                    })
-                    BarChart(
-                        barChartModel = object : BarChartModel {
-                            override val chartDataList = listOf(
-                                BarChartData(x = 0f, y = 12f),
-                                BarChartData(x = 1f, y = 5f),
-                                BarChartData(x = 2f, y = 21f),
-                                BarChartData(x = 3f, y = 5f),
-                                BarChartData(x = 4f, y = 10f),
-                                BarChartData(x = 5f, y = 9f),
-                                BarChartData(x = 6f, y = 1f),
-                            )
-                            override val xValueFormatter =
-                                IAxisValueFormatter { value, _ ->
-                                    "${WeekDay.values()[value.toInt()]}"
-                                }
-                            override val yValueFormatter =
-                                IAxisValueFormatter { value, _ ->
-                                    "${value.toInt()}m"
-                                }
-                            override val yAxisMaxValue = 30f
-                        }
-                    )
-                }.build()
-        )
+        entryList.add(createBarChartEntry(owner))
         entryList.add(
             SettingsEntryBuilder.create("Pie Chart", owner)
                 .setUiLayoutFn {
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
index 292e002..37c8eef 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/editor/SettingsExposedDropdownMenuCheckBoxProvider.kt
@@ -46,21 +46,23 @@
     @Composable
     override fun Page(arguments: Bundle?) {
         RegularScaffold(title = TITLE) {
-            SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+            SettingsExposedDropdownMenuCheckBox(
+                label = exposedDropdownMenuCheckBoxLabel,
                 options = options,
                 selectedOptionsState = remember { selectedOptionsState1 },
                 enabled = true,
-                onselectedOptionStateChange = {})
+                onSelectedOptionStateChange = {},
+            )
         }
     }
 
     fun buildInjectEntry(): SettingsEntryBuilder {
         return SettingsEntryBuilder.createInject(owner = createSettingsPage()).setUiLayoutFn {
-                Preference(object : PreferenceModel {
-                    override val title = TITLE
-                    override val onClick = navigator(name)
-                })
-            }
+            Preference(object : PreferenceModel {
+                override val title = TITLE
+                override val onClick = navigator(name)
+            })
+        }
     }
 }
 
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/home/HomePageProvider.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/home/HomePageProvider.kt
index bb311a5..6cac220 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/home/HomePageProvider.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/home/HomePageProvider.kt
@@ -28,12 +28,12 @@
 import com.android.settingslib.spa.gallery.R
 import com.android.settingslib.spa.gallery.SettingsPageProviderEnum
 import com.android.settingslib.spa.gallery.button.ActionButtonPageProvider
+import com.android.settingslib.spa.gallery.chart.ChartPageProvider
 import com.android.settingslib.spa.gallery.dialog.AlertDialogPageProvider
 import com.android.settingslib.spa.gallery.editor.EditorMainPageProvider
 import com.android.settingslib.spa.gallery.itemList.OperateListPageProvider
 import com.android.settingslib.spa.gallery.page.ArgumentPageModel
 import com.android.settingslib.spa.gallery.page.ArgumentPageProvider
-import com.android.settingslib.spa.gallery.page.ChartPageProvider
 import com.android.settingslib.spa.gallery.page.FooterPageProvider
 import com.android.settingslib.spa.gallery.page.IllustrationPageProvider
 import com.android.settingslib.spa.gallery.page.LoadingBarPageProvider
diff --git a/packages/SettingsLib/Spa/screenshot/src/com/android/settingslib/spa/screenshot/widget/chart/BarChartScreenshotTest.kt b/packages/SettingsLib/Spa/screenshot/src/com/android/settingslib/spa/screenshot/widget/chart/BarChartScreenshotTest.kt
index 27d270c..e6decb1 100644
--- a/packages/SettingsLib/Spa/screenshot/src/com/android/settingslib/spa/screenshot/widget/chart/BarChartScreenshotTest.kt
+++ b/packages/SettingsLib/Spa/screenshot/src/com/android/settingslib/spa/screenshot/widget/chart/BarChartScreenshotTest.kt
@@ -16,6 +16,7 @@
 
 package com.android.settingslib.spa.screenshot
 
+import androidx.compose.material3.MaterialTheme
 import com.android.settingslib.spa.widget.chart.BarChart
 import com.android.settingslib.spa.widget.chart.BarChartData
 import com.android.settingslib.spa.widget.chart.BarChartModel
@@ -45,17 +46,19 @@
     @Test
     fun test() {
         screenshotRule.screenshotTest("barChart") {
+            val color = MaterialTheme.colorScheme.surfaceVariant
             BarChart(
                 barChartModel = object : BarChartModel {
                     override val chartDataList = listOf(
-                        BarChartData(x = 0f, y = 12f),
-                        BarChartData(x = 1f, y = 5f),
-                        BarChartData(x = 2f, y = 21f),
-                        BarChartData(x = 3f, y = 5f),
-                        BarChartData(x = 4f, y = 10f),
-                        BarChartData(x = 5f, y = 9f),
-                        BarChartData(x = 6f, y = 1f),
+                        BarChartData(x = 0f, y = listOf(12f)),
+                        BarChartData(x = 1f, y = listOf(5f)),
+                        BarChartData(x = 2f, y = listOf(21f)),
+                        BarChartData(x = 3f, y = listOf(5f)),
+                        BarChartData(x = 4f, y = listOf(10f)),
+                        BarChartData(x = 5f, y = listOf(9f)),
+                        BarChartData(x = 6f, y = listOf(1f)),
                     )
+                    override val colors = listOf(color)
                     override val xValueFormatter =
                         IAxisValueFormatter { value, _ ->
                             "${WeekDay.values()[value.toInt()]}"
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/chart/BarChart.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/chart/BarChart.kt
index 0b0f07e..7ca15d9 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/chart/BarChart.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/chart/BarChart.kt
@@ -31,6 +31,7 @@
 import androidx.compose.runtime.Composable
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.graphics.toArgb
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.viewinterop.AndroidView
@@ -52,6 +53,11 @@
     val chartDataList: List<BarChartData>
 
     /**
+     * The color list for [BarChart].
+     */
+    val colors: List<Color>
+
+    /**
      * The label text formatter for x value.
      */
     val xValueFormatter: IAxisValueFormatter?
@@ -83,34 +89,14 @@
 }
 
 data class BarChartData(
-    var x: Float?,
-    var y: Float?,
+    var x: Float,
+    var y: List<Float>,
 )
 
 @Composable
 fun BarChart(barChartModel: BarChartModel) {
-    BarChart(
-        chartDataList = barChartModel.chartDataList,
-        xValueFormatter = barChartModel.xValueFormatter,
-        yValueFormatter = barChartModel.yValueFormatter,
-        yAxisMinValue = barChartModel.yAxisMinValue,
-        yAxisMaxValue = barChartModel.yAxisMaxValue,
-        yAxisLabelCount = barChartModel.yAxisLabelCount,
-    )
-}
-
-@Composable
-fun BarChart(
-    chartDataList: List<BarChartData>,
-    modifier: Modifier = Modifier,
-    xValueFormatter: IAxisValueFormatter? = null,
-    yValueFormatter: IAxisValueFormatter? = null,
-    yAxisMinValue: Float = 0f,
-    yAxisMaxValue: Float = 30f,
-    yAxisLabelCount: Int = 4,
-) {
     Column(
-        modifier = modifier
+        modifier = Modifier
             .fillMaxWidth()
             .wrapContentHeight(),
         horizontalAlignment = Alignment.CenterHorizontally,
@@ -126,50 +112,61 @@
             val colorScheme = MaterialTheme.colorScheme
             val labelTextColor = colorScheme.onSurfaceVariant.toArgb()
             val labelTextSize = MaterialTheme.typography.bodyMedium.fontSize.value
-            Crossfade(targetState = chartDataList) { barChartData ->
-                AndroidView(factory = { context ->
-                    BarChart(context).apply {
-                        // Fixed Settings.
-                        layoutParams = LinearLayout.LayoutParams(
-                            ViewGroup.LayoutParams.MATCH_PARENT,
-                            ViewGroup.LayoutParams.MATCH_PARENT,
-                        )
-                        this.description.isEnabled = false
-                        this.legend.isEnabled = false
-                        this.extraBottomOffset = 4f
-                        this.setScaleEnabled(false)
+            Crossfade(
+                targetState = barChartModel.chartDataList,
+                label = "chartDataList",
+            ) { barChartData ->
+                AndroidView(
+                    factory = { context ->
+                        BarChart(context).apply {
+                            layoutParams = LinearLayout.LayoutParams(
+                                ViewGroup.LayoutParams.MATCH_PARENT,
+                                ViewGroup.LayoutParams.MATCH_PARENT,
+                            )
+                            description.isEnabled = false
+                            legend.isEnabled = false
+                            extraBottomOffset = 4f
+                            setScaleEnabled(false)
 
-                        this.xAxis.position = XAxis.XAxisPosition.BOTTOM
-                        this.xAxis.setDrawGridLines(false)
-                        this.xAxis.setDrawAxisLine(false)
-                        this.xAxis.textColor = labelTextColor
-                        this.xAxis.textSize = labelTextSize
-                        this.xAxis.yOffset = 10f
+                            xAxis.apply {
+                                position = XAxis.XAxisPosition.BOTTOM
+                                setDrawAxisLine(false)
+                                setDrawGridLines(false)
+                                textColor = labelTextColor
+                                textSize = labelTextSize
+                                valueFormatter = barChartModel.xValueFormatter
+                                yOffset = 10f
+                            }
 
-                        this.axisLeft.isEnabled = false
-                        this.axisRight.setDrawAxisLine(false)
-                        this.axisRight.textSize = labelTextSize
-                        this.axisRight.textColor = labelTextColor
-                        this.axisRight.gridColor = colorScheme.divider.toArgb()
-                        this.axisRight.xOffset = 10f
+                            axisLeft.apply {
+                                axisMaximum = barChartModel.yAxisMaxValue
+                                axisMinimum = barChartModel.yAxisMinValue
+                                isEnabled = false
+                            }
 
-                        // Customizable Settings.
-                        this.xAxis.valueFormatter = xValueFormatter
-                        this.axisRight.valueFormatter = yValueFormatter
-
-                        this.axisLeft.axisMinimum = yAxisMinValue
-                        this.axisLeft.axisMaximum = yAxisMaxValue
-                        this.axisRight.axisMinimum = yAxisMinValue
-                        this.axisRight.axisMaximum = yAxisMaxValue
-
-                        this.axisRight.setLabelCount(yAxisLabelCount, true)
-                    }
-                },
+                            axisRight.apply {
+                                axisMaximum = barChartModel.yAxisMaxValue
+                                axisMinimum = barChartModel.yAxisMinValue
+                                gridColor = colorScheme.divider.toArgb()
+                                setDrawAxisLine(false)
+                                setLabelCount(barChartModel.yAxisLabelCount, true)
+                                textColor = labelTextColor
+                                textSize = labelTextSize
+                                valueFormatter = barChartModel.yValueFormatter
+                                xOffset = 10f
+                            }
+                        }
+                    },
                     modifier = Modifier
                         .wrapContentSize()
                         .padding(4.dp),
-                    update = {
-                        updateBarChartWithData(it, barChartData, colorScheme)
+                    update = { barChart ->
+                        updateBarChartWithData(
+                            chart = barChart,
+                            data = barChartData,
+                            colorList = barChartModel.colors,
+                            colorScheme = colorScheme,
+                        )
                     }
                 )
             }
@@ -177,26 +174,25 @@
     }
 }
 
-fun updateBarChartWithData(
+private fun updateBarChartWithData(
     chart: BarChart,
     data: List<BarChartData>,
+    colorList: List<Color>,
     colorScheme: ColorScheme
 ) {
-    val entries = ArrayList<BarEntry>()
-    for (i in data.indices) {
-        val item = data[i]
-        entries.add(BarEntry(item.x ?: 0.toFloat(), item.y ?: 0.toFloat()))
+    val entries = data.map { item ->
+        BarEntry(item.x, item.y.toFloatArray())
     }
 
-    val ds = BarDataSet(entries, "")
-    ds.colors = arrayListOf(colorScheme.surfaceVariant.toArgb())
-    ds.setDrawValues(false)
-    ds.isHighlightEnabled = true
-    ds.highLightColor = colorScheme.primary.toArgb()
-    ds.highLightAlpha = 255
+    val ds = BarDataSet(entries, "").apply {
+        colors = colorList.map(Color::toArgb)
+        setDrawValues(false)
+        isHighlightEnabled = true
+        highLightColor = colorScheme.primary.toArgb()
+        highLightAlpha = 255
+    }
     // TODO: Sets round corners for bars.
 
-    val d = BarData(ds)
-    chart.data = d
+    chart.data = BarData(ds)
     chart.invalidate()
 }
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
index d7bbf08..ec43aab 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuBox.kt
@@ -18,20 +18,22 @@
 
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.width
 import androidx.compose.material3.DropdownMenuItem
 import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.ExposedDropdownMenuBox
 import androidx.compose.material3.ExposedDropdownMenuDefaults
 import androidx.compose.material3.OutlinedTextField
 import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import com.android.settingslib.spa.framework.theme.SettingsDimension
-import androidx.compose.material3.ExposedDropdownMenuBox
 import androidx.compose.runtime.getValue
 import androidx.compose.runtime.mutableStateOf
 import androidx.compose.runtime.remember
 import androidx.compose.runtime.setValue
+import androidx.compose.ui.Modifier
 import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.unit.dp
+import com.android.settingslib.spa.framework.theme.SettingsDimension
 import com.android.settingslib.spa.framework.theme.SettingsTheme
 
 @Composable
@@ -48,6 +50,7 @@
         expanded = expanded,
         onExpandedChange = { expanded = it },
         modifier = Modifier
+            .width(350.dp)
             .padding(SettingsDimension.itemPadding),
     ) {
         OutlinedTextField(
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
index 6b3ae77..682b4ea 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBox.kt
@@ -52,25 +52,25 @@
     options: List<String>,
     selectedOptionsState: SnapshotStateList<String>,
     enabled: Boolean,
-    onselectedOptionStateChange: (String) -> Unit,
+    onSelectedOptionStateChange: () -> Unit,
 ) {
     var dropDownWidth by remember { mutableStateOf(0) }
     var expanded by remember { mutableStateOf(false) }
     ExposedDropdownMenuBox(
         expanded = expanded,
         onExpandedChange = { expanded = it },
-        modifier = Modifier.width(350.dp).padding(
-            horizontal = SettingsDimension.itemPaddingEnd,
-            vertical = SettingsDimension.itemPaddingVertical
-        ).onSizeChanged {
-            dropDownWidth = it.width
-        },
+        modifier = Modifier
+            .width(350.dp)
+            .padding(SettingsDimension.itemPadding)
+            .onSizeChanged { dropDownWidth = it.width },
     ) {
         OutlinedTextField(
             // The `menuAnchor` modifier must be passed to the text field for correctness.
-            modifier = Modifier.menuAnchor().fillMaxWidth(),
+            modifier = Modifier
+                .menuAnchor()
+                .fillMaxWidth(),
             value = selectedOptionsState.joinToString(", "),
-            onValueChange = onselectedOptionStateChange,
+            onValueChange = {},
             label = { Text(text = label) },
             trailingIcon = {
                 ExposedDropdownMenuDefaults.TrailingIcon(
@@ -83,30 +83,39 @@
         if (options.isNotEmpty()) {
             ExposedDropdownMenu(
                 expanded = expanded,
-                modifier = Modifier.fillMaxWidth()
+                modifier = Modifier
+                    .fillMaxWidth()
                     .width(with(LocalDensity.current) { dropDownWidth.toDp() }),
                 onDismissRequest = { expanded = false },
             ) {
                 options.forEach { option ->
-                    TextButton(modifier = Modifier.fillMaxHeight().fillMaxWidth(), onClick = {
-                        if (selectedOptionsState.contains(option)) {
-                            selectedOptionsState.remove(
-                                option
-                            )
-                        } else {
-                            selectedOptionsState.add(
-                                option
-                            )
-                        }
+                    TextButton(
+                        modifier = Modifier
+                            .fillMaxHeight()
+                            .fillMaxWidth(),
+                        onClick = {
+                            if (selectedOptionsState.contains(option)) {
+                                selectedOptionsState.remove(
+                                    option
+                                )
+                            } else {
+                                selectedOptionsState.add(
+                                    option
+                                )
+                            }
+                            onSelectedOptionStateChange()
                     }) {
                         Row(
-                            modifier = Modifier.fillMaxHeight().fillMaxWidth(),
+                            modifier = Modifier
+                                .fillMaxHeight()
+                                .fillMaxWidth(),
                             horizontalArrangement = Arrangement.Start,
                             verticalAlignment = Alignment.CenterVertically
                         ) {
-                            Checkbox(checked = selectedOptionsState.contains(
-                                option
-                            ), onCheckedChange = {})
+                            Checkbox(
+                                checked = selectedOptionsState.contains(option),
+                                onCheckedChange = null,
+                            )
                             Text(text = option)
                         }
                     }
@@ -126,6 +135,6 @@
             options = options,
             selectedOptionsState = selectedOptionsState,
             enabled = true,
-            onselectedOptionStateChange = {})
+            onSelectedOptionStateChange = {})
     }
 }
\ No newline at end of file
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/chart/ChartTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/chart/ChartTest.kt
index 2230d6c..0fe755f 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/chart/ChartTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/chart/ChartTest.kt
@@ -17,13 +17,17 @@
 package com.android.settingslib.spa.widget.chart
 
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.semantics.SemanticsPropertyKey
 import androidx.compose.ui.semantics.SemanticsPropertyReceiver
 import androidx.compose.ui.semantics.semantics
 import androidx.compose.ui.test.SemanticsMatcher
 import androidx.compose.ui.test.assertIsDisplayed
+import androidx.compose.ui.test.captureToImage
 import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onRoot
 import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.settingslib.spa.testutils.assertContainsColor
 import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
@@ -61,22 +65,21 @@
     @Test
     fun bar_chart_displayed() {
         composeTestRule.setContent {
-            BarChart(
-                chartDataList = listOf(
-                    BarChartData(x = 0f, y = 12f),
-                    BarChartData(x = 1f, y = 5f),
-                    BarChartData(x = 2f, y = 21f),
-                    BarChartData(x = 3f, y = 5f),
-                    BarChartData(x = 4f, y = 10f),
-                    BarChartData(x = 5f, y = 9f),
-                    BarChartData(x = 6f, y = 1f),
-                ),
-                yAxisMaxValue = 30f,
-                modifier = Modifier.semantics { chart = "bar" }
-            )
+            BarChart(object : BarChartModel {
+                override val chartDataList = listOf(
+                    BarChartData(x = 0f, y = listOf(12f)),
+                    BarChartData(x = 1f, y = listOf(5f)),
+                    BarChartData(x = 2f, y = listOf(21f)),
+                    BarChartData(x = 3f, y = listOf(5f)),
+                    BarChartData(x = 4f, y = listOf(10f)),
+                    BarChartData(x = 5f, y = listOf(9f)),
+                    BarChartData(x = 6f, y = listOf(1f)),
+                )
+                override val colors = listOf(Color.Blue)
+            })
         }
 
-        composeTestRule.onNode(hasChart("bar")).assertIsDisplayed()
+        composeTestRule.onRoot().captureToImage().assertContainsColor(Color.Blue)
     }
 
     @Test
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
index 58bc722..b0271ae1 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/widget/editor/SettingsExposedDropdownMenuCheckBoxTest.kt
@@ -45,11 +45,12 @@
     @Test
     fun exposedDropdownMenuCheckBox_displayed() {
         composeTestRule.setContent {
-            SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+            SettingsExposedDropdownMenuCheckBox(
+                label = exposedDropdownMenuCheckBoxLabel,
                 options = options,
                 selectedOptionsState = remember { selectedOptionsState1 },
                 enabled = true,
-                onselectedOptionStateChange = {})
+            ) {}
         }
         composeTestRule.onNodeWithText(
             exposedDropdownMenuCheckBoxLabel, substring = true
@@ -59,11 +60,12 @@
     @Test
     fun exposedDropdownMenuCheckBox_expanded() {
         composeTestRule.setContent {
-            SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+            SettingsExposedDropdownMenuCheckBox(
+                label = exposedDropdownMenuCheckBoxLabel,
                 options = options,
                 selectedOptionsState = remember { selectedOptionsState1 },
                 enabled = true,
-                onselectedOptionStateChange = {})
+            ) {}
         }
         composeTestRule.onNodeWithText(item3, substring = true).assertDoesNotExist()
         composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
@@ -74,11 +76,12 @@
     @Test
     fun exposedDropdownMenuCheckBox_valueAdded() {
         composeTestRule.setContent {
-            SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+            SettingsExposedDropdownMenuCheckBox(
+                label = exposedDropdownMenuCheckBoxLabel,
                 options = options,
                 selectedOptionsState = remember { selectedOptionsState1 },
                 enabled = true,
-                onselectedOptionStateChange = {})
+            ) {}
         }
         composeTestRule.onNodeWithText(item3, substring = true).assertDoesNotExist()
         composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
@@ -90,11 +93,12 @@
     @Test
     fun exposedDropdownMenuCheckBox_valueDeleted() {
         composeTestRule.setContent {
-            SettingsExposedDropdownMenuCheckBox(label = exposedDropdownMenuCheckBoxLabel,
+            SettingsExposedDropdownMenuCheckBox(
+                label = exposedDropdownMenuCheckBoxLabel,
                 options = options,
                 selectedOptionsState = remember { selectedOptionsState1 },
                 enabled = true,
-                onselectedOptionStateChange = {})
+            ) {}
         }
         composeTestRule.onNodeWithText(item2, substring = true).assertIsDisplayed()
         composeTestRule.onNodeWithText(exposedDropdownMenuCheckBoxLabel, substring = true)
diff --git a/packages/SettingsLib/Spa/testutils/src/com/android/settingslib/spa/testutils/ImageAssertions.kt b/packages/SettingsLib/Spa/testutils/src/com/android/settingslib/spa/testutils/ImageAssertions.kt
new file mode 100644
index 0000000..0190989
--- /dev/null
+++ b/packages/SettingsLib/Spa/testutils/src/com/android/settingslib/spa/testutils/ImageAssertions.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.spa.testutils
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.ImageBitmap
+import androidx.compose.ui.graphics.toPixelMap
+
+/**
+ * Asserts that the expected color is present in this bitmap.
+ *
+ * @throws AssertionError if the expected color is not present.
+ */
+fun ImageBitmap.assertContainsColor(expectedColor: Color) {
+    assert(containsColor(expectedColor)) {
+        "The given color $expectedColor was not found in the bitmap."
+    }
+}
+
+private fun ImageBitmap.containsColor(expectedColor: Color): Boolean {
+    val pixels = toPixelMap()
+    for (x in 0 until width) {
+        for (y in 0 until height) {
+            if (pixels[x, y] == expectedColor) return true
+        }
+    }
+    return false
+}
diff --git a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
index e46db75..33907ec 100644
--- a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
@@ -344,7 +344,9 @@
                 continue;
             }
             final ProviderInfo providerInfo = resolved.providerInfo;
-            final List<Bundle> entryData = getEntryDataFromProvider(context,
+            final List<Bundle> entryData = getEntryDataFromProvider(
+                    // Build new context so the entry data is retrieved for the queried user.
+                    context.createContextAsUser(user, 0 /* flags */),
                     providerInfo.authority);
             if (entryData == null || entryData.isEmpty()) {
                 continue;
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 9b82c13..ed15e7c 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -141,7 +141,7 @@
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Kanselleer"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Saambinding bied toegang tot jou kontakte en oproepgeskiedenis wanneer dit gekoppel is."</string>
     <string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Kon nie saambind met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nie."</string>
-    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Kon nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> saambind nie weens \'n verkeerde PIN of wagwoordsleutel."</string>
+    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Kon nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> saambind nie weens \'n verkeerde PIN of toegangsleutel."</string>
     <string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Kan nie met <xliff:g id="DEVICE_NAME">%1$s</xliff:g> kommunikeer nie."</string>
     <string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"Saambinding verwerp deur <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
     <string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Rekenaar"</string>
@@ -580,7 +580,7 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"Beperkte profiel"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"Voeg nuwe gebruiker by?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"Jy kan hierdie toestel met ander mense deel deur bykomende gebruikers te skep. Elke gebruiker het hulle eie spasie wat hulle kan pasmaak met programme, muurpapier en so meer. Gebruikers kan ook toestelinstellings wat almal raak, soos wi-fi, aanpas.\n\nWanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul eie spasie opstel.\n\nEnige gebruiker kan programme vir alle ander gebruikers opdateer. Toeganklikheidinstellings en -dienste sal dalk nie na die nuwe gebruiker oorgedra word nie."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel.\n\nEnige gebruiker kan programme vir al die ander gebruikers opdateer."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel.\n\nEnige gebruiker kan apps vir al die ander gebruikers opdateer."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"Maak hierdie gebruiker ’n admin?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Admins het spesiale voorregte wat ander gebruikers nie het nie. ’n Admin kan alle gebruikers bestuur, hierdie toestel opdateer of terugstel, instellings wysig, alle geïnstalleerde apps sien, en adminvoorregte vir ander mense gee of herroep."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Maak admin"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Voorspellingteruggebaaranimasies"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktiveer stelselanimasies vir voorspellingteruggebaar."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Hierdie instelling aktiveer stelselanimasies vir voorspellinggebaaranimasie. Dit vereis dat enableOnBackInvokedCallback per program op waar gestel word in die manifeslêer."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Skuif links"</item>
-    <item msgid="5425394847942513942">"Skuif af"</item>
-    <item msgid="7728484337962740316">"Skuif regs"</item>
-    <item msgid="324200556467459329">"Skuif op"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nie gespesifiseer nie"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index bd025ec..4831a273 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"የግምት ጀርባ እነማዎች"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ለግምት ጀርባ የስርዓት እንማዎችን ያንቁ።"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ይህ ቅንብር የስርዓት እነማዎችን ለመገመት የምልክት እነማን ያነቃል። በዝርዝር ሰነድ ፋይሉ ውስጥ በእያንዳንዱ መተግበሪያ enableOnBackInvokedCallbackን ወደ እውነት ማቀናበር ያስፈልገዋል።"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ወደ ግራ ውሰድ"</item>
-    <item msgid="5425394847942513942">"ወደ ታች ውሰድ"</item>
-    <item msgid="7728484337962740316">"ወደ ቀኝ ውሰድ"</item>
-    <item msgid="324200556467459329">"ወደ ላይ ውሰድ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"አልተገለጸም"</string>
     <string name="neuter" msgid="2075249330106127310">"ገለልተኛ"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index f5ab801..53fbdb1 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"صور متحركة تعرض إيماءة الرجوع إلى الخلف التنبؤية"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"تفعيل الصور المتحركة في النظام لإيماءة الرجوع إلى الخلف التنبؤية"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏يفعّل هذا الإعداد الصور المتحركة في النظام للصور المتحركة التي تعرض إيماءة الرجوع إلى الخلف التنبؤية. يتطلب الإعداد ضبط enableOnBackInvokedCallback إلى true لكل تطبيق في ملف البيان."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"نقل لليسار"</item>
-    <item msgid="5425394847942513942">"نقل للأسفل"</item>
-    <item msgid="7728484337962740316">"نقل لليمين"</item>
-    <item msgid="324200556467459329">"نقل للأعلى"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
     <string name="not_specified" msgid="5423502443185110328">"صيغة مخاطبة غير محدَّدة"</string>
     <string name="neuter" msgid="2075249330106127310">"صيغة مخاطبة محايدة"</string>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index a0a52b5..20edf93 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"প্ৰেডিক্টিভ বেক এনিমেশ্বন"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"প্ৰেডিক্টিভ বেকৰ বাবে ছিষ্টেম এনিমেশ্বন সক্ষম কৰক।"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"এই ছেটিংটোৱে প্ৰেডিক্টিভ বেক এনিমেশ্বনৰ বাবে ছিষ্টেম এনিমেশ্বন সক্ষম কৰে। ইয়াৰ বাবে মেনিফেষ্ট ফাইলত প্ৰতি এপত enableOnBackInvokedCallback সত্য বুলি ছেট কৰাৰ প্ৰয়োজন।"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"বাওঁফাললৈ নিয়ক"</item>
-    <item msgid="5425394847942513942">"তললৈ নিয়ক"</item>
-    <item msgid="7728484337962740316">"সোঁফাললৈ নিয়ক"</item>
-    <item msgid="324200556467459329">"ওপৰলৈ নিয়ক"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"নিৰ্দিষ্ট কৰা হোৱা নাই"</string>
     <string name="neuter" msgid="2075249330106127310">"ক্লীৱ লিংগ"</string>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index cb515bf..d7ca008 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -676,7 +676,7 @@
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"Defolt"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"Ekranı aktiv etmək"</string>
     <string name="allow_turn_screen_on" msgid="6194845766392742639">"Ekranı aktiv etməyə icazə verin"</string>
-    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Tətbiqin ekranı aktiv etməsinə icazə verin. İcazə verilərsə, tətbiq istənilən vaxt sizə soruşmadan ekranı aktiv edə bilər."</string>
+    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Tətbiqin ekranı aktiv etməsinə icazə verin. İcazə verilərsə, tətbiq istənilən vaxt sizdən soruşmadan ekranı aktiv edə bilər."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> tətbiqinin yayımlanması dayandırılsın?"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> tətbiqini yayımlasanız və ya nəticəni dəyişsəniz, cari yayımınız dayandırılacaq"</string>
     <string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> tətbiqini yayımlayın"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Proqnozlaşdırılan geri animasiyalar"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Proqnozlaşdırıcı geri jest üçün sistem animasiyalarını aktiv edin."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu ayar proqnozlaşdırıcı jest animasiyası üçün sistem animasiyalarını aktiv edir. Bu, manifest faylında hər bir tətbiq üçün enableOnBackInvokedCallback-in doğru kimi ayarlanmasını tələb edir."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Sola köçürün"</item>
-    <item msgid="5425394847942513942">"Aşağı köçürün"</item>
-    <item msgid="7728484337962740316">"Sağa köçürün"</item>
-    <item msgid="324200556467459329">"Yuxarı köçürün"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Göstərilməyib"</string>
     <string name="neuter" msgid="2075249330106127310">"Neytral"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index 0119674..a10f109 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -141,7 +141,7 @@
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Otkaži"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Uparivanje omogućava pristup kontaktima i istoriji poziva nakon povezivanja."</string>
     <string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Uparivanje sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće."</string>
-    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Uparivanje sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće zbog netačnog PIN-a ili pristupnog koda."</string>
+    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Uparivanje sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g> nije moguće zbog netačnog PIN-a ili pristupnog ključa."</string>
     <string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Nije moguće komunicirati sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
     <string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> je odbio/la uparivanje"</string>
     <string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Računar"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacije za pokret povratka sa predviđanjem"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućite animacije sistema za pokret povratka sa predviđanjem."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ovo podešavanje omogućava animacije sistema za pokret povratka sa predviđanjem. Zahteva podešavanje dozvole enableOnBackInvokedCallback po aplikaciji na true u fajlu manifesta."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Pomerite nalevo"</item>
-    <item msgid="5425394847942513942">"Pomerite nadole"</item>
-    <item msgid="7728484337962740316">"Pomerite nadesno"</item>
-    <item msgid="324200556467459329">"Pomerite nagore"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
     <string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index b46debf..66ce12d 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анімацыя падказкі для жэста вяртання"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Уключыць сістэмную анімацыю падказкі для жэстаў вяртання."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Гэта налада ўключае сістэмную анімацыю падказкі для жэста вяртання. Для гэтага неабходна задаць у файле маніфеста для параметра enableOnBackInvokedCallback значэнне \"True\" для кожнай праграмы."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Перамясціць улева"</item>
-    <item msgid="5425394847942513942">"Перамясціць уніз"</item>
-    <item msgid="7728484337962740316">"Перамясціць управа"</item>
-    <item msgid="324200556467459329">"Перамясціць уверх"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Не ўказаны"</string>
     <string name="neuter" msgid="2075249330106127310">"Ніякі"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 592f617..5166d87 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анимации за предвиждащия жест за връщане назад"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Активиране на системните анимации за предвиждащия жест за връщане назад."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Тази настройка активира системните анимации за предвиждащите жестове. За целта във файла на манифеста трябва да зададете enableOnBackInvokedCallback на true за отделните приложения."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Преместване наляво"</item>
-    <item msgid="5425394847942513942">"Преместване надолу"</item>
-    <item msgid="7728484337962740316">"Преместване надясно"</item>
-    <item msgid="324200556467459329">"Преместване нагоре"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Не е посочено"</string>
     <string name="neuter" msgid="2075249330106127310">"Среден род"</string>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index 3fafee3..7f285f6 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -174,7 +174,7 @@
     <string name="launch_defaults_some" msgid="3631650616557252926">"কিছু ডিফল্ট সেট করা রয়েছে"</string>
     <string name="launch_defaults_none" msgid="8049374306261262709">"কোনও ডিফল্ট সেট করা নেই"</string>
     <string name="tts_settings" msgid="8130616705989351312">"পাঠ্য থেকে ভাষ্য আউটপুট সেটিংস"</string>
-    <string name="tts_settings_title" msgid="7602210956640483039">"টেক্সট-টু-স্পিচ"</string>
+    <string name="tts_settings_title" msgid="7602210956640483039">"টেক্সট-টু-স্পিচ আউটপুট"</string>
     <string name="tts_default_rate_title" msgid="3964187817364304022">"কথা বলার হার"</string>
     <string name="tts_default_rate_summary" msgid="3781937042151716987">"যে গতিতে পাঠ্য উচ্চারিত হয়"</string>
     <string name="tts_default_pitch_title" msgid="6988592215554485479">"পিচ"</string>
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"আলতো চাপ দেখান"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"আলতো চাপ দিলে ভিজ্যুয়াল প্রতিক্রিয়া দেখান"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"প্রেস করা কী দেখুন"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"প্রেস করা ফিজিকাল কীয়ের জন্য ভিস্যুয়াল মতামত দেখুন"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"ফিজিক্যাল কী প্রেস করা হলে ভিজুয়াল ফিডব্যাক দেখুন"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"সারফেস আপডেটগুলি দেখান"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"সম্পূর্ণ উইন্ডোর সারফেস আপডেট হয়ে গেলে সেটিকে ফ্ল্যাশ করুন"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"ভিউয়ের আপডেট দেখুন"</string>
@@ -674,7 +674,7 @@
     <string name="physical_keyboard_title" msgid="4811935435315835220">"ফিজিক্যাল কীবোর্ড"</string>
     <string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"কীবোর্ড লেআউট বেছে নিন"</string>
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"ডিফল্ট"</string>
-    <string name="turn_screen_on_title" msgid="3266937298097573424">"স্ক্রিন চালু করুন"</string>
+    <string name="turn_screen_on_title" msgid="3266937298097573424">"স্ক্রিন চালু করা"</string>
     <string name="allow_turn_screen_on" msgid="6194845766392742639">"স্ক্রিন চালু করার অনুমতি দিন"</string>
     <string name="allow_turn_screen_on_description" msgid="43834403291575164">"অ্যাপকে স্ক্রিন চালু করার অনুমতি দিন। অনুমতি দেওয়া হলে, অ্যাপ আপনার এক্সপ্লিসিট ইনটেন্ট ছাড়াই যেকোনও সময় স্ক্রিন চালু করতে পারবে।"</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> সম্প্রচার বন্ধ করবেন?"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ফিরে যাওয়ার পূর্বাভাস সংক্রান্ত অ্যানিমেশন"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ফিরে যাওয়া সংক্রান্ত পূর্বাভাসের জন্য সিস্টেম অ্যানিমেশন চালু করুন।"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"জেসচারের পূর্বাভাস সংক্রান্ত অ্যানিমেশন দেখাতে এই সেটিং সিস্টেম অ্যানিমেশন চালু করে। এই সেটিংয়ে \'ম্যানিফেস্ট\' ফাইলে প্রত্যেক অ্যাপে enableOnBackInvokedCallback অ্যাট্রিবিউটকে \'ট্রু\' (true) হিসেবে সেট করতে হয়।"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"বাঁদিকে সরান"</item>
-    <item msgid="5425394847942513942">"নিচে নামান"</item>
-    <item msgid="7728484337962740316">"ডানদিকে সরান"</item>
-    <item msgid="324200556467459329">"উপরে সরান"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"নির্দিষ্টভাবে উল্লেখ করা নেই"</string>
     <string name="neuter" msgid="2075249330106127310">"ক্লীব"</string>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 5f7bd2c..d7daed5 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -675,8 +675,8 @@
     <string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"Odaberite raspored tastature"</string>
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"Zadano"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"Uključivanje ekrana"</string>
-    <string name="allow_turn_screen_on" msgid="6194845766392742639">"Dozvolite uključivanje ekrana"</string>
-    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Dozvolite aplikaciji da uključi ekran. Ako se odobri, aplikacija može uključiti ekran bilo kada bez vaše izričite namjere."</string>
+    <string name="allow_turn_screen_on" msgid="6194845766392742639">"Dozvoli uključivanje ekrana"</string>
+    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Dozvolite aplikaciji da uključuje ekran. Ako se odobri, aplikacija može uključiti ekran bilo kada bez vaše izričite namjere."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"Zaustaviti emitiranje aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Ako emitirate aplikaciju <xliff:g id="SWITCHAPP">%1$s</xliff:g> ili promijenite izlaz, trenutno emitiranje će se zaustaviti"</string>
     <string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"Emitiraj aplikaciju <xliff:g id="SWITCHAPP">%1$s</xliff:g>"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacije predvidljivog pokreta unazad"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućava animacije sistema za predvidljivi pokret unazad."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ova postavka omogućava animacije sistema za animaciju predvidljivih pokreta. Potrebno je po aplikaciji postaviti vrijednost za enableOnBackInvokedCallback na tačno u fajlu deklaracije."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Pomjeranje ulijevo"</item>
-    <item msgid="5425394847942513942">"Pomjeranje nadolje"</item>
-    <item msgid="7728484337962740316">"Pomjeranje udesno"</item>
-    <item msgid="324200556467459329">"Pomjeranje nagore"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
     <string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 7143f99..89caaf9 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -306,7 +306,7 @@
     <string name="wifi_non_persistent_mac_randomization_summary" msgid="2159794543105053930">"Quan aquest mode està activat, és possible que l’adreça MAC d\'aquest dispositiu canviï cada vegada que es connecti a una xarxa amb l\'aleatorització d\'adreces MAC activada"</string>
     <string name="wifi_metered_label" msgid="8737187690304098638">"D\'ús mesurat"</string>
     <string name="wifi_unmetered_label" msgid="6174142840934095093">"D\'ús no mesurat"</string>
-    <string name="select_logd_size_title" msgid="1604578195914595173">"Mides de la memòria intermèdia del registrador"</string>
+    <string name="select_logd_size_title" msgid="1604578195914595173">"Mides de la memòria intermèdia del registre"</string>
     <string name="select_logd_size_dialog_title" msgid="2105401994681013578">"Selecciona la mida de la memòria intermèdia del registre"</string>
     <string name="dev_logpersist_clear_warning_title" msgid="8631859265777337991">"Vols esborrar l\'emmagatzematge persistent del registrador?"</string>
     <string name="dev_logpersist_clear_warning_message" msgid="6447590867594287413">"Quan deixem de supervisar amb el registrador persistent, hem d\'esborrar les dades del registrador que hi ha al teu dispositiu."</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacions de retrocés predictiu"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Activa animacions del sistema de retrocés predictiu"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Aquesta configuració activa animacions del sistema per a accions gestuals predictives. Requereix definir enableOnBackInvokedCallback com a \"true\" en cada aplicació al fitxer de manifest."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mou cap a l\'esquerra"</item>
-    <item msgid="5425394847942513942">"Mou cap avall"</item>
-    <item msgid="7728484337962740316">"Mou cap a la dreta"</item>
-    <item msgid="324200556467459329">"Mou cap amunt"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"No s\'ha especificat"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 34e65e63..c4b4967 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Prediktivní animace gesta Zpět"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Povolit systémové animace prediktivního gesta Zpět"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Toto nastavení aktivuje systémové prediktivní animace gest. Vyžaduje, aby v souborech manifestu jednotlivých aplikací byl nastaven atribut enableOnBackInvokedCallback na hodnotu True."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Přesunout doleva"</item>
-    <item msgid="5425394847942513942">"Přesunout dolů"</item>
-    <item msgid="7728484337962740316">"Přesunout doprava"</item>
-    <item msgid="324200556467459329">"Přesunout nahoru"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Neurčeno"</string>
     <string name="neuter" msgid="2075249330106127310">"Střední rod"</string>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 381c3cc6..94852b4 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Foreslåede animationer for Tilbage"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivér systemanimationer for foreslåede animationer for Tilbage."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Denne indstilling aktiverer systemanimationer for de foreslåede animationer for bevægelsen Tilbage. Dette forudsætter konfiguration af enableOnBackInvokedCallback som sand for hver app i manifestfilen."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Flyt til venstre"</item>
-    <item msgid="5425394847942513942">"Flyt ned"</item>
-    <item msgid="7728484337962740316">"Flyt til højre"</item>
-    <item msgid="324200556467459329">"Flyt op"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Ikke angivet"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index b53d191..9d9a82a 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animationen für intelligente „Zurück“-Touch-Geste"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Du kannst Systemanimationen für die intelligente „Zurück“-Touch-Geste aktivieren."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Diese Einstellung aktiviert Systemanimationen für intelligente Touch-Gesten. Dazu muss in der Manifestdatei enableOnBackInvokedCallback auf App-Ebene auf „true“ gesetzt werden."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Nach links"</item>
-    <item msgid="5425394847942513942">"Nach unten"</item>
-    <item msgid="7728484337962740316">"Nach rechts"</item>
-    <item msgid="324200556467459329">"Nach oben"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nicht angegeben"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index b4cc7aa..d65f256 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -585,7 +585,7 @@
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Οι διαχειριστές έχουν ειδικά προνόμια που δεν έχουν οι υπόλοιποι χρήστες Ένας διαχειριστής μπορεί να διαχειριστεί όλους τους χρήστες, να ενημερώσει ή να επαναφέρει αυτήν τη συσκευή, να τροποποιήσει τις ρυθμίσεις, να δει όλες τις εγκατεστημένες εφαρμογές και να εκχωρήσει ή να ανακαλέσει προνόμια διαχειριστή άλλων χρηστών."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Εκχώρηση δικαιωμάτων διαχειριστή"</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"Να γίνει ρύθμιση χρήστη τώρα;"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"Βεβαιωθείτε ότι ο χρήστης μπορεί να πάρει τη συσκευή και ρυθμίστε τον χώρο του"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"Βεβαιωθείτε ότι ο χρήστης μπορεί να πάρει τη συσκευή για τη ρύθμιση του χώρου του"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Να γίνει ρύθμιση προφίλ τώρα;"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"Ρύθμιση τώρα"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"Όχι τώρα"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Κινούμ. εικόνες μετάβασης προς τα πίσω με πρόβλεψη"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ενεργοποίηση κινούμενων εικόνων συστήματος για μετάβαση προς τα πίσω με πρόβλεψη."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Αυτή η ρύθμιση ενεργοποιεί τις κινούμενες εικόνες συστήματος για τις κινούμενες εικόνες κινήσεων με πρόβλεψη. Απαιτεί τη ρύθμιση της παραμέτρου enableOnBackInvokedCallback ως αληθούς σε κάθε εφαρμογή στο αρχείο μανιφέστου."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Μετακίνηση αριστερά"</item>
-    <item msgid="5425394847942513942">"Μετακίνηση προς τα κάτω"</item>
-    <item msgid="7728484337962740316">"Μετακίνηση δεξιά"</item>
-    <item msgid="324200556467459329">"Μετακίνηση προς τα επάνω"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Δεν έχει καθοριστεί"</string>
     <string name="neuter" msgid="2075249330106127310">"Ουδέτερο"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 9fd825b..e35bc19 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Move left"</item>
-    <item msgid="5425394847942513942">"Move down"</item>
-    <item msgid="7728484337962740316">"Move right"</item>
-    <item msgid="324200556467459329">"Move up"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
     <string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 546e5d2..08bcb77 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Move left"</item>
-    <item msgid="5425394847942513942">"Move down"</item>
-    <item msgid="7728484337962740316">"Move right"</item>
-    <item msgid="324200556467459329">"Move up"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
     <string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 9fd825b..e35bc19 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Move left"</item>
-    <item msgid="5425394847942513942">"Move down"</item>
-    <item msgid="7728484337962740316">"Move right"</item>
-    <item msgid="324200556467459329">"Move up"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
     <string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 9fd825b..e35bc19 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Predictive back animations"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Enable system animations for predictive back."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Move left"</item>
-    <item msgid="5425394847942513942">"Move down"</item>
-    <item msgid="7728484337962740316">"Move right"</item>
-    <item msgid="324200556467459329">"Move up"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Not specified"</string>
     <string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index 8256cc9..dba88d0 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‏‎‎‎‏‏‎‎‏‏‏‏‏‎‎‏‏‏‏‎‎‎‏‎‎‏‎‎‎‏‏‏‎‎‏‎‏‎‏‏‎‎‎‏‎‎‎‏‏‎‎‎Predictive back animations‎‏‎‎‏‎"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‎‏‎‏‎‎‏‎‎‏‎‎‏‏‎‎‏‏‎‎‏‎‏‎‏‏‎‎‏‏‎‏‎‏‏‎‏‏‎‎‎‎‏‏‎‏‏‏‏‎‏‎‏‏‏‏‎‎‎‎‎‎Enable system animations for predictive back.‎‏‎‎‏‎"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‎‎‏‏‏‎‏‎‏‎‎‏‏‏‏‏‎‎‎‏‏‏‎‏‎‎‎‎‏‎‏‏‏‏‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‎‎This setting enables system animations for predictive gesture animation. It requires setting per-app enableOnBackInvokedCallback to true in the manifest file.‎‏‎‎‏‎"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‎‎‎‎‎‏‏‏‎‏‏‎‏‎‎‎‎‏‏‏‎‏‎‎‏‏‎‎‏‎‏‏‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‏‎‏‎Move left‎‏‎‎‏‎"</item>
-    <item msgid="5425394847942513942">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‎‎‏‎‏‎‏‏‎‏‏‏‏‏‏‏‎‏‏‏‏‎‏‎‎‎‎‏‎‏‏‏‎‏‏‎‎‏‎‎‎‏‎‏‎‏‎‎‎‏‎‏‏‎‎Move down‎‏‎‎‏‎"</item>
-    <item msgid="7728484337962740316">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‎‎‎‎‏‎‎‎‏‎‏‏‏‏‎‎‎‏‏‏‎‏‏‏‎‎‎‎‎‎‏‏‏‎‎‎‎‎‏‏‎‏‎‏‎‎‏‎‏‏‏‎‎‎Move right‎‏‎‎‏‎"</item>
-    <item msgid="324200556467459329">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‎‏‏‎‎‎‎‎‎‏‏‏‏‎‎‎‎‏‏‏‎‏‎‎‎‎‏‎‏‎‏‎‎‎‎‎‎‎‏‎Move up‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‏‎‎‎‎‏‏‎‎‏‎‏‎‏‏‏‏‎‎‏‎‏‎‏‎‏‎‏‏‎‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="PERCENTAGE">%1$d</xliff:g>‎‏‎‎‏‏‏‎ %%‎‏‎‎‏‎"</string>
     <string name="not_specified" msgid="5423502443185110328">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‎‎‎‏‎‎‎‎‏‎‎‏‏‎‏‎‏‏‏‏‎‎‏‎‏‏‎‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‏‏‎‏‎‎‏‏‏‎‎‎‎Not specified‎‏‎‎‏‎"</string>
     <string name="neuter" msgid="2075249330106127310">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‎‏‎‎‎‏‎‎‎‏‎‏‎‏‎‎‎‏‎‏‎‏‎‏‎‏‏‏‏‏‎‏‎‎‏‏‏‏‎‎‏‏‏‎‎Neuter‎‏‎‎‏‎"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index ff9f7ae..79d3822 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animaciones de gesto predictivo"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Habilita animaciones del sistema para gestos de retroceso predictivos."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuración habilita las animaciones del sistema para la animación de gestos predictiva. Se requiere la configuración por app de enableOnBackInvokedCallback en verdadero en el archivo de manifiesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mover hacia la izquierda"</item>
-    <item msgid="5425394847942513942">"Mover hacia abajo"</item>
-    <item msgid="7728484337962740316">"Mover hacia la derecha"</item>
-    <item msgid="324200556467459329">"Mover hacia arriba"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Sin especificar"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index abf60d8..af03e18 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -355,8 +355,8 @@
     <string name="pointer_location_summary" msgid="957120116989798464">"Superpone los datos de las pulsaciones en la pantalla"</string>
     <string name="show_touches" msgid="8437666942161289025">"Mostrar toques"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Muestra la ubicación de los toques en la pantalla"</string>
-    <string name="show_key_presses" msgid="6360141722735900214">"Ver pulsación de teclas"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"Ver respuestas visuales al pulsar teclas físicas"</string>
+    <string name="show_key_presses" msgid="6360141722735900214">"Ver teclas pulsadas"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"Muestra respuestas visuales al pulsar teclas físicas"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Mostrar cambios de superficies"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Hace parpadear todas las superficies de la ventana cuando se actualizan"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"Ver actualizaciones de vista"</string>
@@ -580,7 +580,7 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"Perfil restringido"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"¿Añadir nuevo usuario?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"Puedes compartir este dispositivo si creas más usuarios. Cada uno tendrá su propio espacio y podrá personalizarlo con aplicaciones, un fondo de pantalla y mucho más. Los usuarios también pueden ajustar opciones del dispositivo, como la conexión Wi‑Fi, que afectan a todos los usuarios.\n\nCuando añadas un usuario, tendrá que configurar su espacio.\n\nCualquier usuario puede actualizar aplicaciones de todos los usuarios. Es posible que no se transfieran los servicios y opciones de accesibilidad al nuevo usuario."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"Al añadir un nuevo usuario, dicha persona debe configurar su espacio.\n\nCualquier usuario puede actualizar las aplicaciones del resto de usuarios."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"Al añadir un nuevo usuario, dicha persona debe configurar su espacio.\n\nCualquier usuario puede actualizar las aplicaciones del resto de los usuarios."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"¿Convertir a este usuario en administrador?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Los administradores tienen privilegios especiales que otros usuarios no tienen. Los administradores pueden gestionar todos los usuarios, actualizar o restablecer este dispositivo, modificar los ajustes, ver todas las aplicaciones instaladas y conceder o revocar privilegios de administrador a otros usuarios."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Convertir en administrador"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animaciones para acciones de retorno predictivas"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Habilita animaciones del sistema para acciones de retorno predictivas."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Este ajuste habilita animaciones del sistema para acciones gestuales predictivas. Exige definir el valor de enableOnBackInvokedCallback en \"verdadero\" para cada aplicación en el archivo de manifiesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Muévete hacia la izquierda"</item>
-    <item msgid="5425394847942513942">"Muévete hacia abajo"</item>
-    <item msgid="7728484337962740316">"Muévete hacia la derecha"</item>
-    <item msgid="324200556467459329">"Muévete hacia arriba"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Sin especificar"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 4e70a53..56e50f98 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -585,7 +585,7 @@
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Administraatoritel on eriõigused, mida teistel kasutajatel pole. Administraator saab hallata kõiki kasutajaid, värskendada või lähtestada seda seadet, muuta seadeid, vaadata kõiki installitud rakendusi ja anda teistele kasutajatele administraatoriõigused või need eemaldada."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Määra administraatoriks"</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"Kas seadistada kasutaja kohe?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"Veenduge, et isik saaks seadet kasutada ja oma ruumi seadistada"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"Veenduge, et isik saaks seadet kasutada ja oma ruumi seadistada."</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Kas soovite kohe profiili seadistada?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"Seadista kohe"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"Mitte praegu"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Tagasiliigutuse prognoosi animatsioon"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Lubage süsteemi animatsioonid, et näha prognoositud tagasiliigutusi."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"See seade võimaldab süsteemi animatsioonidel prognoosida tagasiliigutusi. See nõuab manifestifailis rakendusepõhise atribuudi enableOnBackInvokedCallback määramist tõeseks."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Liiguta vasakule"</item>
-    <item msgid="5425394847942513942">"Liiguta alla"</item>
-    <item msgid="7728484337962740316">"Liiguta paremale"</item>
-    <item msgid="324200556467459329">"Liiguta üles"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Pole määratud"</string>
     <string name="neuter" msgid="2075249330106127310">"Kesksugu"</string>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 8dd6007..41a3651 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Atzera egiteko keinuaren animazio-igarleak"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Gaitu atzera egiteko keinuaren sistemaren animazio-igarleak."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Atzera egiteko keinuaren sistemaren animazio-igarleak gaitzen ditu ezarpenak. enableOnBackInvokedCallback-ek egiazko gisa ezarrita egon behar du aplikazio bakoitzaren manifestu-fitxategian."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Eraman ezkerrera"</item>
-    <item msgid="5425394847942513942">"Eraman behera"</item>
-    <item msgid="7728484337962740316">"Eraman eskuinera"</item>
-    <item msgid="324200556467459329">"Eraman gora"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
     <string name="not_specified" msgid="5423502443185110328">"Zehaztugabea"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutroa"</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index beaaa39..8382378 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -675,7 +675,7 @@
     <string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"انتخاب طرح‌بندی صفحه‌کلید"</string>
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"پیش‌فرض"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"روشن کردن صفحه‌نمایش"</string>
-    <string name="allow_turn_screen_on" msgid="6194845766392742639">"اعطای اجازه برای روشن کردن صفحه‌نمایش"</string>
+    <string name="allow_turn_screen_on" msgid="6194845766392742639">"اجازه روشن کردن صفحه‌نمایش"</string>
     <string name="allow_turn_screen_on_description" msgid="43834403291575164">"به برنامه اجازه می‌دهد صفحه‌نمایش را روشن کند. اگر اجازه داده شود، ممکن است این برنامه در هر زمانی بدون هدف صریح شما صفحه‌نمایش را روشن کند."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"همه‌فرستی <xliff:g id="APP_NAME">%1$s</xliff:g> متوقف شود؟"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"اگر <xliff:g id="SWITCHAPP">%1$s</xliff:g> را همه‌فرستی کنید یا خروجی را تغییر دهید، همه‌فرستی کنونی متوقف خواهد شد"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"پویانمایی‌های اشاره برگشت پیش‌گویانه"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"پویانمایی‌های سیستم را برای اشاره برگشت پیش‌گویانه فعال کنید."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏این تنظیم پویانمایی‌های سیستم را برای پویانمایی اشاره برگشت پیش‌بینانه فعال می‌کند. این تنظیم مستلزم تنظیم شدن enableOnBackInvokedCallback مربوط به هر برنامه روی صحیح در فایل مانیفست است."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"انتقال به‌چپ"</item>
-    <item msgid="5425394847942513942">"انتقال به‌پایین"</item>
-    <item msgid="7728484337962740316">"انتقال به‌راست"</item>
-    <item msgid="324200556467459329">"انتقال به‌بالا"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>٪"</string>
     <string name="not_specified" msgid="5423502443185110328">"نامشخص"</string>
     <string name="neuter" msgid="2075249330106127310">"خنثی"</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index ec1c1f1..20ed75e 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Takaisin siirtymisen ennakoivat animaatiot"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ota käyttöön takaisin siirtymisen ennakoivat järjestelmäanimaatiot"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Asetus ottaa järjestelmäanimaatiot käyttöön ennakoiville eleanimaatioille. Se edellyttää, että enableOnBackInvokedCallback-arvo on Tosi sovelluksen manifestitiedostossa."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Siirrä vasemmalle"</item>
-    <item msgid="5425394847942513942">"Siirrä alas"</item>
-    <item msgid="7728484337962740316">"Siirrä oikealle"</item>
-    <item msgid="324200556467459329">"Siirrä ylös"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Ei määritetty"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutri"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index f48bfcb..3fdf304 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animations pour le retour prédictif"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Activer les animations système pour le retour prédictif."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ce paramètre permet d\'activer les animations du système pour l\'animation des gestes prédictifs. Cela exige de définir le paramètre enableOnBackInvokedCallback à Vrai pour chaque application dans le fichier de configuration."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Déplacez vers la gauche"</item>
-    <item msgid="5425394847942513942">"Déplacez vers le bas"</item>
-    <item msgid="7728484337962740316">"Déplacez vers la droite"</item>
-    <item msgid="324200556467459329">"Déplacez vers le haut"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Non précisé"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index ca5edfe..7e99fa7 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -355,8 +355,8 @@
     <string name="pointer_location_summary" msgid="957120116989798464">"Superposition à l\'écran indiquant l\'emplacement actuel du curseur"</string>
     <string name="show_touches" msgid="8437666942161289025">"Indicateurs visuels"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Afficher un indicateur visuel là où l\'utilisateur appuie sur l\'écran"</string>
-    <string name="show_key_presses" msgid="6360141722735900214">"Afficher appuis touche"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"Afficher retour visuel pour appuis de touches"</string>
+    <string name="show_key_presses" msgid="6360141722735900214">"Afficher les pressions sur les touches"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"Afficher un retour visuel des pressions sur les touches"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Mises à jour de la surface"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Faire clignoter les endroits où des mises à jour sont effectuées"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"Mises à jour de fenêtres"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animations pour prévisualisation du Retour"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Activer les animations système pour la prévisualisation du Retour"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ce paramètre active les animations système pour la prévisualisation du geste de retour. Pour cela, enableOnBackInvokedCallback doit être défini sur \"True\" dans le fichier manifeste de chaque appli."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Déplacer vers la gauche"</item>
-    <item msgid="5425394847942513942">"Déplacer vers le bas"</item>
-    <item msgid="7728484337962740316">"Déplacer vers la droite"</item>
-    <item msgid="324200556467459329">"Déplacer vers le haut"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Non défini"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 61b01f6..8132a87 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacións de retroceso preditivo"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Activa as animacións do sistema para o retroceso preditivo."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta opción de configuración activa as animacións xestuais preditivas. É preciso definir enableOnBackInvokedCallback como True (verdadeiro) para cada aplicación no ficheiro de manifesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mover cara á esquerda"</item>
-    <item msgid="5425394847942513942">"Mover cara abaixo"</item>
-    <item msgid="7728484337962740316">"Mover cara á dereita"</item>
-    <item msgid="324200556467459329">"Mover cara arriba"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Sen especificar"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 981cf57..239b04d 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"પાછળના પૂર્વાનુમાનિત ઍનિમેશન્સ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"પાછળના પૂર્વાનુમાનિત સંકેત માટે સિસ્ટમ ઍનિમેશન ચાલુ કરો."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"આ સેટિંગ પૂર્વાનુમાનિત સંકેત ઍનિમેશન માટે સિસ્ટમ ઍનિમેશન ચાલુ કરે છે. તેના માટે દરેક ઍપ માટે મેનિફેસ્ટ ફાઇલમાં enableOnBackInvokedCallbackને true પર સેટ કરવાની જરૂર પડે છે."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ડાબે ખસેડો"</item>
-    <item msgid="5425394847942513942">"નીચે ખસેડો"</item>
-    <item msgid="7728484337962740316">"જમણે ખસેડો"</item>
-    <item msgid="324200556467459329">"ઉપર ખસેડો"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ઉલ્લેખિત નથી"</string>
     <string name="neuter" msgid="2075249330106127310">"નાન્યતર"</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 9be1cd6..06ddcd9 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -214,7 +214,7 @@
   </string-array>
     <string name="choose_profile" msgid="343803890897657450">"प्रोफ़ाइल चुनें"</string>
     <string name="category_personal" msgid="6236798763159385225">"निजी"</string>
-    <string name="category_work" msgid="4014193632325996115">"वर्क ऐप्लिकेशन"</string>
+    <string name="category_work" msgid="4014193632325996115">"वर्क"</string>
     <string name="category_clone" msgid="1554511758987195974">"क्लोन"</string>
     <string name="development_settings_title" msgid="140296922921597393">"डेवलपर के लिए सेटिंग और टूल"</string>
     <string name="development_settings_enable" msgid="4285094651288242183">"डेवलपर के लिए सेटिंग और टूल चालू करें"</string>
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"टैप दिखाएं"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"टैप के लिए विज़ुअल फ़ीडबैक दिखाएं"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"दबाए गए बटन दिखाएं"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"दबाए गए बटन के लिए विज़ुअल फ़ीडबैक दिखाएं"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"दबाए गए बटन का विज़ुअल फ़ीडबैक दिखाएं"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"सर्फ़ेस अपडेट दिखाएं"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"अपडेट होने पर पूरे विंडो सर्फ़ेस फ़्लैश करें"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"जीपीयू व्यू के अपडेट दिखाएं"</string>
@@ -584,10 +584,10 @@
     <string name="user_grant_admin_title" msgid="5157031020083343984">"क्या इस व्यक्ति को एडमिन बनाना है?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"एडमिन के पास अन्य लोगों के मुकाबले खास अधिकार होते हैं. एडमिन के पास ये अधिकार होते हैं: सभी लोगों को मैनेज करना, इस डिवाइस को अपडेट या रीसेट करना, सेटिंग में बदलाव करना, इंस्टॉल किए गए सभी ऐप्लिकेशन देखना, और अन्य लोगों को एडमिन के खास अधिकार देना या उन्हें वापस लेना."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"एडमिन बनाएं"</string>
-    <string name="user_setup_dialog_title" msgid="8037342066381939995">"उपयोगकर्ता को अभी सेट करें?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"पक्का करें कि व्यक्ति डिवाइस का इस्तेमाल करने और अपनी जगह सेट करने के लिए मौजूद है"</string>
+    <string name="user_setup_dialog_title" msgid="8037342066381939995">"उपयोगकर्ता खाता सेटअप करना है?"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"पक्का करें कि उपयोगकर्ता, डिवाइस पर अपने खाते को पसंद के हिसाब से सेट अप करने के लिए मौजूद हो"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"प्रोफ़ाइल अभी सेट करें?"</string>
-    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"अभी सेट करें"</string>
+    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"अभी सेट अप करें"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"रद्द करें"</string>
     <string name="user_add_user_type_title" msgid="551279664052914497">"जोड़ें"</string>
     <string name="user_new_user_name" msgid="60979820612818840">"नया उपयोगकर्ता"</string>
@@ -674,7 +674,7 @@
     <string name="physical_keyboard_title" msgid="4811935435315835220">"फ़िज़िकल कीबोर्ड"</string>
     <string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"कीबोर्ड का लेआउट चुनें"</string>
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"डिफ़ॉल्ट"</string>
-    <string name="turn_screen_on_title" msgid="3266937298097573424">"स्क्रीन चालू करें"</string>
+    <string name="turn_screen_on_title" msgid="3266937298097573424">"स्क्रीन चालू करने की अनुमति"</string>
     <string name="allow_turn_screen_on" msgid="6194845766392742639">"स्क्रीन चालू करने की अनुमति दें"</string>
     <string name="allow_turn_screen_on_description" msgid="43834403291575164">"ऐप्लिकेशन को स्क्रीन चालू करने की अनुमति दें. ऐसा करने पर, ऐप्लिकेशन आपकी अनुमति लिए बिना भी, जब चाहे स्क्रीन चालू कर सकता है."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> पर ब्रॉडकास्ट करना रोकें?"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"पीछे जाने पर झलक दिखाने वाले जेस्चर का ऐनिमेशन"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"पीछे जाने पर झलक दिखाने वाले हाथ के जेस्चर के लिए सिस्टम ऐनिमेशन चालू करें."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"यह सेटिंग, सिस्टम के ऐनिमेशन को प्रिडिक्टिव जेस्चर ऐनिमेशन के लिए चालू कर देती है. मेनिफ़ेस्ट फ़ाइल में enableOnBackInvokedCallback की सेटिंग को हर ऐप्लिकेशन के हिसाब से \'सही\' पर सेट होना चाहिए."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"बाईं ओर ले जाएं"</item>
-    <item msgid="5425394847942513942">"नीचे ले जाएं"</item>
-    <item msgid="7728484337962740316">"दाईं ओर ले जाएं"</item>
-    <item msgid="324200556467459329">"ऊपर की ओर ले जाएं"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"जानकारी नहीं दी गई"</string>
     <string name="neuter" msgid="2075249330106127310">"नपुंसक लिंग"</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 8a0114a..c5bea27 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacije za pokret povratka s pregledom"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogućuje animaciju kad korisnik napravi povratnu kretnju."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ova postavka omogućuje animacije sustava za animaciju pokreta s predviđanjem. Zahtijeva postavljanje dopuštenja enableOnBackInvokedCallback po aplikaciji na True u datoteci manifesta."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Pomicanje ulijevo"</item>
-    <item msgid="5425394847942513942">"Pomicanje prema dolje"</item>
-    <item msgid="7728484337962740316">"Pomicanje udesno"</item>
-    <item msgid="324200556467459329">"Pomicanje prema gore"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nije navedeno"</string>
     <string name="neuter" msgid="2075249330106127310">"Srednji rod"</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index b5e1e01..e43ed43 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Prediktív „vissza” kézmozdulat-animációk"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Rendszeranimációk engedélyezése prediktív „vissza” kézmozdulatok esetén."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"A beállítás engedélyezi a rendszeranimációkat a prediktív kézmozdulat-animációk esetén. A használatukhoz az enableOnBackInvokedCallback beállítást true értékre kell állítani az egyes alkalmazások manifestfájljaiban."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mozgatás balra"</item>
-    <item msgid="5425394847942513942">"Mozgatás lefelé"</item>
-    <item msgid="7728484337962740316">"Mozgatás jobbra"</item>
-    <item msgid="324200556467459329">"Mozgatás felfelé"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nincs megadva"</string>
     <string name="neuter" msgid="2075249330106127310">"Semleges nemű alak"</string>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index 9808f70..b8f94f4 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"«Հետ» ժեստի հուշման շարժանկարներ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Միացնել համակարգի անիմացիաները «Հետ» ժեստի հուշման համար"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Այս կարգավորման միջոցով կարելի է միացնել համակարգային շարժանկարները ժեստի հուշման համար։ Կարգավորումը պահանջում է մանիֆեստի ֆայլում սահմանել true արժեքը per-app enableOnBackInvokedCallback հատկության համար։"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Տեղափոխել ձախ"</item>
-    <item msgid="5425394847942513942">"Տեղափոխել ներքև"</item>
-    <item msgid="7728484337962740316">"Տեղափոխել աջ"</item>
-    <item msgid="324200556467459329">"Տեղափոխել վերև"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Նշված չէ"</string>
     <string name="neuter" msgid="2075249330106127310">"Չեզոք"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 7d70b88..f867ba58d 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -598,7 +598,7 @@
     <string name="user_set_lock_button" msgid="1427128184982594856">"Setel kunci"</string>
     <string name="user_switch_to_user" msgid="6975428297154968543">"Beralih ke <xliff:g id="USER_NAME">%s</xliff:g>"</string>
     <string name="creating_new_user_dialog_message" msgid="7232880257538970375">"Membuat pengguna baru …"</string>
-    <string name="creating_new_guest_dialog_message" msgid="1114905602181350690">"Membuat tamu baru …"</string>
+    <string name="creating_new_guest_dialog_message" msgid="1114905602181350690">"Membuat tamu baru…"</string>
     <string name="add_user_failed" msgid="4809887794313944872">"Gagal membuat pengguna baru"</string>
     <string name="add_guest_failed" msgid="8074548434469843443">"Gagal membuat tamu baru"</string>
     <string name="user_nickname" msgid="262624187455825083">"Nama panggilan"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animasi kembali prediktif"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktifkan animasi sistem untuk kembali prediktif."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Setelan ini mengaktifkan animasi sistem untuk animasi gestur prediktif. Setelan ini mewajibkan enableOnBackInvokedCallback per-aplikasi disetel ke benar (true) dalam file manifes."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Pindahkan ke kiri"</item>
-    <item msgid="5425394847942513942">"Pindahkan ke bawah"</item>
-    <item msgid="7728484337962740316">"Pindahkan ke kanan"</item>
-    <item msgid="324200556467459329">"Pindahkan ke atas"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Tidak ditentukan"</string>
     <string name="neuter" msgid="2075249330106127310">"Netral"</string>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 650f76d..aa9d8f8 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Hreyfimyndir flýtiritunar við bendinguna „til baka“"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Kveikja á hreyfimyndum í kerfinu til að sýna hreyfimyndir þegar bendingin „til baka“ er gerð."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Þessi stilling kveikir á hreyfimyndum í kerfinu til að sýna hreyfimyndir flýtiritunar með bendingum. Stillingin krefst þess að kveikt sé á enableOnBackInvokedCallback í upplýsingaskránni fyrir hvert forrit."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Færa til vinstri"</item>
-    <item msgid="5425394847942513942">"Færa niður"</item>
-    <item msgid="7728484337962740316">"Færa til hægri"</item>
-    <item msgid="324200556467459329">"Færa upp"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Ekki gefið upp"</string>
     <string name="neuter" msgid="2075249330106127310">"Kynsegin"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index d783bf1..1f35f74 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animazioni predittive per Indietro"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Attiva le animazioni di sistema per il gesto Indietro predittivo."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Questa impostazione attiva le animazioni di sistema per il gesto Indietro predittivo. Richiede di impostare il metodo enableOnBackInvokedCallback su true nel file manifest di tutte le app."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Sposta a sinistra"</item>
-    <item msgid="5425394847942513942">"Sposta in basso"</item>
-    <item msgid="7728484337962740316">"Sposta a destra"</item>
-    <item msgid="324200556467459329">"Sposta in alto"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Non specificato"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fc83630..f0a19d4 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"חיזוי אנימציה של תנועת החזרה"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"הפעלת אנימציות מערכת עבור חיזוי של תנועת החזרה."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏ההגדרה הזו מפעילה אנימציות מערכת עבור חיזוי אנימציה של תנועת החזרה. היא מחייבת הגדרה בכל אפליקציה של ערך true בשדה enableOnBackInvokedCallback בקובץ המניפסט."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"הזזה שמאלה"</item>
-    <item msgid="5425394847942513942">"הזזה למטה"</item>
-    <item msgid="7728484337962740316">"הזזה ימינה"</item>
-    <item msgid="324200556467459329">"הזזה למעלה"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"%% <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
     <string name="not_specified" msgid="5423502443185110328">"לא רוצה להגדיר"</string>
     <string name="neuter" msgid="2075249330106127310">"ניטרלי"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 3f09083..36c11cd 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"タップを表示"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"タップを視覚表示する"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"キーの押下を表示"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"物理キーの押下に関する視覚的フィードバックを表示"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"物理キーが押下されたことを視覚的に表示"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"表示面の更新を通知"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"更新時にウィンドウの表示面全体を点滅させる"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"画面の更新を表示"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"予測型「戻る」アニメーション"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"予測型「戻る」のシステム アニメーションを有効にする。"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"この設定は、予測型操作のシステム アニメーションを有効にします。アプリごとにマニフェスト ファイルで enableOnBackInvokedCallback を true に設定する必要があります。"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"左に移動"</item>
-    <item msgid="5425394847942513942">"下に移動"</item>
-    <item msgid="7728484337962740316">"右に移動"</item>
-    <item msgid="324200556467459329">"上に移動"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"指定しない"</string>
     <string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index ed7c8d7..f516cf2 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"უკან დაბრუნების ანიმაციის პროგნოზირება"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"უკან დაბრუნების პროგნოზირებადი ანიმაციისთვის სისტემის ანიმაციების ჩართვა."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ეს პარამეტრი ჩართავს სისტემის ანიმაციებს ჟესტების პროგნოზირებადი ანიმაციებისთვის. საჭიროა, რომ აღწერის ფაილში აპის enableOnBackInvokedCallback პარამეტრი იყოს ჭეშმარიტი."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"მარცხნივ გადატანა"</item>
-    <item msgid="5425394847942513942">"ქვემოთ გადატანა"</item>
-    <item msgid="7728484337962740316">"მარჯვნივ გადატანა"</item>
-    <item msgid="324200556467459329">"ზემოთ გადატანა"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"არ არის მითითებული"</string>
     <string name="neuter" msgid="2075249330106127310">"საშუალო"</string>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 982000f..36ee23a 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"\"Артқа\" қимылына арналған тұспал анимациясы"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"\"Артқа\" қимылына арналған жүйелік тұспал анимацияларын іске қосу."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Бұл параметр қимылға арналған жүйелік тұспал анимацияларын іске қосады. Ол үшін әр қолданбаның манифест файлында enableOnBackInvokedCallback үшін \"True\" мәні қойылуы керек."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Солға жылжыту"</item>
-    <item msgid="5425394847942513942">"Төмен жылжыту"</item>
-    <item msgid="7728484337962740316">"Оңға жылжыту"</item>
-    <item msgid="324200556467459329">"Жоғары жылжыту"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Көрсетілмеген"</string>
     <string name="neuter" msgid="2075249330106127310">"Орта тек"</string>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 26bb1e2..75c0f6a 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"បង្ហាញការចុច"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"បង្ហាញដានចុច នៅពេលចុច"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"បង្ហាញការចុចគ្រាប់ចុច"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"បង្ហាញព័ត៌មានឆ្លើយតបជារូបភាពសម្រាប់ការចុចគ្រាប់ចុចរូបវន្ត"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"បង្ហាញរូបភាពប្រតិកម្មសម្រាប់ការចុចគ្រាប់ចុចរូបវន្ត"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"បង្ហាញ​បច្ចុប្បន្នភាព​ផ្ទៃ"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"ផ្ទៃ​វីនដូទាំង​មូល​បញ្ចេញពន្លឺ​នៅពេល​ធ្វើ​បច្ចុប្បន្នភាព"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"បង្ហាញ​បច្ចុប្បន្នភាពទិដ្ឋភាព"</string>
@@ -585,7 +585,7 @@
     <string name="user_grant_admin_message" msgid="1673791931033486709">"អ្នកគ្រប់គ្រងមានសិទ្ធិពិសេសដែលអ្នកប្រើប្រាស់ផ្សេងទៀតមិនមាន។ អ្នកគ្រប់គ្រងអាចគ្រប់គ្រងអ្នកប្រើប្រាស់ទាំងអស់ ធ្វើបច្ចុប្បន្នភាពឬកំណត់ឧបករណ៍នេះឡើងវិញ កែសម្រួលការកំណត់ មើលកម្មវិធីដែលបានដំឡើងទាំងអស់ និងផ្ដល់ឬដកសិទ្ធិជាអ្នកគ្រប់គ្រងសម្រាប់អ្នកផ្សេងទៀត។"</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"ផ្ដល់សិទ្ធិជាអ្នកគ្រប់គ្រង"</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"រៀបចំ​អ្នក​ប្រើ​ប្រាស់ឥឡូវនេះ?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"សូម​ប្រាកដ​ថា​​អ្នក​ប្រើ​ប្រាស់នេះ​អាច​យក​​ឧបករណ៍ ​និង​រៀបចំ​​ទំហំ​ផ្ទុករបស់​គេបាន"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"សូម​ប្រាកដ​ថា​​អ្នក​ប្រើ​ប្រាស់នេះ​អាច​យក​​ឧបករណ៍ ​និង​រៀបចំ​​ទំហំ​ផ្ទុករបស់​គាត់បាន"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"រៀបចំ​ប្រវត្តិរូប​ឥឡូវ?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"រៀបចំ​ឥឡូវ"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"កុំទាន់"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ចលនា​ថយក្រោយ​ដែល​ព្យាករ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"បើក​ចលនា​ប្រព័ន្ធ​សម្រាប់​ការ​ថយក្រោយ​ព្យាករ។"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ការ​កំណត់នេះ​បើក​ចលនា​ប្រព័ន្ធ​សម្រាប់​ចលនាព្យាករ។ ចលនា​នេះ​ទាមទារ​ការ​កំណត់ enableOnBackInvokedCallback នៅ​ក្នុងកម្មវិធី​ទៅពិត​នៅ​ក្នុង​ឯកសារ​មេនីហ្វេសថ៍។"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ផ្លាស់ទី​ទៅ​ឆ្វេង"</item>
-    <item msgid="5425394847942513942">"ផ្លាស់ទី​ចុះ​ក្រោម"</item>
-    <item msgid="7728484337962740316">"ផ្លាស់ទីទៅ​ស្តាំ"</item>
-    <item msgid="324200556467459329">"ផ្លាស់ទី​ឡើង​លើ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"មិនបានបញ្ជាក់"</string>
     <string name="neuter" msgid="2075249330106127310">"អភេទ"</string>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 5a09396..94df419 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -579,7 +579,7 @@
     <string name="user_add_user_item_title" msgid="2394272381086965029">"ಬಳಕೆದಾರ"</string>
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"ನಿರ್ಬಂಧಿಸಿದ ಪ್ರೊಫೈಲ್"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಬೇಕೆ?"</string>
-    <string name="user_add_user_message_long" msgid="1527434966294733380">"ನೀವು ಹೆಚ್ಚುವರಿ ಬಳಕೆದಾರರನ್ನು ರಚಿಸುವ ಮೂಲಕ ಇತರ ಜನರ ಜೊತೆಗೆ ಈ ಸಾಧನವನ್ನು ಹಂಚಿಕೊಳ್ಳಬಹುದು. ಪ್ರತಿ ಬಳಕೆದಾರರು ತಮ್ಮದೇ ಸ್ಥಳವನ್ನು ಹೊಂದಿರುತ್ತಾರೆ, ಇದರಲ್ಲಿ ಅವರು ತಮ್ಮದೇ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ವಾಲ್‌ಪೇಪರ್ ಮತ್ತು ಮುಂತಾದವುಗಳ ಮೂಲಕ ಕಸ್ಟಮೈಸ್ ಮಾಡಿಕೊಳ್ಳಬಹುದು. ಎಲ್ಲರ ಮೇಲೂ ಪರಿಣಾಮ ಬೀರುವಂತೆ ವೈ-ಫೈ ರೀತಿಯ ಸಾಧನ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಕೆದಾರರು ಸರಿಹೊಂದಿಸಬಹುದು.\n\nನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗೆ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಮತ್ತು ಸೇವೆಗಳು ಹೊಸ ಬಳಕೆದಾರರಿಗೆ ವರ್ಗಾವಣೆ ಆಗದಿರಬಹುದು."</string>
+    <string name="user_add_user_message_long" msgid="1527434966294733380">"ನೀವು ಹೆಚ್ಚುವರಿ ಬಳಕೆದಾರರನ್ನು ರಚಿಸುವ ಮೂಲಕ ಇತರ ಜನರ ಜೊತೆಗೆ ಈ ಸಾಧನವನ್ನು ಹಂಚಿಕೊಳ್ಳಬಹುದು. ಪ್ರತಿ ಬಳಕೆದಾರರು ತಮ್ಮದೇ ಸ್ಥಳವನ್ನು ಹೊಂದಿರುತ್ತಾರೆ, ಇದರಲ್ಲಿ ಅವರು ತಮ್ಮದೇ ಆ್ಯಪ್‌ಗಳು, ವಾಲ್‌ಪೇಪರ್ ಮತ್ತು ಮುಂತಾದವುಗಳ ಮೂಲಕ ಕಸ್ಟಮೈಸ್ ಮಾಡಿಕೊಳ್ಳಬಹುದು. ಎಲ್ಲರ ಮೇಲೂ ಪರಿಣಾಮ ಬೀರುವಂತೆ ವೈ-ಫೈ ರೀತಿಯ ಸಾಧನ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಬಳಕೆದಾರರು ಸರಿಹೊಂದಿಸಬಹುದು.\n\nನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗೆ ಆ್ಯಪ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಮತ್ತು ಸೇವೆಗಳು ಹೊಸ ಬಳಕೆದಾರರಿಗೆ ವರ್ಗಾವಣೆ ಆಗದಿರಬಹುದು."</string>
     <string name="user_add_user_message_short" msgid="3295959985795716166">"ನೀವು ಒಬ್ಬ ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ತಮ್ಮ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ.\n\nಯಾವುದೇ ಬಳಕೆದಾರರು ಎಲ್ಲಾ ಇತರೆ ಬಳಕೆದಾರರಿಗಾಗಿ ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"ಈ ಬಳಕೆದಾರರನ್ನು ನಿರ್ವಾಹಕರನ್ನಾಗಿ ಮಾಡಬೇಕೆ?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"ನಿರ್ವಾಹಕರು ಇತರ ಬಳಕೆದಾರರಿಗೆ ಇಲ್ಲದ ವಿಶೇಷ ಸೌಲಭ್ಯಗಳನ್ನು ಹೊಂದಿದ್ದಾರೆ. ನಿರ್ವಾಹಕರು ಎಲ್ಲಾ ಬಳಕೆದಾರರನ್ನು ನಿರ್ವಹಿಸಬಹುದು, ಈ ಸಾಧನವನ್ನು ಅಪ್‌ಡೇಟ್‌ ಮಾಡಬಹುದು ಅಥವಾ ರೀಸೆಟ್ ಮಾಡಬಹುದು, ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಹೊಂದಿಸಬಹುದು, ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಲಾದ ಎಲ್ಲಾ ಆ್ಯಪ್‌ಗಳನ್ನು ವೀಕ್ಷಿಸಬಹುದು ಮತ್ತು ಇತರರಿಗೆ ನಿರ್ವಾಹಕರಿಗೆ ನೀಡಿರುವ ಸೌಲಭ್ಯಗಳನ್ನು ನೀಡಬಹುದು ಅಥವಾ ಹಿಂತೆಗೆದುಕೊಳ್ಳಬಹುದು."</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ಮುನ್ಸೂಚಕ ಬ್ಯಾಕ್ ಆ್ಯನಿಮೇಶನ್‌ಗಳು"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ಮುನ್ಸೂಚಕ ಬ್ಯಾಕ್ ಗೆಸ್ಚರ್‌ಗಾಗಿ ಸಿಸ್ಟಂ ಆ್ಯನಿಮೇಶನ್‌ಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ಮುನ್ನೋಟದ ಗೆಸ್ಚರ್ ಆ್ಯನಿಮೇಶನ್‌ಗಾಗಿ ಸಿಸ್ಟಂ ಆ್ಯನಿಮೇಶನ್‌ಗಳನ್ನು ಈ ಸೆಟ್ಟಿಂಗ್ ಸಕ್ರಿಯಗೊಳಿಸುತ್ತವೆ. ಇದನ್ನು ಮಾಡಲು, ಪ್ರತಿ ಆ್ಯಪ್‌ನ ಮ್ಯಾನಿಫೆಸ್ಟ್ ಫೈಲ್‌ನಲ್ಲಿರುವ enableOnBackInvokedCallback ಪ್ಯಾರಾಮೀಟರ್ ಅನ್ನು ಸರಿ ಎಂದು ಹೊಂದಿಸಬೇಕು."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ಎಡಕ್ಕೆ ಸರಿಸಿ"</item>
-    <item msgid="5425394847942513942">"ಕೆಳಕ್ಕೆ ಸರಿಸಿ"</item>
-    <item msgid="7728484337962740316">"ಬಲಕ್ಕೆ ಸರಿಸಿ"</item>
-    <item msgid="324200556467459329">"ಮೇಲಕ್ಕೆ ಸರಿಸಿ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ನಿರ್ದಿಷ್ಟಪಡಿಸಲಾಗಿಲ್ಲ"</string>
     <string name="neuter" msgid="2075249330106127310">"ನಪುಂಸಕ"</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 1c5fd76..db215dd 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -580,7 +580,7 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"제한된 프로필"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"신규 사용자를 추가할까요?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"추가 사용자를 만들어 다른 사용자와 기기를 공유할 수 있습니다. 각 사용자는 앱, 배경화면 등으로 맞춤설정할 수 있는 자신만의 공간을 갖게 됩니다. 또한 모든 사용자에게 영향을 미치는 Wi‑Fi와 같은 기기 설정도 조정할 수 있습니다.\n\n추가된 신규 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자가 앱을 업데이트할 수 있으며, 업데이트는 다른 사용자에게도 적용됩니다. 접근성 설정 및 서비스는 신규 사용자에게 이전되지 않을 수도 있습니다."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"추가된 새로운 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자는 다른 사용자들을 위하여 앱을 업데이트할 수 있습니다."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"추가된 신규 사용자는 자신의 공간을 설정해야 합니다.\n\n모든 사용자가 앱을 업데이트할 수 있으며, 업데이트는 다른 사용자에게도 적용됩니다."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"이 사용자에게 관리자 권한을 부여하시겠습니까?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"관리자는 다른 사용자가 가지지 못한 특별한 권한을 보유합니다. 관리자는 모든 사용자를 관리하고, 기기를 업데이트하거나 재설정하고, 설정을 변경하고, 설치된 모든 앱을 확인하고, 다른 사용자에게 관리자 권한을 부여하거나 취소할 수 있습니다."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"관리자 권한 부여"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"예측된 뒤로 동작 애니메이션"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"예측된 뒤로 동작에 시스템 애니메이션을 사용하도록 설정합니다."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"이 설정은 예측된 동작 애니메이션에 시스템 애니메이션을 사용하도록 합니다. 매니페스트 파일에서 앱별 enableOnBackInvokedCallback을 True로 설정해야 합니다."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"왼쪽으로 이동"</item>
-    <item msgid="5425394847942513942">"아래로 이동"</item>
-    <item msgid="7728484337962740316">"오른쪽으로 이동"</item>
-    <item msgid="324200556467459329">"위로 이동"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"지정되지 않음"</string>
     <string name="neuter" msgid="2075249330106127310">"중성"</string>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 4ad4306..3f6874f 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -351,10 +351,10 @@
     <string name="debug_monitoring_category" msgid="1597387133765424994">"Мониторинг"</string>
     <string name="strict_mode" msgid="889864762140862437">"Катаал режим иштетилди"</string>
     <string name="strict_mode_summary" msgid="1838248687233554654">"Узак операцияларда экран күйүп-өчүп турат"</string>
-    <string name="pointer_location" msgid="7516929526199520173">"Көрсөткүчтүн жайгшкн жери"</string>
+    <string name="pointer_location" msgid="7516929526199520173">"Көрсөткүчтүн турган жери"</string>
     <string name="pointer_location_summary" msgid="957120116989798464">"Басылган жерлер жана жаңсоолор экранда көрүнүп турат"</string>
     <string name="show_touches" msgid="8437666942161289025">"Басылган жерлерди көрсөтүү"</string>
-    <string name="show_touches_summary" msgid="3692861665994502193">"Экранда басылган жерлер көрүнүп турат"</string>
+    <string name="show_touches_summary" msgid="3692861665994502193">"Экрандын басылган жерлери көрүнүп турат"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"Баскычтардын басылганын көрсөтүү"</string>
     <string name="show_key_presses_summary" msgid="725387457373015024">"Баскычтар басылганда визуалдык сигнал көрүнөт"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Экран жаңыруусун көрсөтүү"</string>
@@ -584,8 +584,8 @@
     <string name="user_grant_admin_title" msgid="5157031020083343984">"Бул колдонуучуну админ кыласызбы?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Админдердин өзгөчө укуктары бар. Админ бардык колдонуучуларды тескеп, бул түзмөктү жаңыртып же баштапкы абалга келтирип, параметрлерди өзгөртүп, орнотулган колдонмолордун баарын көрүп, башкаларга админ укуктарын берип же жокко чыгара алат."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Админ кылуу"</string>
-    <string name="user_setup_dialog_title" msgid="8037342066381939995">"Профилди жөндөйсүзбү?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"Өз мейкиндигин жөндөп алышы үчүн, түзмөктү колдонуучуга беришиңиз керек."</string>
+    <string name="user_setup_dialog_title" msgid="8037342066381939995">"Профиль түзөсүзбү?"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"Колдонуучу өз мейкиндигин түзүп алышы үчүн түзмөктү ага беришиңиз керек."</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Профайл азыр түзүлсүнбү?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"Азыр түзүү"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"Азыр эмес"</string>
@@ -676,7 +676,7 @@
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"Демейки"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"Экранды күйгүзүү"</string>
     <string name="allow_turn_screen_on" msgid="6194845766392742639">"Экранды күйгүзүүгө уруксат берүү"</string>
-    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Колдонмого экранды күйгүзүүгө уруксат бериңиз. Уруксат берилсе, колдонмо экранды каалаган убакта сизден уруксат сурабастан күйгүзүшү мүмкүн."</string>
+    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Колдонмого экранды күйгүзүүгө уруксат бересиз. Колдонмо экранды каалаган убакта сизден уруксат сурабастан күйгүзө берет."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосунда кабарлоо токтотулсунбу?"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Эгер <xliff:g id="SWITCHAPP">%1$s</xliff:g> колдонмосунда кабарласаңыз же аудионун чыгуусун өзгөртсөңүз, учурдагы кабарлоо токтотулат"</string>
     <string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> колдонмосунда кабарлоо"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Божомолдонгон анимациялар"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Божомолдоп билүү үчүн системанын анимацияларын иштетиңиз."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Бул параметр жаңсоо анимациясын божомолдоп билүү үчүн системанын анимацияларын иштетет. Ал үчүн манифест файлындагы enableOnBackInvokedCallback параметри ар бир колдонмо үчүн \"true\" деп коюлушу керек."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Солго жылдыруу"</item>
-    <item msgid="5425394847942513942">"Төмөн жылдыруу"</item>
-    <item msgid="7728484337962740316">"Оңго жылдыруу"</item>
-    <item msgid="324200556467459329">"Жогору жылдыруу"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Көрсөтүлгөн эмес"</string>
     <string name="neuter" msgid="2075249330106127310">"Орто жак"</string>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index fe8b4db..fc82a9b 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"ສະແດງການແຕະ"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"ສະແດງຄໍາຕິຊົມທາງຮູບພາບສຳລັບການແຕະ"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"ສະແດງການກົດປຸ່ມ"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"ສະແດງຄຳຕິຊົມພາບສຳລັບການກົດປຸ່ມຈິງ"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"ສະແດງການຕອບສະໜອງທີ່ເປັນພາບສຳລັບການກົດປຸ່ມຈິງ"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"ສະແດງການອັບເດດພື້ນຜິວ"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"ກະພິບໜ້າຈໍທັງໜ້າເມື່ອມີການອັບເດດ"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"ສະແດງອັບເດດມຸມມອງ"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ອະນິເມຊັນກັບຫຼັງແບບຄາດເດົາ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ເປີດການນຳໃຊ້ອະນິເມຊັນລະບົບສຳລັບການກັບຫຼັງແບບຄາດເດົາ."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ການຕັ້ງຄ່ານີ້ຈະເປີດການນຳໃຊ້ອະນິເມຊັນລະບົບສຳລັບອະນິເມຊັນທ່າທາງແບບຄາດເດົາ. ມັນຕ້ອງໃຊ້ການຕັ້ງຄ່າຕໍ່ແອັບ enableOnBackInvokedCallback ເປັນ true ໃນໄຟລ໌ manifest."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ຍ້າຍໄປຊ້າຍ"</item>
-    <item msgid="5425394847942513942">"ຍ້າຍລົງ"</item>
-    <item msgid="7728484337962740316">"ຍ້າຍໄປຂວາ"</item>
-    <item msgid="324200556467459329">"ຍ້າຍຂຶ້ນ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ບໍ່ໄດ້ລະບຸ"</string>
     <string name="neuter" msgid="2075249330106127310">"ບໍ່ມີເພດ"</string>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index e4546e1..bc4630d 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Numatomos grįžimo atgal gestų animacijos"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Įgalinkite sistemos animacijas, kad būtų galima naudoti numatomus grįžimo atgal gestus."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Šis nustatymas įgalina numatomų grįžimo atgal gestų sistemos animacijas. Aprašo faile programos lauką „enableOnBackInvokedCallback“ reikia nustatyti į vertę „true“."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Perkelti kairėn"</item>
-    <item msgid="5425394847942513942">"Perkelti žemyn"</item>
-    <item msgid="7728484337962740316">"Perkelti dešinėn"</item>
-    <item msgid="324200556467459329">"Perkelti aukštyn"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nenurodyta"</string>
     <string name="neuter" msgid="2075249330106127310">"Bevardė giminė"</string>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index e9410a2..133520b 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animāciju prognozēšana pāriešanai atpakaļ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Iespējot sistēmas animācijas prognozētam žestam pāriešanai atpakaļ."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Šis iestatījums iespējo sistēmas animācijas prognozēto žestu animācijām. Lai to varētu izmantot, parametram “enableOnBackInvokedCallback” lietotnes manifesta failā jāiestata vērtība “true”."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Pārvietojiet pirkstu pa kreisi"</item>
-    <item msgid="5425394847942513942">"Pārvietojiet pirkstu lejup"</item>
-    <item msgid="7728484337962740316">"Pārvietojiet pirkstu pa labi"</item>
-    <item msgid="324200556467459329">"Pārvietojiet pirkstu augšup"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nav norādīta"</string>
     <string name="neuter" msgid="2075249330106127310">"Nekatrā dzimte"</string>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index 4866e6a..2de9998 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анимации за движењето за враќање"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Овозможете системски анимации за движењето за враќање."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Поставкава ги овозможува системските анимации за предвидливи движења. Поставката треба да се постави на „точно“ преку апликација enableOnBackInvokedCallback во датотеката за манифест."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Преместете налево"</item>
-    <item msgid="5425394847942513942">"Преместете надолу"</item>
-    <item msgid="7728484337962740316">"Преместете надесно"</item>
-    <item msgid="324200556467459329">"Преместете нагоре"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Не е наведено"</string>
     <string name="neuter" msgid="2075249330106127310">"Среден род"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 78a3968..0aad465 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"പ്രെഡിക്റ്റീവ് ബാക്ക് ആനിമേഷനുകൾ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"പ്രെഡിക്റ്റീവ് ബാക്കിനായി സിസ്റ്റം ആനിമേഷനുകൾ പ്രവർത്തനക്ഷമമാക്കുക."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ഈ ക്രമീകരണം പ്രെഡിക്റ്റീവ് ജെസ്ച്ചർ ആനിമേഷന് വേണ്ടി സിസ്റ്റം ആനിമേഷനുകളെ പ്രവർത്തനക്ഷമമാക്കുന്നു. ഇതിന് ഓരോ ആപ്പിലും enableOnBackInvokedCallback എന്നത് മാനിഫെസ്റ്റ് ഫയലിൽ ശരി എന്ന് സജ്ജീകരിക്കേണ്ടതുണ്ട്."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ഇടത്തേക്ക് നീക്കുക"</item>
-    <item msgid="5425394847942513942">"താഴേക്ക് നീക്കുക"</item>
-    <item msgid="7728484337962740316">"വലത്തേക്ക് നീക്കുക"</item>
-    <item msgid="324200556467459329">"മുകളിലേക്ക് നീക്കുക"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"വ്യക്തമാക്കിയിട്ടില്ലാത്തവ"</string>
     <string name="neuter" msgid="2075249330106127310">"നപുംസകലിംഗം"</string>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 31f190d..94e6059 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"Товшилтыг харуулах"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Товшилтын визуал хариу үйлдлийг харуулах"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"Түлхүүрийн даралт харуул"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"Биет түлхүүрийн даралтын визуал санал хүсэлт харуул"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"Биет түлхүүрийн даралтын визуал хариу үйлдлийг харуул"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Гадаргын шинэчлэлтүүдийг харуулах"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Шинэчлэгдэх үед цонхны гадаргыг бүхэлд нь анивчуулах"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"Шинэчлэлт харахыг харуулах"</string>
@@ -675,7 +675,7 @@
     <string name="keyboard_layout_dialog_title" msgid="3927180147005616290">"Гарын бүдүүвчийг сонгох"</string>
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"Өгөгдмөл"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"Дэлгэцийг асаах"</string>
-    <string name="allow_turn_screen_on" msgid="6194845766392742639">"Дэлгэцийг асаахыг зөвшөөрнө үү"</string>
+    <string name="allow_turn_screen_on" msgid="6194845766392742639">"Дэлгэцийг асаахыг зөвшөөрөх"</string>
     <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Аппад дэлгэцийг асаахыг зөвшөөрнө үү. Зөвшөөрсөн тохиолдолд тухайн апп таны тодорхой оролцоогүйгээр ямар ч үед дэлгэцийг асааж болно."</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g>-г нэвтрүүлэхээ зогсоох уу?"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Хэрэв та <xliff:g id="SWITCHAPP">%1$s</xliff:g>-г нэвтрүүлсэн эсвэл гаралтыг өөрчилсөн бол таны одоогийн нэвтрүүлэлтийг зогсооно"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Таамаглах боломжтой буцаах анимаци"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Таамаглах боломжтой буцаах зангаанд системийн анимацийг идэвхжүүлнэ үү."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Энэ тохиргоо нь таамаглах боломжтой зангааны анимацид системийн анимацийг идэвхжүүлнэ. Үүнд апп бүрд тодорхойлогч файлл enableOnBackInvokedCallback-г үнэн болгож тохируулахыг шаардана."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Зүүн тийш зөөх"</item>
-    <item msgid="5425394847942513942">"Доош зөөх"</item>
-    <item msgid="7728484337962740316">"Баруун тийш зөөх"</item>
-    <item msgid="324200556467459329">"Дээш зөөх"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Заагаагүй"</string>
     <string name="neuter" msgid="2075249330106127310">"Саармаг үг"</string>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index e5852ed..3077519 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"पूर्वानुमानित मागे जाण्याचे अ‍ॅनिमेशन"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"पूर्वानुमानित मागे जाण्यासाठीचे सिस्टीम अ‍ॅनिमेशन सुरू करा."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"हे सेटिंग पूर्वानुमानित जेश्चर ॲनिमेशनसाठी सिस्टीम ॲनिमेशन सुरू करते. यासाठी मॅनिफेस्ट फाइलमध्ये प्रति ॲप enableOnBackInvokedCallback सत्य वर सेट करणे आवश्यक आहे."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"डावीकडे हलवा"</item>
-    <item msgid="5425394847942513942">"खाली हलवा"</item>
-    <item msgid="7728484337962740316">"उजवीकडे हलवा"</item>
-    <item msgid="324200556467459329">"वरती हलवा"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"नमूद केलेले नाही"</string>
     <string name="neuter" msgid="2075249330106127310">"नपुसकलिंग"</string>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index ca07d2b..24c1733 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -580,12 +580,12 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"Profil terhad"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"Tambah pengguna baharu?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"Anda boleh berkongsi peranti ini dengan orang lain dengan membuat pengguna tambahan. Setiap pengguna mempunyai ruang mereka sendiri, yang boleh diperibadikan dengan apl, kertas dinding dan sebagainya. Pengguna juga boleh melaraskan tetapan peranti seperti Wi-Fi yang akan memberi kesan kepada semua orang.\n\nApabila anda menambah pengguna baharu, orang itu perlu menyediakan ruang mereka.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain. Tetapan dan perkhidmatan kebolehaksesan tidak boleh dipindahkan kepada pengguna baharu."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"Apabila anda menambah pengguna baharu, orang itu perlu menyediakan ruangnya sendiri.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"Apabila anda menambahkan pengguna baharu, orang itu perlu menyediakan ruangnya sendiri.\n\nMana-mana pengguna boleh mengemaskinikan apl untuk semua pengguna lain."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"Jadikan pengguna ini pentadbir?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Pentadbir mempunyai keistimewaan khas yang tiada pada pengguna lain. Pentadbir boleh mengurus semua pengguna, mengemaskinikan atau menetapkan semula peranti ini, mengubah suai tetapan, melihat semua apl yang telah dipasang dan memberikan atau membatalkan keistimewaan pentadbir untuk pengguna lain."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Jadikan pentadbir"</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"Sediakan pengguna sekarang?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"Pastikan orang itu tersedia untuk mengambil peranti dan menyediakan ruangan"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"Pastikan individu itu bersedia untuk mengambil peranti dan menyediakan ruangannya"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Sediakan profil sekarang?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"Sediakan sekarang"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"Bukan sekarang"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animasi kembali ramalan"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Dayakan animasi sistem untuk kembali ramalan."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Tetapan ini mendayakan animasi sistem untuk animasi gerak isyarat ramalan. Animasi sistem memerlukan tetapan enableOnBackInvokedCallback untuk setiap apl kepada benar dalam fail manifes."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Alih ke kiri"</item>
-    <item msgid="5425394847942513942">"Alih ke bawah"</item>
-    <item msgid="7728484337962740316">"Alih ke kanan"</item>
-    <item msgid="324200556467459329">"Alih ke atas"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Tidak dinyatakan"</string>
     <string name="neuter" msgid="2075249330106127310">"Neuter"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 0b9b3d1..aa9989b 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"နောက်ခလုတ်၏ ရှေ့ပြေးလှုပ်ရှားသက်ဝင်ပုံ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"နောက်ခလုတ်ရှေ့ပြေးအတွက် စနစ်လှုပ်ရှားသက်ဝင်ပုံများကို ဖွင့်ပါသည်။"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ဤဆက်တင်သည် လက်ဟန် ရှေ့ပြေးလှုပ်ရှားသက်ဝင်ပုံအတွက် စနစ်လှုပ်ရှားသက်ဝင်ပုံများကို ဖွင့်ပါသည်။ အက်ပ်တစ်ခုစီ၏ ဆက်တင်အတွက် enableOnBackInvokedCallback ကို မန်နီးဖက်စ် (manifest) ဖိုင်၌ ဖွင့်ထားရန်လိုအပ်သည်။"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ဘယ်သို့ရွှေ့ရန်"</item>
-    <item msgid="5425394847942513942">"အောက်သို့ရွှေ့ရန်"</item>
-    <item msgid="7728484337962740316">"ညာသို့ရွှေ့ရန်"</item>
-    <item msgid="324200556467459329">"အပေါ်သို့ရွှေ့ရန်"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"သတ်မှတ်မထားပါ"</string>
     <string name="neuter" msgid="2075249330106127310">"နပုလ္လိင်"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index e68a2b7..9126f29 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -448,8 +448,8 @@
     <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
     <string name="power_remaining_duration_only" msgid="8264199158671531431">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen"</string>
     <string name="power_discharging_duration" msgid="1076561255466053220">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
-    <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> gjenstår basert på bruken din"</string>
-    <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> gjenstår basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
+    <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen basert på bruken din"</string>
+    <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
     <!-- no translation found for power_remaining_duration_only_short (7438846066602840588) -->
     <skip />
     <string name="power_discharge_by_enhanced" msgid="563438403581662942">"Skal vare til omtrent <xliff:g id="TIME">%1$s</xliff:g>, basert på bruken din (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Tilbake-animasjoner med forslag"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Slå på systemanimasjoner for tilbakebevegelser med forslag."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Denne innstillingen slår på systemanimasjoner for bevegelsesanimasjoner med forslag. Den krever at enableOnBackInvokedCallback settes til sann i manifestfilen for hver app."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Flytt til venstre"</item>
-    <item msgid="5425394847942513942">"Flytt ned"</item>
-    <item msgid="7728484337962740316">"Flytt til høyre"</item>
-    <item msgid="324200556467459329">"Flytt opp"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Ikke angitt"</string>
     <string name="neuter" msgid="2075249330106127310">"Intetkjønn"</string>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index e52b880..f3e2cdd 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -58,10 +58,10 @@
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"\'<xliff:g id="AP_NAME">%1$s</xliff:g>\' मा जडान गर्न सकिँदैन"</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"पासवर्ड जाँच गरेर फेरि प्रयास गर्नुहोस्"</string>
     <string name="wifi_not_in_range" msgid="1541760821805777772">"दायराभित्र छैन"</string>
-    <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"स्वतः जडान हुने छैन"</string>
+    <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"अटो कनेक्ट हुने छैन"</string>
     <string name="wifi_no_internet" msgid="1774198889176926299">"इन्टरनेटमाथिको पहुँच छैन"</string>
     <string name="saved_network" msgid="7143698034077223645">"<xliff:g id="NAME">%1$s</xliff:g> द्वारा सेभ गरियो"</string>
-    <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s मार्फत् स्वतः जडान गरिएको"</string>
+    <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s मार्फत् अटो कनेक्ट गरिएको"</string>
     <string name="connected_via_network_scorer_default" msgid="7973529709744526285">"नेटवर्क मूल्याङ्कनकर्ता मार्फत स्वत: जडान गरिएको"</string>
     <string name="connected_via_app" msgid="3532267661404276584">"<xliff:g id="NAME">%1$s</xliff:g> मार्फत जडान गरिएको"</string>
     <string name="tap_to_sign_up" msgid="5356397741063740395">"साइन अप गर्न ट्याप गर्नुहोस्"</string>
@@ -580,12 +580,12 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"प्रतिबन्धित प्रोफाइल"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"नयाँ प्रयोगकर्ता हाल्ने हो?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"तपाईं थप प्रयोगकर्ताहरू सिर्जना गरेर ती प्रयोगकर्तालाई यो डिभाइस प्रयोग गर्न दिन सक्नुहुन्छ। हरेक प्रयोगकर्ताको आफ्नै ठाउँ हुन्छ। उनीहरू यो ठाउँमा आफ्नै एप, वालपेपर आदिका लागि प्रयोग गर्न सक्छन्। उनीहरू सबैजनालाई असर पार्ने Wi-Fi जस्ता डिभाइसका सेटिङहरू पनि परिवर्तन गर्न सक्छन्।\n\nतपाईंले नयाँ प्रयोगकर्ता थप्दा उक्त व्यक्तिले आफ्नो ठाउँ सेटअप गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ता अन्य सबै प्रयोगकर्ताले प्रयोग गर्ने एपहरू अद्यावधिक गर्न सक्छन्। तपाईं थप प्रयोगकर्ताहरू सिर्जना गरेर ती प्रयोगकर्तालाई यो डिभाइस प्रयोग गर्न दिन सक्नुहुन्छ। हरेक प्रयोगकर्ताको आफ्नै ठाउँ हुन्छ। उनीहरू यो ठाउँमा आफ्नै एप, वालपेपर आदिका लागि प्रयोग गर्न सक्छन्। उनीहरू सबैजनालाई असर पार्ने Wi-Fi जस्ता डिभाइसका सेटिङहरू पनि परिवर्तन गर्न सक्छन्।BREAK_0BREAK_1तपाईंले नयाँ प्रयोगकर्ता थप्दा उक्त व्यक्तिले आफ्नो ठाउँ सेटअप गर्नु पर्ने हुन्छ।BREAK_2BREAK_3सबै प्रयोगकर्ता अन्य सबै प्रयोगकर्ताले प्रयोग गर्ने एपहरू अद्यावधिक गर्न सक्छन्। तर पहुँचसम्बन्धी सेटिङ तथा सेवाहरू नयाँ प्रयोगकर्तामा नसर्न सक्छन्।"</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"तपाईंले नयाँ प्रयोगकर्ता थप्नुभयो भने ती प्रयोगकर्ताले आफ्नो स्पेस सेट गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ताले अरू प्रयोगकर्ताका एपहरू अपडेट गर्न सक्छन्।"</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"तपाईंले नयाँ प्रयोगकर्ता हाल्नुभयो भने ती प्रयोगकर्ताले आफ्नो स्पेस सेट गर्नु पर्ने हुन्छ।\n\nसबै प्रयोगकर्ताले अरू प्रयोगकर्ताका एपहरू अपडेट गर्न सक्छन्।"</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"यी प्रयोगकर्तालाई एड्मिन बनाउने हो?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"एड्मिनहरूसँग अन्य प्रयोगकर्तासँग नभएका विशेषाधिकारहरू हुन्छन्। एड्मिन सबै प्रयोगकर्ताहरूलाई व्यवस्थापन गर्न, यो डिभाइस अपडेट वा रिसेट गर्न, सेटिङ परिमार्जन गर्न, इन्स्टल गरिएका सबै एपहरू हेर्न र अरूलाई एड्मिनका विशेषाधिकारहरू दिन वा अरूलाई दिइएका एड्मिनका विशेषाधिकारहरू खारेज गर्न सक्नुहुन्छ।"</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"एड्मिन बनाउनुहोस्"</string>
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"अहिले प्रयोगकर्ता सेटअप गर्ने हो?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"यी व्यक्ति यन्त्र यो डिभाइस चलाउन र आफ्नो ठाउँ सेट गर्न उपलब्ध छन् भन्ने कुरा सुनिश्चित गर्नुहोस्"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"यी व्यक्ति यो डिभाइस चलाउन र आफ्नो ठाउँ सेट गर्न उपलब्ध छन् भन्ने कुरा सुनिश्चित गर्नुहोस्"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"अहिले प्रोफाइल सेटअप गर्ने हो?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"अब सेटअप गर्नुहोस्"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"अहिले होइन"</string>
@@ -602,8 +602,8 @@
     <string name="add_user_failed" msgid="4809887794313944872">"नयाँ प्रयोगकर्ता सिर्जना गर्न सकिएन"</string>
     <string name="add_guest_failed" msgid="8074548434469843443">"नयाँ अतिथि बनाउन सकिएन"</string>
     <string name="user_nickname" msgid="262624187455825083">"उपनाम"</string>
-    <string name="user_add_user" msgid="7876449291500212468">"प्रयोगकर्ता थप्नुहोस्"</string>
-    <string name="guest_new_guest" msgid="3482026122932643557">"अतिथि थप्नुहोस्"</string>
+    <string name="user_add_user" msgid="7876449291500212468">"प्रयोगकर्ता कनेक्ट गर्नुहोस्"</string>
+    <string name="guest_new_guest" msgid="3482026122932643557">"अतिथि कनेक्ट गर्नुहोस्"</string>
     <string name="guest_exit_guest" msgid="5908239569510734136">"गेस्ट मोडबाट बाहिर निस्कियोस्"</string>
     <string name="guest_reset_guest" msgid="6110013010356013758">"अतिथि सत्र रिसेट गर्नुहोस्"</string>
     <string name="guest_reset_guest_dialog_title" msgid="8047270010895437534">"अतिथिका रूपमा ब्राउज गर्ने सेसन रिसेट गर्ने हो?"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"पूर्वानुमानयुक्त ब्याक एनिमेसनहरू"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"पूर्वानुमानयुक्त ब्याक एनिमेसनका हकमा सिस्टम एनिमेसनहरू लागू गर्नुहोस्।"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"यो सेटिङले पूर्वानुमानयुक्त जेस्चर एनिमेसनका हकमा सिस्टम एनिमेनसहरू लागू गर्छ। म्यानिफेस्ट फाइलमा हरेक एपका हकमा enableOnBackInvokedCallback सेट गरी TRUE बनाएपछि मात्र यो सेटिङ अन गर्न मिल्छ।"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"बायाँतिर सार्नुहोस्"</item>
-    <item msgid="5425394847942513942">"तलतिर सार्नुहोस्"</item>
-    <item msgid="7728484337962740316">"दायाँतिर सार्नुहोस्"</item>
-    <item msgid="324200556467459329">"माथितिर सार्नुहोस्"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"नतोकिएको"</string>
     <string name="neuter" msgid="2075249330106127310">"नपुंसक लिङ्ग"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index 0d52d9d..c858199 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Voorspellende animaties voor gebaren voor terug"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Systeemanimaties aanzetten voor voorspellende animaties voor gebaren voor terug."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Met deze instelling zet je systeemanimaties aan voor voorspellende gebaaranimaties. Je moet enableOnBackInvokedCallback per app instellen op True in het manifestbestand."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Naar links verplaatsen"</item>
-    <item msgid="5425394847942513942">"Omlaag verplaatsen"</item>
-    <item msgid="7728484337962740316">"Naar rechts verplaatsen"</item>
-    <item msgid="324200556467459329">"Omhoog verplaatsen"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Niet opgegeven"</string>
     <string name="neuter" msgid="2075249330106127310">"Onzijdig"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index eb54cba..ec72ba9 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -584,10 +584,10 @@
     <string name="user_grant_admin_title" msgid="5157031020083343984">"ଏହି ୟୁଜରଙ୍କୁ ଜଣେ ଆଡମିନ କରିବେ?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"ଆଡମିନମାନଙ୍କର ବିଶେଷ ଅଧିକାରଗୁଡ଼ିକ ଥାଏ ଯାହା ଅନ୍ୟ ୟୁଜରମାନଙ୍କର ନଥାଏ। ଜଣେ ଆଡମିନ ସମସ୍ତ ୟୁଜରଙ୍କୁ ପରିଚାଳନା କରିପାରିବେ, ଏହି ଡିଭାଇସକୁ ଅପଡେଟ କିମ୍ବା ରିସେଟ କରିପାରିବେ, ସେଟିଂସ ପରିବର୍ତ୍ତନ କରିପାରିବେ, ଇନଷ୍ଟଲ କରାଯାଇଥିବା ସମସ୍ତ ଆପ୍ସ ଦେଖିପାରିବେ ଏବଂ ଅନ୍ୟମାନଙ୍କ ପାଇଁ ଆଡମିନଙ୍କ ବିଶେଷ ଅଧିକାରଗୁଡ଼ିକୁ ଅନୁମତି ଦେଇପାରିବେ କିମ୍ବା ପ୍ରତ୍ୟାହାର କରିପାରିବେ।"</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"ଆଡମିନ କରନ୍ତୁ"</string>
-    <string name="user_setup_dialog_title" msgid="8037342066381939995">"ଏବେ ଉପଯୋଗକର୍ତ୍ତା ସେଟଅପ କରିବେ?"</string>
-    <string name="user_setup_dialog_message" msgid="269931619868102841">"ସୁନିଶ୍ଚିତ କରନ୍ତୁ ଯେ, ବ୍ୟକ୍ତି ଜଣକ ଡିଭାଇସ୍‌ ଓ ନିଜର ସ୍ଥାନ ସେଟଅପ୍‌ କରିବା ପାଇଁ ଉପଲବ୍ଧ ଅଛନ୍ତି।"</string>
+    <string name="user_setup_dialog_title" msgid="8037342066381939995">"ଏବେ ୟୁଜର ସେଟଅପ କରିବେ?"</string>
+    <string name="user_setup_dialog_message" msgid="269931619868102841">"ସୁନିଶ୍ଚିତ କରନ୍ତୁ ଯେ, ବ୍ୟକ୍ତି ଜଣକ ଡିଭାଇସ ଓ ନିଜର ସ୍ଥାନ ସେଟଅପ କରିବା ପାଇଁ ଉପଲବ୍ଧ ଅଛନ୍ତି।"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"ପ୍ରୋଫାଇଲ୍‌କୁ ଏବେ ସେଟ୍‌ କରିବେ?"</string>
-    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ଏବେ ସେଟଅପ୍ କରନ୍ତୁ"</string>
+    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ଏବେ ସେଟଅପ କରନ୍ତୁ"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"ଏବେ ନୁହେଁଁ"</string>
     <string name="user_add_user_type_title" msgid="551279664052914497">"ଯୋଡନ୍ତୁ"</string>
     <string name="user_new_user_name" msgid="60979820612818840">"ନୂଆ ୟୁଜର"</string>
@@ -676,7 +676,7 @@
     <string name="keyboard_layout_default_label" msgid="1997292217218546957">"ଡିଫଲ୍ଟ"</string>
     <string name="turn_screen_on_title" msgid="3266937298097573424">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରନ୍ତୁ"</string>
     <string name="allow_turn_screen_on" msgid="6194845766392742639">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଅନୁମତି ଦିଅନ୍ତୁ"</string>
-    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଏକ ଆପକୁ ଅନୁମତି ଦିଅନ୍ତୁ। ଯଦି ଅନୁମତି ଦିଆଯାଏ, ତେବେ ଆପଟି ଆପଣଙ୍କ ସ୍ପଷ୍ଟ ଇଣ୍ଟେଣ୍ଟ ବିନା ଯେ କୌଣସି ସମୟରେ ସ୍କ୍ରିନକୁ ଚାଲୁ କରିପାରେ।"</string>
+    <string name="allow_turn_screen_on_description" msgid="43834403291575164">"ସ୍କ୍ରିନକୁ ଚାଲୁ କରିବା ପାଇଁ ଏକ ଆପକୁ ଅନୁମତି ଦିଅନ୍ତୁ। ଯଦି ଅନୁମତି ଦିଆଯାଏ, ତେବେ ଆପଟି ଆପଣଙ୍କ ଏକ୍ସପ୍ଲିସିଟ ଇଣ୍ଟେଣ୍ଟ ବିନା ଯେ କୌଣସି ସମୟରେ ସ୍କ୍ରିନକୁ ଚାଲୁ କରିପାରେ।"</string>
     <string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"<xliff:g id="APP_NAME">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରିବା ବନ୍ଦ କରିବେ?"</string>
     <string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"ଯଦି ଆପଣ <xliff:g id="SWITCHAPP">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରନ୍ତି କିମ୍ବା ଆଉଟପୁଟ ବଦଳାନ୍ତି, ତେବେ ଆପଣଙ୍କ ବର୍ତ୍ତମାନର ବ୍ରଡକାଷ୍ଟ ବନ୍ଦ ହୋଇଯିବ"</string>
     <string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"<xliff:g id="SWITCHAPP">%1$s</xliff:g> ବ୍ରଡକାଷ୍ଟ କରନ୍ତୁ"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ପ୍ରେଡିକ୍ଟିଭ ବେକ ଆନିମେସନ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ପ୍ରେଡିକ୍ଟିଭ ବେକ ପାଇଁ ସିଷ୍ଟମ ଆନିମେସନଗୁଡ଼ିକୁ ସକ୍ଷମ କରନ୍ତୁ।"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ଏହି ସେଟିଂ ପ୍ରେଡିକ୍ଟିଭ ଜେଶ୍ଚର ଆନିମେସନ ପାଇଁ ସିଷ୍ଟମ ଆନିମେସନଗୁଡ଼ିକୁ ସକ୍ଷମ କରେ। ଏଥିପାଇଁ ମାନିଫେଷ୍ଟ ଫାଇଲରେ ପ୍ରତି-ଆପ enableOnBackInvokedCallbackକୁ \"ଠିକ\"ରେ ସେଟ କରିବା ଆବଶ୍ୟକ।"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ବାମକୁ ମୁଭ କରନ୍ତୁ"</item>
-    <item msgid="5425394847942513942">"ତଳକୁ ମୁଭ କରନ୍ତୁ"</item>
-    <item msgid="7728484337962740316">"ଡାହାଣକୁ ମୁଭ କରନ୍ତୁ"</item>
-    <item msgid="324200556467459329">"ଉପରକୁ ମୁଭ କରନ୍ତୁ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ନିର୍ଦ୍ଦିଷ୍ଟ କରାଯାଇନାହିଁ"</string>
     <string name="neuter" msgid="2075249330106127310">"ନ୍ୟୁଟର"</string>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index b0faa80..3419458 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ਪਿਛਲੇ ਐਨੀਮੇਸ਼ਨਾਂ ਦਾ ਪੂਰਵ-ਅਨੁਮਾਨ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ਪੂਰਵ-ਅਨੁਮਾਨ ਵਾਪਸੀ ਲਈ ਸਿਸਟਮ ਐਨੀਮੇਸ਼ਨਾਂ ਨੂੰ ਚਾਲੂ ਕਰੋ।"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ਇਹ ਸੈਟਿੰਗ ਪੂਰਵ-ਅਨੁਮਾਨ ਇਸ਼ਾਰਾ ਐਨੀਮੇਸ਼ਨ ਲਈ ਸਿਸਟਮ ਐਨੀਮੇਸ਼ਨਾਂ ਨੂੰ ਚਾਲੂ ਕਰਦੀ ਹੈ। ਮੈਨੀਫ਼ੈਸਟ ਫ਼ਾਈਲ ਵਿੱਚ enableOnBackInvokedCallback ਸੈਟਿੰਗ ਨੂੰ ਪ੍ਰਤੀ-ਐਪ \'ਸਹੀ\' \'ਤੇ ਕਰਨ ਦੀ ਲੋੜ ਹੈ।"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ਖੱਬੇ ਲਿਜਾਓ"</item>
-    <item msgid="5425394847942513942">"ਹੇਠਾਂ ਲਿਜਾਓ"</item>
-    <item msgid="7728484337962740316">"ਸੱਜੇ ਲਿਜਾਓ"</item>
-    <item msgid="324200556467459329">"ਉੱਪਰ ਲਿਜਾਓ"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ਨਿਰਧਾਰਿਤ ਨਹੀਂ"</string>
     <string name="neuter" msgid="2075249330106127310">"ਨਿਰਪੱਖ"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index cdc5ba2..addad23 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"Pokazuj dotknięcia"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Pokazuj potwierdzenie wizualne po dotknięciu"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"Wyświetl naciśnięcia klawiszy"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"Wyświetl opinie wizualne dla naciśnięć fizycznego klucza"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"Pokaż wizualną informację zwrotną po naciśnięciu fizycznego klawisza"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Pokazuj zmiany powierzchni"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Podświetlaj całe aktualizowane powierzchnie okien"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"Pokazuj aktualizacje widoku"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacje przewidywanego przejścia wstecz"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Włącz animacje systemowe dla przewidywanego przejścia wstecz"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"To ustawienie uruchamia animacje systemowe dla przewidywanych gestów. Wymaga ustawienia w pliku manifestu wartości true w polu enableOnBackInvokedCallback dla każdej aplikacji."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Przenieś w lewo"</item>
-    <item msgid="5425394847942513942">"Przenieś w dół"</item>
-    <item msgid="7728484337962740316">"Przenieś w prawo"</item>
-    <item msgid="324200556467459329">"Przenieś w górę"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nie określono"</string>
     <string name="neuter" msgid="2075249330106127310">"Nijaki"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index f1784bc..6f3f644 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos \"Voltar\" preditivos"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ativar animações do sistema para gestos \"Voltar\" preditivos"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuração ativa animações do sistema para gestos preditivos. Ela requer que a política enableOnBackInvokedCallback por app seja definida como verdadeira no arquivo de manifesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mover para esquerda"</item>
-    <item msgid="5425394847942513942">"Mover para baixo"</item>
-    <item msgid="7728484337962740316">"Mover para direita"</item>
-    <item msgid="324200556467459329">"Mover para cima"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index c510e2b..566c5d3 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -382,7 +382,7 @@
     <string name="show_non_rect_clip" msgid="7499758654867881817">"Depurar operações de clipe não retangulares"</string>
     <string name="track_frame_time" msgid="522674651937771106">"Renderização HWUI do perfil"</string>
     <string name="enable_gpu_debug_layers" msgid="4986675516188740397">"Ativar cam. depuração GPU"</string>
-    <string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permitir carregamento de camadas de depuração de GPU p/ apps de depuração"</string>
+    <string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permite carregamento de camadas de depuração de GPU para apps de depuração"</string>
     <string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ativ. registo do fornecedor"</string>
     <string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Inclua registos adicionais de fornecedores específicos de dispositivos em relatórios de erros, que podem conter informações privadas, utilizar mais bateria e/ou utilizar mais armazenamento."</string>
     <string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animação de transição"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos para voltar preditivos"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ative as animações do sistema para gestos para voltar preditivos."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta definição ativa animações do sistema para a animação de gestos preditivos. Requer a definição do atributo enableOnBackInvokedCallback por app como verdadeiro no ficheiro de manifesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mover para a esquerda"</item>
-    <item msgid="5425394847942513942">"Mover para baixo"</item>
-    <item msgid="7728484337962740316">"Mover para a direita"</item>
-    <item msgid="324200556467459329">"Mover para cima"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index f1784bc..6f3f644 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animações de gestos \"Voltar\" preditivos"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ativar animações do sistema para gestos \"Voltar\" preditivos"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Esta configuração ativa animações do sistema para gestos preditivos. Ela requer que a política enableOnBackInvokedCallback por app seja definida como verdadeira no arquivo de manifesto."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Mover para esquerda"</item>
-    <item msgid="5425394847942513942">"Mover para baixo"</item>
-    <item msgid="7728484337962740316">"Mover para direita"</item>
-    <item msgid="324200556467459329">"Mover para cima"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Não especificado"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutro"</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 447bb63..77b79c9 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animații pentru gestul înapoi predictiv"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Activează animațiile de sistem pentru gestul înapoi predictiv."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Această setare activează animațiile de sistem pentru animația gesturilor predictive. Necesită setarea valorii true în cazul atributului enableOnBackInvokedCallback pentru fiecare aplicație în fișierul manifest."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Deplasează la stânga"</item>
-    <item msgid="5425394847942513942">"Deplasează în jos"</item>
-    <item msgid="7728484337962740316">"Deplasează la dreapta"</item>
-    <item msgid="324200556467459329">"Deplasează în sus"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nespecificat"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutru"</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index f10e8e7..c368913 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анимации подсказки для жеста \"Назад\""</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Включить системную анимацию подсказки для жеста \"Назад\"."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"С помощью этого параметра можно включить системные анимации подсказок для жестов. Для этого нужно установить значение true для enableOnBackInvokedCallback в файле манифеста приложения."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Переместите палец влево"</item>
-    <item msgid="5425394847942513942">"Переместите палец вниз"</item>
-    <item msgid="7728484337962740316">"Переместите палец вправо"</item>
-    <item msgid="324200556467459329">"Переместите палец вверх"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Не указан"</string>
     <string name="neuter" msgid="2075249330106127310">"Средний"</string>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 51bd3c1..17090a7 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"පුරෝකථනමය පසු සජීවිකරණ"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"පුරෝකථනමය ආපසු සඳහා පද්ධති සජීවිකරණ සබල කරන්න."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"මෙම සැකසීම පුරෝකථනමය ඉංගිත සජීවිකරණය සඳහා පද්ධති සජීවිකරණ සබල කරයි. එයට මැනිෆෙස්ට් ගොනුව තුළ එක් යෙදුමකට enableOnBackInvokedCallback සත්‍ය ලෙස සැකසීම අවශ්‍ය වේ."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"වමට ගෙන යන්න"</item>
-    <item msgid="5425394847942513942">"පහළට ගෙන යන්න"</item>
-    <item msgid="7728484337962740316">"දකුණට ගෙන යන්න"</item>
-    <item msgid="324200556467459329">"ඉහළට ගෙන යන්න"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"විශේෂයෙන් සඳහන් නොකළ"</string>
     <string name="neuter" msgid="2075249330106127310">"නපුංසක"</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 6918728..0636767 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Prediktívne animácie gesta Späť"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Povoliť animácie v systéme pre prediktívne gesto Späť"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Toto nastavenie povoľuje animácie v systéme na účely prediktívnej animácie gest. Vyžaduje nastavenie povolenia enableOnBackInvokedCallback na pravdu v súbore manifestu konkrétnej aplikácie."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Posuňte doľava"</item>
-    <item msgid="5425394847942513942">"Posuňte nadol"</item>
-    <item msgid="7728484337962740316">"Posuňte doprava"</item>
-    <item msgid="324200556467459329">"Presuňte nahor"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Nešpecifikované"</string>
     <string name="neuter" msgid="2075249330106127310">"Stredný rod"</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index cf174e1..949ed42 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacije poteze za nazaj s predvidevanjem"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Omogoči sistemske animacije za potezo za nazaj s predvidevanjem."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ta nastavitev omogoča sistemske animacije za animacijo poteze s predvidevanjem. V datoteki manifesta mora biti parameter »enableOnBackInvokedCallback« za posamezno aplikacijo nastavljen na »true«."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Premaknite se levo"</item>
-    <item msgid="5425394847942513942">"Premaknite se navzdol"</item>
-    <item msgid="7728484337962740316">"Premaknite se desno"</item>
-    <item msgid="324200556467459329">"Premaknite se navzgor"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Ni določeno"</string>
     <string name="neuter" msgid="2075249330106127310">"Srednji spol"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 7802704..0eff3ab 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -268,7 +268,7 @@
     <string name="mock_location_app_not_set" msgid="6972032787262831155">"Nuk është vendosur asnjë aplikacion që simulon vendndodhjen"</string>
     <string name="mock_location_app_set" msgid="4706722469342913843">"Aplikacioni për simulimin e vendndodhjes: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="debug_networking_category" msgid="6829757985772659599">"Rrjetet"</string>
-    <string name="wifi_display_certification" msgid="1805579519992520381">"Certifikimi i ekranit pa tel"</string>
+    <string name="wifi_display_certification" msgid="1805579519992520381">"Certifikimi i ekranit wireless"</string>
     <string name="wifi_verbose_logging" msgid="1785910450009679371">"Aktivizo regjistrimin Wi-Fi Verbose"</string>
     <string name="wifi_scan_throttling" msgid="2985624788509913617">"Përshpejtimi i skanimit të Wi‑Fi"</string>
     <string name="wifi_non_persistent_mac_randomization" msgid="7482769677894247316">"Renditje e rastësishme jo e përhershme e MAC për Wi‑Fi"</string>
@@ -300,7 +300,7 @@
     <string name="private_dns_mode_provider" msgid="3619040641762557028">"Emri i pritësit të ofruesit të DNS-së private"</string>
     <string name="private_dns_mode_provider_hostname_hint" msgid="6564868953748514595">"Fut emrin e pritësit të ofruesit të DNS-së"</string>
     <string name="private_dns_mode_provider_failure" msgid="8356259467861515108">"Nuk mund të lidhej"</string>
-    <string name="wifi_display_certification_summary" msgid="8111151348106907513">"Shfaq opsionet për certifikimin e ekranit pa tel"</string>
+    <string name="wifi_display_certification_summary" msgid="8111151348106907513">"Shfaq opsionet për certifikimin e ekranit wireless"</string>
     <string name="wifi_verbose_logging_summary" msgid="4993823188807767892">"Rrit nivelin regjistrues të Wi‑Fi duke shfaqur SSID RSSI-në te Zgjedhësi i Wi‑Fi"</string>
     <string name="wifi_scan_throttling_summary" msgid="2577105472017362814">"Zvogëlon shkarkimin e baterisë dhe përmirëson cilësinë e funksionimit të rrjetit"</string>
     <string name="wifi_non_persistent_mac_randomization_summary" msgid="2159794543105053930">"Kur ky modalitet është i aktivizuar, adresa MAC e kësaj pajisjeje mund të ndryshojë çdo herë që lidhet me një rrjet që ka të aktivizuar renditjen e rastësishme të adresave MAC."</string>
@@ -356,7 +356,7 @@
     <string name="show_touches" msgid="8437666942161289025">"Shfaq trokitjet"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Shfaq reagimet vizuale për trokitjet"</string>
     <string name="show_key_presses" msgid="6360141722735900214">"Shfaq shtypjet e tasteve"</string>
-    <string name="show_key_presses_summary" msgid="725387457373015024">"Shfaq reagime vizuale për shtypjen e tasteve fizike"</string>
+    <string name="show_key_presses_summary" msgid="725387457373015024">"Shfaq reagim vizual për shtypjet fizike të tasteve"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Shfaq përditësimet e sipërfaqes"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Ndriço të gjitha sipërfaqet e dritares kur ato të përditësohen"</string>
     <string name="show_hw_screen_updates" msgid="2021286231267747506">"Shfaq përditësimet e pamjes"</string>
@@ -477,7 +477,7 @@
     <string name="battery_info_status_charging" msgid="4279958015430387405">"Po karikohet"</string>
     <string name="battery_info_status_charging_fast" msgid="8027559755902954885">"Karikim i shpejtë"</string>
     <string name="battery_info_status_charging_slow" msgid="3190803837168962319">"Po karikohet ngadalë"</string>
-    <string name="battery_info_status_charging_wireless" msgid="8924722966861282197">"Po karikohet pa tel"</string>
+    <string name="battery_info_status_charging_wireless" msgid="8924722966861282197">"Po karikohet wireless"</string>
     <string name="battery_info_status_charging_dock" msgid="8573274094093364791">"Po karikohet"</string>
     <string name="battery_info_status_discharging" msgid="6962689305413556485">"Nuk po karikohet"</string>
     <string name="battery_info_status_not_charging" msgid="3371084153747234837">"Lidhur, jo në karikim"</string>
@@ -584,7 +584,7 @@
     <string name="user_grant_admin_title" msgid="5157031020083343984">"Të bëhet administrator ky përdorues?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Administratorët kanë privilegje të veçanta që nuk i kanë përdoruesit e tjerë. Një administrator mund të menaxhojë të gjithë përdoruesit, të përditësojë ose të rivendosë këtë pajisje, të modifikojë cilësimet, të shikojë të gjitha aplikacionet e instaluara dhe të japë ose të revokojë privilegjet e administratorit për të tjerët."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Bëje administrator"</string>
-    <string name="user_setup_dialog_title" msgid="8037342066381939995">"Të konfig. përdoruesi tani?"</string>
+    <string name="user_setup_dialog_title" msgid="8037342066381939995">"Të konfigurohet përdoruesi?"</string>
     <string name="user_setup_dialog_message" msgid="269931619868102841">"Sigurohu që personi të jetë i gatshëm të marrë pajisjen dhe të caktojë hapësirën e vet"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"Të konfigurohet tani profili?"</string>
     <string name="user_setup_button_setup_now" msgid="1708269547187760639">"Konfiguro tani"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Animacionet për gjestin e parashikuar të kthimit prapa"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivizo animacionet e sistemit për gjestin e parashikuar të kthimit prapa."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ky cilësim aktivizon animacionet e sistemit për animacionin e gjestit të parashikuar. Ai kërkon që enableOnBackInvokedCallback për aplikacionin të jetë caktuar si i vërtetë në skedarin e manifestit."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Lëvize majtas"</item>
-    <item msgid="5425394847942513942">"Lëvize poshtë"</item>
-    <item msgid="7728484337962740316">"Lëvize djathtas"</item>
-    <item msgid="324200556467459329">"Lëvize lart"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"E papërcaktuar"</string>
     <string name="neuter" msgid="2075249330106127310">"Asnjanëse"</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index eb10b55..2ae0fe2 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -141,7 +141,7 @@
     <string name="bluetooth_pairing_decline" msgid="6483118841204885890">"Откажи"</string>
     <string name="bluetooth_pairing_will_share_phonebook" msgid="3064334458659165176">"Упаривање омогућава приступ контактима и историји позива након повезивања."</string>
     <string name="bluetooth_pairing_error_message" msgid="6626399020672335565">"Упаривање са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће."</string>
-    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Упаривање са <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће због нетачног PIN-а или приступног кода."</string>
+    <string name="bluetooth_pairing_pin_error_message" msgid="264422127613704940">"Упаривање са <xliff:g id="DEVICE_NAME">%1$s</xliff:g> није могуће због нетачног PIN-а или приступног кључа."</string>
     <string name="bluetooth_pairing_device_down_error_message" msgid="2554424863101358857">"Није могуће комуницирати са уређајем <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
     <string name="bluetooth_pairing_rejected_error_message" msgid="5943444352777314442">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> је одбио/ла упаривање"</string>
     <string name="bluetooth_talkback_computer" msgid="3736623135703893773">"Рачунар"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анимације за покрет повратка са предвиђањем"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Омогућите анимације система за покрет повратка са предвиђањем."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ово подешавање омогућава анимације система за покрет повратка са предвиђањем. Захтева подешавање дозволе enableOnBackInvokedCallback по апликацији на true у фајлу манифеста."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Померите налево"</item>
-    <item msgid="5425394847942513942">"Померите надоле"</item>
-    <item msgid="7728484337962740316">"Померите надесно"</item>
-    <item msgid="324200556467459329">"Померите нагоре"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Није наведено"</string>
     <string name="neuter" msgid="2075249330106127310">"Средњи род"</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 256b4e9..e8f045d 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Förhandsanimationer för bakåtrörelser"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Aktivera systemanimationer som förhandsvisar bakåtrörelser."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Den här inställningen aktiverar systemanimationer som förhandsvisar vart rörelserna leder. Du måste ställa in enableOnBackInvokedCallback som sant per app i manifestfilen."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Flytta åt vänster"</item>
-    <item msgid="5425394847942513942">"Flytta nedåt"</item>
-    <item msgid="7728484337962740316">"Flytta åt höger"</item>
-    <item msgid="324200556467459329">"Flytta uppåt"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Inte angivet"</string>
     <string name="neuter" msgid="2075249330106127310">"Neutrum"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index e23dbcb..6411914 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Uhuishaji wa utabiri wa kurudi nyuma"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Ruhusu uhuishaji wa mfumo wa utabiri wa kurudi nyuma."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Mipangilio hii inaruhusu uhuishaji wa mfumo wa uhuishaji wa utabiri wa ishara. Inahitaji kuweka mipangilio kwa kila programu enableOnBackInvokedCallback kuwa true katika faili ya maelezo."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Sogeza kushoto"</item>
-    <item msgid="5425394847942513942">"Sogeza chini"</item>
-    <item msgid="7728484337962740316">"Sogeza kulia"</item>
-    <item msgid="324200556467459329">"Sogeza juu"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"Asilimia <xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
     <string name="not_specified" msgid="5423502443185110328">"Haijabainishwa"</string>
     <string name="neuter" msgid="2075249330106127310">"Isiyobainika"</string>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 365c3da..6086384 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -355,7 +355,7 @@
     <string name="pointer_location_summary" msgid="957120116989798464">"திரையின் மேல் அடுக்கானது தற்போது தொடப்பட்டிருக்கும் தரவைக் காண்பிக்கிறது"</string>
     <string name="show_touches" msgid="8437666942161289025">"தட்டல்களைக் காட்டு"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"தட்டல்களின் போது காட்சி அறிகுறிகளைக் காட்டும்"</string>
-    <string name="show_key_presses" msgid="6360141722735900214">"பட்டன் அழுத்தத்தை காட்டவா"</string>
+    <string name="show_key_presses" msgid="6360141722735900214">"பட்டன் அழுத்தத்தை காட்டு"</string>
     <string name="show_key_presses_summary" msgid="725387457373015024">"பட்டன் அழுத்தங்களைக் காட்சி மூலம் உறுதிப்படுத்தும்"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"மேலோட்ட புதுப்பிப்புகளைக் காட்டு"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"சாளரத்தின் பரப்புநிலைகள் புதுப்பிக்கப்படும்போது, அவற்றை முழுவதுமாகக் காட்டும்"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"கணிக்கக்கூடிய பின்செல் சைகைக்கான அனிமேஷன்கள்"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"கணிக்கக்கூடிய பின்செல் சைகைக்காகச் சிஸ்டம் அனிமேஷன்களை இயக்கும்."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"கணிக்கக்கூடிய சைகைக்கான அனிமேஷனுக்காக இந்த அமைப்பு சிஸ்டம் அனிமேஷன்களை இயக்கும். மெனிஃபெஸ்ட் ஃபைலில் ஒவ்வொரு ஆப்ஸுக்கும் enableOnBackInvokedCallbackகை \'சரி\' என அமைக்க வேண்டும்."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"இடதுபுறம் நகர்த்துங்கள்"</item>
-    <item msgid="5425394847942513942">"கீழே நகர்த்துங்கள்"</item>
-    <item msgid="7728484337962740316">"வலதுபுறம் நகர்த்துங்கள்"</item>
-    <item msgid="324200556467459329">"மேலே நகர்த்துங்கள்"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"குறிப்பிடப்படவில்லை"</string>
     <string name="neuter" msgid="2075249330106127310">"அஃறிணை"</string>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index d1c464c..f43b56a 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -587,7 +587,7 @@
     <string name="user_setup_dialog_title" msgid="8037342066381939995">"యూజర్‌ను ఇప్పుడే సెటప్ చేయాలా?"</string>
     <string name="user_setup_dialog_message" msgid="269931619868102841">"పరికరాన్ని తీసుకోవడానికి వ్యక్తి అందుబాటులో ఉన్నారని నిర్ధారించుకొని, ఆపై వారికి స్టోరేజ్‌ స్థలాన్ని సెటప్ చేయండి"</string>
     <string name="user_setup_profile_dialog_message" msgid="4788197052296962620">"ఇప్పుడు ప్రొఫైల్‌ను సెటప్ చేయాలా?"</string>
-    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ఇప్పుడే సెట‌ప్ చేయి"</string>
+    <string name="user_setup_button_setup_now" msgid="1708269547187760639">"ఇప్పుడే సెట‌ప్ చేయండి"</string>
     <string name="user_setup_button_setup_later" msgid="8712980133555493516">"ఇప్పుడు కాదు"</string>
     <string name="user_add_user_type_title" msgid="551279664052914497">"జోడించండి"</string>
     <string name="user_new_user_name" msgid="60979820612818840">"కొత్త యూజర్"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ప్రివ్యూ గల బ్యాక్ యానిమేషన్‌లు"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"ప్రివ్యూ గల బ్యాక్ యానిమేషన్‌ల కోసం సిస్టమ్ యానిమేషన్‌లను ఎనేబుల్ చేయండి."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"ఊహించదగిన సంజ్ఞ యానిమేషన్ కోసం ఈ సెట్టింగ్ సిస్టమ్ యానిమేషన్‌లను ఎనేబుల్ చేస్తుంది. దీనికి మ్యానిఫెస్ట్ ఫైల్‌లో ఒక్కో యాప్‌లో enableOnBackInvokedCallback సెట్టింగ్‌ను ఒప్పునకు సెట్ చేయవలసి ఉంటుంది."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ఎడమ వైపుగా జరపండి"</item>
-    <item msgid="5425394847942513942">"కిందికి జరపండి"</item>
-    <item msgid="7728484337962740316">"కుడి వైపుగా జరపండి"</item>
-    <item msgid="324200556467459329">"పైకి జరపండి"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"పేర్కొనబడలేదు"</string>
     <string name="neuter" msgid="2075249330106127310">"తటస్థం"</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index bc6840b..c7b10fb 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"ภาพเคลื่อนไหวของการย้อนกลับที่คาดการณ์ได้"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"เปิดใช้ภาพเคลื่อนไหวของระบบสำหรับการย้อนกลับที่คาดการณ์ได้"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"การตั้งค่านี้จะเปิดใช้การเคลื่อนไหวของระบบสำหรับการเคลื่อนไหวจากท่าทางสัมผัสแบบคาดเดา โดยต้องตั้งค่า enableOnBackInvokedCallback สำหรับแต่ละแอปให้เป็น \"จริง\" ในไฟล์ Manifest"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"ย้ายไปทางซ้าย"</item>
-    <item msgid="5425394847942513942">"ย้ายลง"</item>
-    <item msgid="7728484337962740316">"ย้ายไปทางขวา"</item>
-    <item msgid="324200556467459329">"ย้ายขึ้น"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"ไม่ได้ระบุ"</string>
     <string name="neuter" msgid="2075249330106127310">"ไม่มีเพศ"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 4360b9f..8222c42 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Mga animation ng predictive na pagbalik"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"I-enable ang mga animation ng system para sa predictive na pagbalik."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ine-enable ng setting na ito ang mga animation ng system para sa animation ng predictive na galaw. Kinakailangan nitong itakda sa true ang enableOnBackInvokedCallback sa bawat app sa manifest file."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Ilipat pakaliwa"</item>
-    <item msgid="5425394847942513942">"Ilipat pababa"</item>
-    <item msgid="7728484337962740316">"Ilipat pakanan"</item>
-    <item msgid="324200556467459329">"Ilipat pataas"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Hindi tinukoy"</string>
     <string name="neuter" msgid="2075249330106127310">"Walang Kasarian"</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index 206df8f..991c918 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Tahmin edilen geri gitme animasyonları"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Tahmin edilen geri gitme için sistem animasyonlarını etkinleştirin"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu ayar, tahmine dayalı hareket animasyonu için sistem animasyonlarını etkinleştirir. Her uygulamanın manifest dosyasında enableOnBackInvokedCallback\'in doğru değerine ayarlanması gerekir."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Sola taşı"</item>
-    <item msgid="5425394847942513942">"Aşağı taşı"</item>
-    <item msgid="7728484337962740316">"Sağa taşı"</item>
-    <item msgid="324200556467459329">"Yukarı taşı"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"%%<xliff:g id="PERCENTAGE">%1$d</xliff:g>"</string>
     <string name="not_specified" msgid="5423502443185110328">"Belirtilmedi"</string>
     <string name="neuter" msgid="2075249330106127310">"Cinsiyetsiz"</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 2bc80df..1cb3185 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -355,7 +355,7 @@
     <string name="pointer_location_summary" msgid="957120116989798464">"Показувати на екрані жести й натискання"</string>
     <string name="show_touches" msgid="8437666942161289025">"Показувати дотики"</string>
     <string name="show_touches_summary" msgid="3692861665994502193">"Показувати візуальну реакцію на торкання"</string>
-    <string name="show_key_presses" msgid="6360141722735900214">"Показувати натиск. клавіш"</string>
+    <string name="show_key_presses" msgid="6360141722735900214">"Показувати натискання клавіш"</string>
     <string name="show_key_presses_summary" msgid="725387457373015024">"Показувати візуальний відгук на натискання клавіш"</string>
     <string name="show_screen_updates" msgid="2078782895825535494">"Показ. оновлення поверхні"</string>
     <string name="show_screen_updates_summary" msgid="2126932969682087406">"Підсвічувати вікна повністю під час оновлення"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Анімації з підказками для жесту \"Назад\""</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Увімкнути системну анімацію з підказками для жесту \"Назад\"."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Якщо вибрати це налаштування, для жесту \"Назад\" відображатиметься анімація з підказками. У файлі маніфесту атрибуту enableOnBackInvokedCallback додатка потрібно присвоїти значення true."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Перемістіть палець ліворуч"</item>
-    <item msgid="5425394847942513942">"Перемістіть палець униз"</item>
-    <item msgid="7728484337962740316">"Перемістіть палець праворуч"</item>
-    <item msgid="324200556467459329">"Перемістіть палець угору"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Не вказано"</string>
     <string name="neuter" msgid="2075249330106127310">"Середній рід"</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index b8bef4c..7e3a164 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"پیچھے جانے کے اشارے کی پیش گوئی والی اینیمیشنز"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"پیچھے جانے کے پیش گوئی والے اشارے کے لیے سسٹم اینیمیشنز فعال کریں۔"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"‏یہ ترتیب پیش گوئی والی اشارے کی اینیمیشن کے لیے سسٹم کی اینیمیشنز کو فعال کرتی ہے۔ اس کے لیے manifest فائل میں فی ایپ enableOnBackInvokedCallback کو درست پر سیٹ کرنے کی ضرورت ہے۔"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"دائيں منتقل کریں"</item>
-    <item msgid="5425394847942513942">"نیچے منتقل کریں"</item>
-    <item msgid="7728484337962740316">"بائيں منتقل کریں"</item>
-    <item msgid="324200556467459329">"اوپر منتقل کریں"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"متعین نہیں ہے"</string>
     <string name="neuter" msgid="2075249330106127310">"غیر واضح"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index 57c59e1..845b835 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -602,7 +602,7 @@
     <string name="add_user_failed" msgid="4809887794313944872">"Yangi foydalanuvchi yaratilmadi"</string>
     <string name="add_guest_failed" msgid="8074548434469843443">"Yangi mehmon yaratilmadi"</string>
     <string name="user_nickname" msgid="262624187455825083">"Nik"</string>
-    <string name="user_add_user" msgid="7876449291500212468">"Foydalanuvchi"</string>
+    <string name="user_add_user" msgid="7876449291500212468">"Foydalanuvchi kiritish"</string>
     <string name="guest_new_guest" msgid="3482026122932643557">"Mehmon kiritish"</string>
     <string name="guest_exit_guest" msgid="5908239569510734136">"Mehmonni olib tashlash"</string>
     <string name="guest_reset_guest" msgid="6110013010356013758">"Mehmon seansini tiklash"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Taxminiy qaytish animatsiyalari"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Taxminiy qaytish uchun tizim animatsiyalarini yoqish."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Bu sozlamalar taxminiy qaytish animatsiyalari uchun tizim animatsiyalarini faollashtiradi. Buning uchun har bir ilovaning manifest faylida enableOnBackInvokedCallback parametri “true” qiymatida boʻlishi lozim."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Chapga siljitish"</item>
-    <item msgid="5425394847942513942">"Pastga siljitish"</item>
-    <item msgid="7728484337962740316">"Oʻngga siljitish"</item>
-    <item msgid="324200556467459329">"Tepaga siljitish"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Koʻrsatilmagan"</string>
     <string name="neuter" msgid="2075249330106127310">"Oʻrta"</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 9877249..1809035 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -580,7 +580,7 @@
     <string name="user_add_profile_item_title" msgid="3111051717414643029">"Tiểu sử bị hạn chế"</string>
     <string name="user_add_user_title" msgid="5457079143694924885">"Thêm người dùng mới?"</string>
     <string name="user_add_user_message_long" msgid="1527434966294733380">"Bạn có thể chia sẻ thiết bị này với người khác bằng cách tạo thêm người dùng. Mỗi người dùng sẽ có không gian riêng của mình. Họ có thể tùy chỉnh không gian riêng đó bằng các ứng dụng, hình nền, v.v. Người dùng cũng có thể điều chỉnh các tùy chọn cài đặt thiết bị có ảnh hưởng đến tất cả mọi người, chẳng hạn như Wi‑Fi.\n\nKhi bạn thêm người dùng mới, họ cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác. Các dịch vụ và các tùy chọn cài đặt hỗ trợ tiếp cận có thể không chuyển sang người dùng mới."</string>
-    <string name="user_add_user_message_short" msgid="3295959985795716166">"Khi bạn thêm người dùng mới, họ cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác."</string>
+    <string name="user_add_user_message_short" msgid="3295959985795716166">"Khi bạn thêm người dùng mới, người đó cần thiết lập không gian của mình.\n\nMọi người dùng đều có thể cập nhật ứng dụng cho tất cả người dùng khác."</string>
     <string name="user_grant_admin_title" msgid="5157031020083343984">"Đặt người dùng này làm quản trị viên?"</string>
     <string name="user_grant_admin_message" msgid="1673791931033486709">"Quản trị viên có các đặc quyền mà những người dùng khác không có. Một quản trị viên có thể quản lý toàn bộ người dùng, cập nhật hoặc đặt lại thiết bị này, sửa đổi chế độ cài đặt, xem tất cả các ứng dụng đã cài đặt và cấp hoặc thu hồi đặc quyền của quản trị viên đối với những người khác."</string>
     <string name="user_grant_admin_button" msgid="5441486731331725756">"Đặt làm quản trị viên"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Ảnh xem trước thao tác quay lại"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Bật ảnh của hệ thống để xem trước thao tác quay lại"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Cài đặt này cho phép sử dụng ảnh động hệ thống cho ảnh động cử chỉ dự đoán. Nó yêu cầu cài đặt cho mỗi ứng dụng chuyển enableOnBackInvokedCallback thành lệnh true trong tệp kê khai."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Di chuyển sang trái"</item>
-    <item msgid="5425394847942513942">"Di chuyển xuống"</item>
-    <item msgid="7728484337962740316">"Di chuyển sang phải"</item>
-    <item msgid="324200556467459329">"Di chuyển lên"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Chưa xác định"</string>
     <string name="neuter" msgid="2075249330106127310">"Vô tính"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index a210e6c..7d02751 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -560,7 +560,7 @@
     <string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"连接时遇到问题。请关闭并重新开启设备"</string>
     <string name="media_transfer_wired_device_name" msgid="4447880899964056007">"有线音频设备"</string>
     <string name="help_label" msgid="3528360748637781274">"帮助和反馈"</string>
-    <string name="storage_category" msgid="2287342585424631813">"存储"</string>
+    <string name="storage_category" msgid="2287342585424631813">"存储空间"</string>
     <string name="shared_data_title" msgid="1017034836800864953">"共享数据"</string>
     <string name="shared_data_summary" msgid="5516326713822885652">"查看和修改共享数据"</string>
     <string name="shared_data_no_blobs_text" msgid="3108114670341737434">"此用户没有共享数据。"</string>
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"预见式返回动画"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"启用系统动画作为预见式返回动画。"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"此设置将启用系统动画作为预测性手势动画。这要求在清单文件中将单个应用的 enableOnBackInvokedCallback 设为 true。"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"左移"</item>
-    <item msgid="5425394847942513942">"下移"</item>
-    <item msgid="7728484337962740316">"右移"</item>
-    <item msgid="324200556467459329">"上移"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
     <string name="not_specified" msgid="5423502443185110328">"未指定"</string>
     <string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index f78b141..c563c86 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"預測返回手勢動畫"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"為預測返回手勢啟用系統動畫。"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"此設定會啟用系統動畫作為預測手勢動畫。這必須在資訊清單檔案中將個別應用程式的 enableOnBackInvokedCallback 設定為 true。"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"向左移"</item>
-    <item msgid="5425394847942513942">"向下移"</item>
-    <item msgid="7728484337962740316">"向右移"</item>
-    <item msgid="324200556467459329">"向上移"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"未指定"</string>
     <string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index a66a029..eb3843e 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"預測返回操作動畫"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"為預測返回操作啟用系統動畫。"</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"這項設定會啟用系統動畫做為預測手勢動畫。這必須在資訊清單檔案中將個別應用程式的 enableOnBackInvokedCallback 設為 true。"</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"向左移"</item>
-    <item msgid="5425394847942513942">"向下移"</item>
-    <item msgid="7728484337962740316">"向右移"</item>
-    <item msgid="324200556467459329">"向上移"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"未指定"</string>
     <string name="neuter" msgid="2075249330106127310">"中性"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 45b8c54..f4fd352 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -684,12 +684,6 @@
     <string name="back_navigation_animation" msgid="8105467568421689484">"Ukubikezelwa kwasemuva kopopayi"</string>
     <string name="back_navigation_animation_summary" msgid="741292224121599456">"Nika amandla ukubikezela emuva kopopayi besistimu."</string>
     <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Leli sethingi livumela opopayi besistimu mayelana nokuthinta okubikezelwayo kopopayi. Idinga ukusetha i-app ngayinye ku-enableOnBackInvokedCallback ukuze iqinisekise ifayela le-manifest."</string>
-  <string-array name="udfps_accessibility_touch_hints">
-    <item msgid="1737722959616802157">"Yisa kwesokunxele"</item>
-    <item msgid="5425394847942513942">"Yehlisa"</item>
-    <item msgid="7728484337962740316">"Yisa kwesokudla"</item>
-    <item msgid="324200556467459329">"Khuphula"</item>
-  </string-array>
     <string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
     <string name="not_specified" msgid="5423502443185110328">"Akucacisiwe"</string>
     <string name="neuter" msgid="2075249330106127310">"Okungenabulili"</string>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index ec24ab7..8dc95f4 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1665,14 +1665,6 @@
     <!-- Developer setting: enable animations when a back gesture is executed, full explanation[CHAR LIMIT=NONE] -->
     <string name="back_navigation_animation_dialog">This setting enables system animations for predictive gesture animation. It requires setting per-app "enableOnBackInvokedCallback" to true in the manifest file.</string>
 
-    <!-- [CHAR LIMIT=NONE] Messages shown when users press outside of udfps region during -->
-    <string-array name="udfps_accessibility_touch_hints">
-        <item>Move left</item>
-        <item>Move down</item>
-        <item>Move right</item>
-        <item>Move up</item>
-    </string-array>
-
     <!-- Formatting states for the scale of font size, in percent. Double "%" is required to represent the symbol "%". [CHAR LIMIT=20] -->
     <string name="font_scale_percentage"> <xliff:g id="percentage">%1$d</xliff:g> %%</string>
 
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
index ff960f3..03d1cda 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtilsInternal.java
@@ -20,6 +20,8 @@
 import static android.app.admin.DevicePolicyManager.MTE_NOT_CONTROLLED_BY_POLICY;
 import static android.app.admin.DevicePolicyManager.PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER;
 
+import static com.android.settingslib.Utils.getColorAttrDefaultColor;
+
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.UserIdInt;
@@ -125,7 +127,8 @@
             return null;
         }
 
-        final EnforcedAdmin admin = getProfileOrDeviceOwner(context, enforcingUser.getUserHandle());
+        final EnforcedAdmin admin =
+                getProfileOrDeviceOwner(context, userRestriction, enforcingUser.getUserHandle());
         if (admin != null) {
             return admin;
         }
@@ -638,7 +641,8 @@
         removeExistingRestrictedSpans(sb);
 
         if (admin != null) {
-            final int disabledColor = context.getColor(R.color.disabled_text_color);
+            final int disabledColor = getColorAttrDefaultColor(context,
+                    android.R.attr.textColorHint);
             sb.setSpan(new ForegroundColorSpan(disabledColor), 0, sb.length(),
                     Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
             ImageSpan image = new RestrictedLockImageSpan(context);
diff --git a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
index dcb0a07..8b0f19d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
+++ b/packages/SettingsLib/src/com/android/settingslib/RestrictedPreferenceHelper.java
@@ -17,7 +17,6 @@
 package com.android.settingslib;
 
 import static android.app.admin.DevicePolicyResources.Strings.Settings.CONTROLLED_BY_ADMIN_SUMMARY;
-
 import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
 
 import android.app.admin.DevicePolicyManager;
@@ -32,6 +31,7 @@
 import android.widget.TextView;
 
 import androidx.annotation.RequiresApi;
+import androidx.annotation.VisibleForTesting;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceViewHolder;
 
@@ -48,7 +48,8 @@
     int uid;
 
     private boolean mDisabledByAdmin;
-    private EnforcedAdmin mEnforcedAdmin;
+    @VisibleForTesting
+    EnforcedAdmin mEnforcedAdmin;
     private String mAttrUserRestriction = null;
     private boolean mDisabledSummary = false;
 
@@ -193,8 +194,14 @@
      * @return true if the disabled state was changed.
      */
     public boolean setDisabledByAdmin(EnforcedAdmin admin) {
-        final boolean disabled = (admin != null ? true : false);
-        mEnforcedAdmin = admin;
+        boolean disabled = false;
+        mEnforcedAdmin = null;
+        if (admin != null) {
+            disabled = true;
+            // Copy the received instance to prevent pass be reference being overwritten.
+            mEnforcedAdmin = new EnforcedAdmin(admin);
+        }
+
         boolean changed = false;
         if (mDisabledByAdmin != disabled) {
             mDisabledByAdmin = disabled;
diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java
index 9d533fa..412a342 100644
--- a/packages/SettingsLib/src/com/android/settingslib/Utils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java
@@ -549,7 +549,12 @@
 
     /**
      * Return the combined service state.
-     * To make behavior consistent with SystemUI and Settings/AboutPhone/SIM status UI
+     * To make behavior consistent with SystemUI and Settings/AboutPhone/SIM status UI.
+     *
+     * This method returns a single service state int if either the voice reg state is
+     * {@link ServiceState#STATE_IN_SERVICE} or if data network is registered via a
+     * WWAN transport type. We consider the combined service state of an IWLAN network
+     * to be OOS.
      *
      * @param serviceState Service state. {@link ServiceState}
      */
@@ -558,23 +563,37 @@
             return ServiceState.STATE_OUT_OF_SERVICE;
         }
 
-        // Consider the device to be in service if either voice or data
-        // service is available. Some SIM cards are marketed as data-only
-        // and do not support voice service, and on these SIM cards, we
-        // want to show signal bars for data service as well as the "no
-        // service" or "emergency calls only" text that indicates that voice
-        // is not available. Note that we ignore the IWLAN service state
-        // because that state indicates the use of VoWIFI and not cell service
-        final int state = serviceState.getState();
-        final int dataState = serviceState.getDataRegistrationState();
+        final int voiceRegState = serviceState.getVoiceRegState();
 
-        if (state == ServiceState.STATE_OUT_OF_SERVICE
-                || state == ServiceState.STATE_EMERGENCY_ONLY) {
-            if (dataState == ServiceState.STATE_IN_SERVICE && isNotInIwlan(serviceState)) {
+        // Consider a mobile connection to be "in service" if either voice is IN_SERVICE
+        // or the data registration reports IN_SERVICE on a transport type of WWAN. This
+        // effectively excludes the IWLAN condition. IWLAN connections imply service via
+        // Wi-Fi rather than cellular, and so we do not consider these transports when
+        // determining if cellular is "in service".
+
+        if (voiceRegState == ServiceState.STATE_OUT_OF_SERVICE
+                || voiceRegState == ServiceState.STATE_EMERGENCY_ONLY) {
+            if (isDataRegInWwanAndInService(serviceState)) {
                 return ServiceState.STATE_IN_SERVICE;
             }
         }
-        return state;
+
+        return voiceRegState;
+    }
+
+    // ServiceState#mDataRegState can be set to IN_SERVICE if the network is registered
+    // on either a WLAN or WWAN network. Since we want to exclude the WLAN network, we can
+    // query the WWAN network directly and check for its registration state
+    private static boolean isDataRegInWwanAndInService(ServiceState serviceState) {
+        final NetworkRegistrationInfo networkRegWwan = serviceState.getNetworkRegistrationInfo(
+                NetworkRegistrationInfo.DOMAIN_PS,
+                AccessNetworkConstants.TRANSPORT_TYPE_WWAN);
+
+        if (networkRegWwan == null) {
+            return false;
+        }
+
+        return networkRegWwan.isInService();
     }
 
     /** Get the corresponding adaptive icon drawable. */
@@ -598,21 +617,6 @@
                 UserHandle.getUserHandleForUid(appInfo.uid));
     }
 
-    private static boolean isNotInIwlan(ServiceState serviceState) {
-        final NetworkRegistrationInfo networkRegWlan = serviceState.getNetworkRegistrationInfo(
-                NetworkRegistrationInfo.DOMAIN_PS,
-                AccessNetworkConstants.TRANSPORT_TYPE_WLAN);
-        if (networkRegWlan == null) {
-            return true;
-        }
-
-        final boolean isInIwlan = (networkRegWlan.getRegistrationState()
-                == NetworkRegistrationInfo.REGISTRATION_STATE_HOME)
-                || (networkRegWlan.getRegistrationState()
-                == NetworkRegistrationInfo.REGISTRATION_STATE_ROAMING);
-        return !isInIwlan;
-    }
-
     /**
      * Returns a bitmap with rounded corner.
      *
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
index 755d971..fa8c1fb 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java
@@ -4,9 +4,9 @@
 
 import android.annotation.SuppressLint;
 import android.bluetooth.BluetoothClass;
+import android.bluetooth.BluetoothCsipSetCoordinator;
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothProfile;
-import android.bluetooth.BluetoothCsipSetCoordinator;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
@@ -14,6 +14,7 @@
 import android.graphics.Canvas;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
+import android.media.AudioManager;
 import android.net.Uri;
 import android.provider.DeviceConfig;
 import android.provider.MediaStore;
@@ -23,6 +24,7 @@
 
 import androidx.annotation.DrawableRes;
 import androidx.annotation.NonNull;
+import androidx.annotation.WorkerThread;
 import androidx.core.graphics.drawable.IconCompat;
 
 import com.android.settingslib.R;
@@ -470,6 +472,136 @@
         return extraTagValue(KEY_HEARABLE_CONTROL_SLICE, data);
     }
 
+    /**
+     * Check if the Bluetooth device is an AvailableMediaBluetoothDevice, which means:
+     * 1) currently connected
+     * 2) is Hearing Aid or LE Audio
+     *    OR
+     * 3) connected profile matches currentAudioProfile
+     *
+     * @param cachedDevice the CachedBluetoothDevice
+     * @param audioManager audio manager to get the current audio profile
+     * @return if the device is AvailableMediaBluetoothDevice
+     */
+    @WorkerThread
+    public static boolean isAvailableMediaBluetoothDevice(
+            CachedBluetoothDevice cachedDevice, AudioManager audioManager) {
+        int audioMode = audioManager.getMode();
+        int currentAudioProfile;
+
+        if (audioMode == AudioManager.MODE_RINGTONE
+                || audioMode == AudioManager.MODE_IN_CALL
+                || audioMode == AudioManager.MODE_IN_COMMUNICATION) {
+            // in phone call
+            currentAudioProfile = BluetoothProfile.HEADSET;
+        } else {
+            // without phone call
+            currentAudioProfile = BluetoothProfile.A2DP;
+        }
+
+        boolean isFilterMatched = false;
+        if (isDeviceConnected(cachedDevice)) {
+            // If device is Hearing Aid or LE Audio, it is compatible with HFP and A2DP.
+            // It would show in Available Devices group.
+            if (cachedDevice.isConnectedAshaHearingAidDevice()
+                    || cachedDevice.isConnectedLeAudioDevice()) {
+                Log.d(TAG, "isFilterMatched() device : "
+                        + cachedDevice.getName() + ", the profile is connected.");
+                return true;
+            }
+            // According to the current audio profile type,
+            // this page will show the bluetooth device that have corresponding profile.
+            // For example:
+            // If current audio profile is a2dp, show the bluetooth device that have a2dp profile.
+            // If current audio profile is headset,
+            // show the bluetooth device that have headset profile.
+            switch (currentAudioProfile) {
+                case BluetoothProfile.A2DP:
+                    isFilterMatched = cachedDevice.isConnectedA2dpDevice();
+                    break;
+                case BluetoothProfile.HEADSET:
+                    isFilterMatched = cachedDevice.isConnectedHfpDevice();
+                    break;
+            }
+        }
+        return isFilterMatched;
+    }
+
+    /**
+     * Check if the Bluetooth device is a ConnectedBluetoothDevice, which means:
+     * 1) currently connected
+     * 2) is not Hearing Aid or LE Audio
+     *    AND
+     * 3) connected profile does not match currentAudioProfile
+     *
+     * @param cachedDevice the CachedBluetoothDevice
+     * @param audioManager audio manager to get the current audio profile
+     * @return if the device is AvailableMediaBluetoothDevice
+     */
+    @WorkerThread
+    public static boolean isConnectedBluetoothDevice(
+            CachedBluetoothDevice cachedDevice, AudioManager audioManager) {
+        int audioMode = audioManager.getMode();
+        int currentAudioProfile;
+
+        if (audioMode == AudioManager.MODE_RINGTONE
+                || audioMode == AudioManager.MODE_IN_CALL
+                || audioMode == AudioManager.MODE_IN_COMMUNICATION) {
+            // in phone call
+            currentAudioProfile = BluetoothProfile.HEADSET;
+        } else {
+            // without phone call
+            currentAudioProfile = BluetoothProfile.A2DP;
+        }
+
+        boolean isFilterMatched = false;
+        if (isDeviceConnected(cachedDevice)) {
+            // If device is Hearing Aid or LE Audio, it is compatible with HFP and A2DP.
+            // It would not show in Connected Devices group.
+            if (cachedDevice.isConnectedAshaHearingAidDevice()
+                    || cachedDevice.isConnectedLeAudioDevice()) {
+                return false;
+            }
+            // According to the current audio profile type,
+            // this page will show the bluetooth device that doesn't have corresponding profile.
+            // For example:
+            // If current audio profile is a2dp,
+            // show the bluetooth device that doesn't have a2dp profile.
+            // If current audio profile is headset,
+            // show the bluetooth device that doesn't have headset profile.
+            switch (currentAudioProfile) {
+                case BluetoothProfile.A2DP:
+                    isFilterMatched = !cachedDevice.isConnectedA2dpDevice();
+                    break;
+                case BluetoothProfile.HEADSET:
+                    isFilterMatched = !cachedDevice.isConnectedHfpDevice();
+                    break;
+            }
+        }
+        return isFilterMatched;
+    }
+
+    /**
+     * Check if the Bluetooth device is an active media device
+     *
+     * @param cachedDevice the CachedBluetoothDevice
+     * @return if the Bluetooth device is an active media device
+     */
+    public static boolean isActiveMediaDevice(CachedBluetoothDevice cachedDevice) {
+        return cachedDevice.isActiveDevice(BluetoothProfile.A2DP)
+                || cachedDevice.isActiveDevice(BluetoothProfile.HEADSET)
+                || cachedDevice.isActiveDevice(BluetoothProfile.HEARING_AID)
+                || cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO);
+    }
+
+    private static boolean isDeviceConnected(CachedBluetoothDevice cachedDevice) {
+        if (cachedDevice == null) {
+            return false;
+        }
+        final BluetoothDevice device = cachedDevice.getDevice();
+        return device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected();
+    }
+
     @SuppressLint("NewApi") // Hidden API made public
     private static boolean doesClassMatch(BluetoothClass btClass, int classId) {
         return btClass.doesClassMatch(classId);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 64c271b..c67df71 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -54,6 +54,7 @@
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.stream.Stream;
 
 /**
  * CachedBluetoothDevice represents a remote Bluetooth device. It contains
@@ -684,6 +685,20 @@
         return mDevice.getBatteryLevel();
     }
 
+    /**
+     * Get the lowest battery level from remote device and its member devices
+     * @return battery level in percentage [0-100] or
+     * {@link BluetoothDevice#BATTERY_LEVEL_UNKNOWN}
+     */
+    public int getMinBatteryLevelWithMemberDevices() {
+        return Stream.concat(Stream.of(this), mMemberDevices.stream())
+                .mapToInt(cachedDevice -> cachedDevice.getBatteryLevel())
+                .filter(batteryLevel -> batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN)
+                .min()
+                .orElse(BluetoothDevice.BATTERY_LEVEL_UNKNOWN);
+    }
+
+
     void refresh() {
         ThreadUtils.postOnBackgroundThread(() -> {
             if (BluetoothUtils.isAdvancedDetailsHeader(mDevice)) {
@@ -1185,7 +1200,7 @@
         // BluetoothDevice.BATTERY_LEVEL_BLUETOOTH_OFF, or BluetoothDevice.BATTERY_LEVEL_UNKNOWN,
         // any other value should be a framework bug. Thus assume here that if value is greater
         // than BluetoothDevice.BATTERY_LEVEL_UNKNOWN, it must be valid
-        final int batteryLevel = getBatteryLevel();
+        final int batteryLevel = getMinBatteryLevelWithMemberDevices();
         if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
             // TODO: name com.android.settingslib.bluetooth.Utils something different
             batteryLevelPercentageString =
@@ -1360,7 +1375,7 @@
         // BluetoothDevice.BATTERY_LEVEL_BLUETOOTH_OFF, or BluetoothDevice.BATTERY_LEVEL_UNKNOWN,
         // any other value should be a framework bug. Thus assume here that if value is greater
         // than BluetoothDevice.BATTERY_LEVEL_UNKNOWN, it must be valid
-        final int batteryLevel = getBatteryLevel();
+        final int batteryLevel = getMinBatteryLevelWithMemberDevices();
         if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
             // TODO: name com.android.settingslib.bluetooth.Utils something different
             batteryLevelPercentageString =
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
index f90a17a..7f1f3f6 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryStatus.java
@@ -40,9 +40,7 @@
  * Stores and computes some battery information.
  */
 public class BatteryStatus {
-    private static final int LOW_BATTERY_THRESHOLD = 20;
-    private static final int SEVERE_LOW_BATTERY_THRESHOLD = 10;
-    private static final int EXTREME_LOW_BATTERY_THRESHOLD = 3;
+
     private static final int DEFAULT_CHARGING_VOLTAGE_MICRO_VOLT = 5000000;
 
     public static final int BATTERY_LEVEL_UNKNOWN = -1;
@@ -50,6 +48,9 @@
     public static final int CHARGING_SLOWLY = 0;
     public static final int CHARGING_REGULAR = 1;
     public static final int CHARGING_FAST = 2;
+    public static final int LOW_BATTERY_THRESHOLD = 20;
+    public static final int SEVERE_LOW_BATTERY_THRESHOLD = 10;
+    public static final int EXTREME_LOW_BATTERY_THRESHOLD = 3;
 
     public final int status;
     public final int level;
@@ -197,9 +198,14 @@
                 : Math.round((level / (float) scale) * 100f);
     }
 
+    /** Returns the plugged type from {@code batteryChangedIntent}. */
+    public static int getPluggedType(Intent batteryChangedIntent) {
+        return batteryChangedIntent.getIntExtra(EXTRA_PLUGGED, 0);
+    }
+
     /** Whether the device is plugged or not. */
     public static boolean isPluggedIn(Intent batteryChangedIntent) {
-        return isPluggedIn(batteryChangedIntent.getIntExtra(EXTRA_PLUGGED, 0));
+        return isPluggedIn(getPluggedType(batteryChangedIntent));
     }
 
     /** Whether the device is plugged or not. */
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
index ad9886e..88dcc0d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
@@ -22,6 +22,9 @@
 
 public final class BatteryUtils {
 
+    /** The key to get the time to full from Settings.Global */
+    public static final String GLOBAL_TIME_TO_FULL_MILLIS = "time_to_full_millis";
+
     /** Gets the latest sticky battery intent from the Android system. */
     public static Intent getBatteryIntent(Context context) {
         return context.registerReceiver(
diff --git a/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java b/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
index 6fba0a1..77789c2 100644
--- a/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
+++ b/packages/SettingsLib/src/com/android/settingslib/net/UidDetail.java
@@ -24,5 +24,5 @@
     public CharSequence[] detailLabels;
     public CharSequence[] detailContentDescriptions;
     public Drawable icon;
-    public CharSequence packageName;
+    public String packageName;
 }
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 94e28f2..a03977c1 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedLockUtilsTest.java
@@ -21,11 +21,8 @@
 import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT;
 import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT;
 import static android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS;
-
 import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
-
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
@@ -78,6 +75,8 @@
 
         when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE))
                 .thenReturn(mDevicePolicyManager);
+        when(mContext.getSystemService(DevicePolicyManager.class))
+                .thenReturn(mDevicePolicyManager);
         when(mContext.getSystemService(Context.USER_SERVICE))
                 .thenReturn(mUserManager);
         when(mContext.getPackageManager())
@@ -87,14 +86,20 @@
     }
 
     @Test
-    public void checkIfRestrictionEnforced_deviceOwner() {
+    public void checkIfRestrictionEnforced_deviceOwner()
+            throws PackageManager.NameNotFoundException {
         UserManager.EnforcingUser enforcingUser = new UserManager.EnforcingUser(mUserId,
                 UserManager.RESTRICTION_SOURCE_DEVICE_OWNER);
         final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS;
         when(mUserManager.getUserRestrictionSources(userRestriction,
                 UserHandle.of(mUserId))).
                 thenReturn(Collections.singletonList(enforcingUser));
-        setUpDeviceOwner(mAdmin1);
+
+        when(mContext.createPackageContextAsUser(any(), eq(0),
+                eq(UserHandle.of(mUserId))))
+                .thenReturn(mContext);
+
+        setUpDeviceOwner(mAdmin1, mUserId);
 
         EnforcedAdmin enforcedAdmin = RestrictedLockUtilsInternal
                 .checkIfRestrictionEnforced(mContext, userRestriction, mUserId);
@@ -105,14 +110,20 @@
     }
 
     @Test
-    public void checkIfRestrictionEnforced_profileOwner() {
+    public void checkIfRestrictionEnforced_profileOwner()
+            throws PackageManager.NameNotFoundException {
         UserManager.EnforcingUser enforcingUser = new UserManager.EnforcingUser(mUserId,
                 UserManager.RESTRICTION_SOURCE_PROFILE_OWNER);
         final String userRestriction = UserManager.DISALLOW_UNINSTALL_APPS;
         when(mUserManager.getUserRestrictionSources(userRestriction,
                 UserHandle.of(mUserId))).
                 thenReturn(Collections.singletonList(enforcingUser));
-        setUpProfileOwner(mAdmin1, mUserId);
+
+        when(mContext.createPackageContextAsUser(any(), eq(0),
+                eq(UserHandle.of(mUserId))))
+                .thenReturn(mContext);
+
+        setUpProfileOwner(mAdmin1);
 
         EnforcedAdmin enforcedAdmin = RestrictedLockUtilsInternal
                 .checkIfRestrictionEnforced(mContext, userRestriction, mUserId);
@@ -326,11 +337,12 @@
                 .thenReturn(Arrays.asList(activeAdmins));
     }
 
-    private void setUpDeviceOwner(ComponentName admin) {
+    private void setUpDeviceOwner(ComponentName admin, int userId) {
         when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(admin);
+        when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(UserHandle.of(userId));
     }
 
-    private void setUpProfileOwner(ComponentName admin, int userId) {
-        when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin);
+    private void setUpProfileOwner(ComponentName admin) {
+        when(mDevicePolicyManager.getProfileOwner()).thenReturn(admin);
     }
 }
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
index 1b0738f..701f008 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/RestrictedPreferenceHelperTest.java
@@ -16,6 +16,7 @@
 
 package com.android.settingslib;
 
+import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.doReturn;
@@ -119,4 +120,26 @@
 
         verify(mRestrictedTopLevelPreference, never()).setEnabled(false);
     }
+
+    /**
+     * Tests if the instance of {@link RestrictedLockUtils.EnforcedAdmin} is received by
+     * {@link RestrictedPreferenceHelper#setDisabledByAdmin(RestrictedLockUtils.EnforcedAdmin)} as a
+     * copy or as a reference.
+     */
+    @Test
+    public void setDisabledByAdmin_disablePreference_receivedEnforcedAdminIsNotAReference() {
+        RestrictedLockUtils.EnforcedAdmin enforcedAdmin =
+                new RestrictedLockUtils.EnforcedAdmin(/* component */ null,
+                        /* enforcedRestriction */ "some_restriction",
+                        /* userHandle */ null);
+
+        mHelper.setDisabledByAdmin(enforcedAdmin);
+
+        // If `setDisabledByAdmin` stored `enforcedAdmin` as a reference, then the following
+        // assignment would be propagated.
+        enforcedAdmin.enforcedRestriction = null;
+        assertThat(mHelper.mEnforcedAdmin.enforcedRestriction).isEqualTo("some_restriction");
+
+        assertThat(mHelper.isDisabledByAdmin()).isTrue();
+    }
 }
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
index bb72375..29846ac 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java
@@ -200,47 +200,55 @@
 
     @Test
     public void isInService_voiceInService_returnTrue() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
 
         assertThat(Utils.isInService(mServiceState)).isTrue();
     }
 
     @Test
     public void isInService_voiceOutOfServiceDataInService_returnTrue() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
         when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
-                AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
-        when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
-                NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN);
+                AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+        when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
 
         assertThat(Utils.isInService(mServiceState)).isTrue();
     }
 
     @Test
     public void isInService_voiceOutOfServiceDataInServiceOnIwLan_returnFalse() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
                 AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
-        when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
-                NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
         when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+        when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
+
+        assertThat(Utils.isInService(mServiceState)).isFalse();
+    }
+
+    @Test
+    public void isInService_voiceOutOfServiceDataNull_returnFalse() {
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
+                AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(null);
 
         assertThat(Utils.isInService(mServiceState)).isFalse();
     }
 
     @Test
     public void isInService_voiceOutOfServiceDataOutOfService_returnFalse() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
-        when(mServiceState.getDataRegistrationState()).thenReturn(
-                ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
+                AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+        when(mNetworkRegistrationInfo.isInService()).thenReturn(false);
 
         assertThat(Utils.isInService(mServiceState)).isFalse();
     }
 
     @Test
     public void isInService_ServiceStatePowerOff_returnFalse() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_POWER_OFF);
 
         assertThat(Utils.isInService(mServiceState)).isFalse();
     }
@@ -253,7 +261,7 @@
 
     @Test
     public void getCombinedServiceState_ServiceStatePowerOff_returnPowerOff() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_POWER_OFF);
 
         assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
                 ServiceState.STATE_POWER_OFF);
@@ -261,7 +269,7 @@
 
     @Test
     public void getCombinedServiceState_voiceInService_returnInService() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
 
         assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
                 ServiceState.STATE_IN_SERVICE);
@@ -269,12 +277,10 @@
 
     @Test
     public void getCombinedServiceState_voiceOutOfServiceDataInService_returnInService() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
-        when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
-                AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
-        when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
-                NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN);
+                AccessNetworkConstants.TRANSPORT_TYPE_WWAN)).thenReturn(mNetworkRegistrationInfo);
+        when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
 
         assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
                 ServiceState.STATE_IN_SERVICE);
@@ -282,12 +288,10 @@
 
     @Test
     public void getCombinedServiceState_voiceOutOfServiceDataInServiceOnIwLan_returnOutOfService() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
-        when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS,
                 AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo);
-        when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn(
-                NetworkRegistrationInfo.REGISTRATION_STATE_HOME);
+        when(mNetworkRegistrationInfo.isInService()).thenReturn(true);
 
         assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo(
                 ServiceState.STATE_OUT_OF_SERVICE);
@@ -295,7 +299,7 @@
 
     @Test
     public void getCombinedServiceState_voiceOutOfServiceDataOutOfService_returnOutOfService() {
-        when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
+        when(mServiceState.getVoiceRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
         when(mServiceState.getDataRegistrationState()).thenReturn(
                 ServiceState.STATE_OUT_OF_SERVICE);
 
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java
index 83972e8..7409eea 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/BluetoothUtilsTest.java
@@ -16,7 +16,6 @@
 package com.android.settingslib.bluetooth;
 
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -25,6 +24,7 @@
 import android.bluetooth.BluetoothDevice;
 import android.content.Context;
 import android.graphics.drawable.Drawable;
+import android.media.AudioManager;
 import android.net.Uri;
 import android.util.Pair;
 
@@ -46,6 +46,8 @@
     private CachedBluetoothDevice mCachedBluetoothDevice;
     @Mock
     private BluetoothDevice mBluetoothDevice;
+    @Mock
+    private AudioManager mAudioManager;
 
     private Context mContext;
     private static final String STRING_METADATA = "string_metadata";
@@ -255,4 +257,110 @@
     public void isAdvancedUntetheredDevice_noMetadata_returnFalse() {
         assertThat(BluetoothUtils.isAdvancedUntetheredDevice(mBluetoothDevice)).isEqualTo(false);
     }
+
+    @Test
+    public void isAvailableMediaBluetoothDevice_isConnectedLeAudioDevice_returnTrue() {
+        when(mCachedBluetoothDevice.isConnectedLeAudioDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isAvailableMediaBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(true);
+    }
+
+    @Test
+    public void isAvailableMediaBluetoothDevice_isHeadset_isConnectedA2dpDevice_returnFalse() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_RINGTONE);
+        when(mCachedBluetoothDevice.isConnectedA2dpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isAvailableMediaBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(false);
+    }
+
+    @Test
+    public void isAvailableMediaBluetoothDevice_isA2dp_isConnectedA2dpDevice_returnTrue() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_NORMAL);
+        when(mCachedBluetoothDevice.isConnectedA2dpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isAvailableMediaBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(true);
+    }
+
+    @Test
+    public void isAvailableMediaBluetoothDevice_isHeadset_isConnectedHfpDevice_returnTrue() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_RINGTONE);
+        when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isAvailableMediaBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(true);
+    }
+
+    @Test
+    public void isConnectedBluetoothDevice_isConnectedLeAudioDevice_returnFalse() {
+        when(mCachedBluetoothDevice.isConnectedLeAudioDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isConnectedBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(false);
+    }
+
+    @Test
+    public void isConnectedBluetoothDevice_isHeadset_isConnectedA2dpDevice_returnTrue() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_RINGTONE);
+        when(mCachedBluetoothDevice.isConnectedA2dpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isConnectedBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(true);
+    }
+
+    @Test
+    public void isConnectedBluetoothDevice_isA2dp_isConnectedA2dpDevice_returnFalse() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_NORMAL);
+        when(mCachedBluetoothDevice.isConnectedA2dpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isConnectedBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(false);
+    }
+
+    @Test
+    public void isConnectedBluetoothDevice_isHeadset_isConnectedHfpDevice_returnFalse() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_RINGTONE);
+        when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(true);
+
+        assertThat(BluetoothUtils.isConnectedBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(false);
+    }
+
+    @Test
+    public void isConnectedBluetoothDevice_isNotConnected_returnFalse() {
+        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_RINGTONE);
+        when(mCachedBluetoothDevice.isConnectedA2dpDevice()).thenReturn(true);
+        when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice);
+        when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+        when(mBluetoothDevice.isConnected()).thenReturn(false);
+
+        assertThat(BluetoothUtils.isConnectedBluetoothDevice(mCachedBluetoothDevice,
+                mAudioManager)).isEqualTo(false);
+    }
 }
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index 4b61ff1..85efe69 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -529,6 +529,51 @@
     }
 
     @Test
+    public void getConnectionSummary_testMemberDevicesExist_returnMinBattery() {
+        // One device is active with battery level 70.
+        mBatteryLevel = 70;
+        updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+        mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+
+        // Add a member device with battery level 30.
+        int lowerBatteryLevel = 30;
+        mCachedDevice.addMemberDevice(mSubCachedDevice);
+        doAnswer((invocation) -> lowerBatteryLevel).when(mSubCachedDevice).getBatteryLevel();
+
+        assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active, 30% battery");
+    }
+
+    @Test
+    public void getConnectionSummary_testMemberDevicesBatteryUnknown_returnMinBattery() {
+        // One device is active with battery level 70.
+        mBatteryLevel = 70;
+        updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+        mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+        // Add a member device with battery level unknown.
+        mCachedDevice.addMemberDevice(mSubCachedDevice);
+        doAnswer((invocation) -> BluetoothDevice.BATTERY_LEVEL_UNKNOWN).when(
+                mSubCachedDevice).getBatteryLevel();
+
+        assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active, 70% battery");
+    }
+
+    @Test
+    public void getConnectionSummary_testAllDevicesBatteryUnknown_returnNoBattery() {
+        // One device is active with battery level unknown.
+        updateProfileStatus(mA2dpProfile, BluetoothProfile.STATE_CONNECTED);
+        mCachedDevice.onActiveDeviceChanged(true, BluetoothProfile.A2DP);
+
+        // Add a member device with battery level unknown.
+        mCachedDevice.addMemberDevice(mSubCachedDevice);
+        doAnswer((invocation) -> BluetoothDevice.BATTERY_LEVEL_UNKNOWN).when(
+                mSubCachedDevice).getBatteryLevel();
+
+        assertThat(mCachedDevice.getConnectionSummary()).isEqualTo("Active");
+    }
+
+    @Test
     public void getConnectionSummary_testMultipleProfilesActiveDevice() {
         // Test without battery level
         // Set A2DP and HFP profiles to be connected and test connection state summary
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 2086466..a8063e8 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
@@ -35,6 +35,7 @@
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -52,6 +53,7 @@
 import android.content.pm.ProviderInfo;
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
+import android.net.Uri;
 import android.os.Bundle;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -69,6 +71,8 @@
 import org.robolectric.annotation.Config;
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
+import org.robolectric.shadow.api.Shadow;
+import org.robolectric.util.ReflectionHelpers;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -88,6 +92,10 @@
     private UserManager mUserManager;
     @Mock
     private ContentResolver mContentResolver;
+    @Mock
+    private Context mUserContext;
+    @Mock
+    private ContentResolver mUserContentResolver;
 
     private static final String URI_GET_SUMMARY = "content://authority/text/summary";
     private static final String URI_GET_ICON = "content://authority/icon/my_icon";
@@ -104,6 +112,8 @@
         mContentResolver = spy(application.getContentResolver());
         when(mContext.getContentResolver()).thenReturn(mContentResolver);
         when(mContext.getPackageName()).thenReturn("com.android.settings");
+        when(mUserContext.getContentResolver()).thenReturn(mUserContentResolver);
+        ShadowTileUtils.sCallRealEntryDataFromProvider = false;
     }
 
     @Test
@@ -375,6 +385,30 @@
     }
 
     @Test
+    public void loadTilesForAction_forUserProvider_getEntryDataFromProvider_inContextOfGivenUser() {
+        ShadowTileUtils.sCallRealEntryDataFromProvider = true;
+        UserHandle userHandle = new UserHandle(10);
+
+        doReturn(mUserContext).when(mContext).createContextAsUser(eq(userHandle), anyInt());
+
+        Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
+        List<Tile> outTiles = new ArrayList<>();
+        List<ResolveInfo> info = new ArrayList<>();
+        ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
+                URI_GET_SUMMARY, null, 123, PROFILE_ALL);
+        info.add(resolveInfo);
+
+        when(mPackageManager.queryIntentContentProvidersAsUser(any(Intent.class), anyInt(),
+            anyInt())).thenReturn(info);
+
+        TileUtils.loadTilesForAction(mContext, userHandle, IA_SETTINGS_ACTION,
+                addedCache, null /* defaultCategory */, outTiles, false /* requiresSettings */);
+
+        verify(mUserContentResolver, atLeastOnce())
+            .acquireUnstableProvider(any(Uri.class));
+    }
+
+    @Test
     public void loadTilesForAction_withPendingIntent_updatesPendingIntentMap() {
         Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
         List<Tile> outTiles = new ArrayList<>();
@@ -472,8 +506,17 @@
 
         private static Bundle sMetaData;
 
+        private static boolean sCallRealEntryDataFromProvider;
+
         @Implementation
         protected static List<Bundle> getEntryDataFromProvider(Context context, String authority) {
+            if (sCallRealEntryDataFromProvider) {
+                return Shadow.directlyOn(
+                    TileUtils.class,
+                    "getEntryDataFromProvider",
+                    ReflectionHelpers.ClassParameter.from(Context.class, context),
+                    ReflectionHelpers.ClassParameter.from(String.class, authority));
+            }
             return Arrays.asList(sMetaData);
         }
 
diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
index 94a3173..1c33544 100644
--- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
+++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
@@ -242,6 +242,7 @@
         Settings.Secure.HEARING_AID_MEDIA_ROUTING,
         Settings.Secure.HEARING_AID_SYSTEM_SOUNDS_ROUTING,
         Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED,
-        Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED
+        Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED,
+        Settings.Secure.SEARCH_LONG_PRESS_HOME_ENABLED
     };
 }
diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
index 8179998..301fd6f 100644
--- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
+++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
@@ -201,6 +201,7 @@
         VALIDATORS.put(Secure.ASSIST_TOUCH_GESTURE_ENABLED, BOOLEAN_VALIDATOR);
         VALIDATORS.put(Secure.ASSIST_LONG_PRESS_HOME_ENABLED, BOOLEAN_VALIDATOR);
         VALIDATORS.put(Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED, BOOLEAN_VALIDATOR);
+        VALIDATORS.put(Secure.SEARCH_LONG_PRESS_HOME_ENABLED, BOOLEAN_VALIDATOR);
         VALIDATORS.put(Secure.VR_DISPLAY_MODE, new DiscreteValueValidator(new String[] {"0", "1"}));
         VALIDATORS.put(Secure.NOTIFICATION_BADGING, BOOLEAN_VALIDATOR);
         VALIDATORS.put(Secure.NOTIFICATION_DISMISS_RTL, BOOLEAN_VALIDATOR);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 7186aba..3c8d4bc 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -1933,6 +1933,9 @@
         dumpSetting(s, p,
                 Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED,
                 SecureSettingsProto.Assist.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED);
+        dumpSetting(s, p,
+                Settings.Secure.SEARCH_LONG_PRESS_HOME_ENABLED,
+                SecureSettingsProto.Assist.SEARCH_LONG_PRESS_HOME_ENABLED);
         p.end(assistToken);
 
         final long assistHandlesToken = p.start(SecureSettingsProto.ASSIST_HANDLES);
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index b6bec1f..77925d6 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -240,6 +240,9 @@
 
         /* Log fakes */
         "tests/src/com/android/systemui/log/core/FakeLogBuffer.kt",
+
+        /* QS fakes */
+        "tests/src/com/android/systemui/qs/pipeline/domain/interactor/FakeQSTile.kt",
     ],
     path: "tests/src",
 }
@@ -293,8 +296,6 @@
 
         /* Biometric converted tests */
         "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt",
-        "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt",
-        "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt",
         "tests/src/com/android/systemui/biometrics/AuthControllerTest.java",
         "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java",
         "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt",
@@ -354,6 +355,11 @@
         "tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt",
         "tests/src/com/android/systemui/smartspace/LockscreenAndDreamTargetFilterTest.kt",
         "tests/src/com/android/systemui/smartspace/LockscreenPreconditionTest.kt",
+
+        /* Quick Settings new pipeline converted tests */
+        "tests/src/com/android/systemui/qs/pipeline/data/**/*Test.kt",
+        "tests/src/com/android/systemui/qs/pipeline/domain/**/*Test.kt",
+        "tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt",
     ],
     path: "tests/src",
 }
diff --git a/packages/SystemUI/OWNERS b/packages/SystemUI/OWNERS
index a892269..78da5a6 100644
--- a/packages/SystemUI/OWNERS
+++ b/packages/SystemUI/OWNERS
@@ -6,6 +6,7 @@
 
 aaliomer@google.com
 aaronjli@google.com
+achalke@google.com
 acul@google.com
 adamcohen@google.com
 aioana@google.com
@@ -72,6 +73,7 @@
 patmanning@google.com
 peanutbutter@google.com
 peskal@google.com
+petrcermak@google.com
 pinyaoting@google.com
 pixel@google.com
 pomini@google.com
@@ -82,13 +84,17 @@
 shanh@google.com
 snoeberger@google.com
 steell@google.com
+stevenckng@google.com
 stwu@google.com
 syeonlee@google.com
 sunnygoyal@google.com
 thiruram@google.com
+tkachenkoi@google.com
 tracyzhou@google.com
 tsuji@google.com
 twickham@google.com
+vadimt@google.com
+vanjan@google.com
 victortulias@google.com
 winsonc@google.com
 wleshner@google.com
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/Android.bp b/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
index f358417..ff723e3 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
+++ b/packages/SystemUI/accessibility/accessibilitymenu/Android.bp
@@ -36,6 +36,7 @@
         "androidx.preference_preference",
         "androidx.viewpager_viewpager",
         "SettingsLibDisplayUtils",
+        "com_android_a11y_menu_flags_lib",
     ],
 
     optimize: {
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
new file mode 100644
index 0000000..6d63409
--- /dev/null
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+    name: "com_android_a11y_menu_flags",
+    package: "com.android.systemui.accessibility.accessibilitymenu",
+    srcs: [
+        "accessibility.aconfig",
+    ],
+}
+
+java_aconfig_library {
+    name: "com_android_a11y_menu_flags_lib",
+    aconfig_declarations: "com_android_a11y_menu_flags",
+}
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
new file mode 100644
index 0000000..03cbc16
--- /dev/null
+++ b/packages/SystemUI/accessibility/accessibilitymenu/aconfig/accessibility.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.systemui.accessibility.accessibilitymenu"
+
+flag {
+    name: "a11y_menu_settings_back_button_fix_and_large_button_sizing"
+    namespace: "accessibility"
+    description: "Provides/restores back button functionality for the a11yMenu settings page. Also, fixes sizing problems with large shortcut buttons."
+    bug: "298467628"
+}
\ No newline at end of file
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
index 5d1f722..0480a2e 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-kn/strings.xml
@@ -11,7 +11,7 @@
     <string name="recent_apps_label" msgid="6583276995616385847">"ಇತ್ತೀಚಿನ ಅಪ್ಲಿಕೇಶನ್‌ಗಳು"</string>
     <string name="lockscreen_label" msgid="648347953557887087">"ಲಾಕ್ ಸ್ಕ್ರೀನ್‌"</string>
     <string name="quick_settings_label" msgid="2999117381487601865">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳು"</string>
-    <string name="notifications_label" msgid="6829741046963013567">"ಅಧಿಸೂಚನೆಗಳು"</string>
+    <string name="notifications_label" msgid="6829741046963013567">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
     <string name="screenshot_label" msgid="863978141223970162">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್"</string>
     <string name="screenshot_utterance" msgid="1430760563401895074">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್ ತೆಗೆದುಕೊಳ್ಳಿ"</string>
     <string name="volume_up_label" msgid="8592766918780362870">"ವಾಲ್ಯೂಮ್ ಜಾಸ್ತಿ"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
index c26cd12..bf51e23 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
+++ b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/activity/A11yMenuSettingsActivity.java
@@ -27,6 +27,7 @@
 import android.provider.Settings;
 import android.view.View;
 import android.widget.TextView;
+import android.window.OnBackInvokedCallback;
 
 import androidx.annotation.Nullable;
 import androidx.fragment.app.FragmentActivity;
@@ -34,12 +35,16 @@
 import androidx.preference.PreferenceFragmentCompat;
 import androidx.preference.PreferenceManager;
 
+import com.android.systemui.accessibility.accessibilitymenu.Flags;
 import com.android.systemui.accessibility.accessibilitymenu.R;
 
 /**
  * Settings activity for AccessibilityMenu.
  */
 public class A11yMenuSettingsActivity extends FragmentActivity {
+    private OnBackInvokedCallback mCallback = () -> {
+        finish();
+    };
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -51,6 +56,10 @@
 
         ActionBar actionBar = getActionBar();
         actionBar.setDisplayShowCustomEnabled(true);
+
+        if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+            actionBar.setDisplayHomeAsUpEnabled(true);
+        }
         actionBar.setCustomView(R.layout.preferences_action_bar);
         ((TextView) findViewById(R.id.action_bar_title)).setText(
                 getResources().getString(R.string.accessibility_menu_settings_name)
@@ -61,6 +70,16 @@
                         | ActionBar.DISPLAY_HOME_AS_UP);
     }
 
+    @Override
+    public boolean onNavigateUp() {
+        if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+            mCallback.onBackInvoked();
+            return true;
+        } else {
+            return false;
+        }
+    }
+
     /**
      * Settings/preferences fragment for AccessibilityMenu.
      */
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
index c64ec6f..c4f372c 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
+++ b/packages/SystemUI/accessibility/accessibilitymenu/src/com/android/systemui/accessibility/accessibilitymenu/view/A11yMenuAdapter.java
@@ -28,6 +28,7 @@
 import android.widget.TextView;
 
 import com.android.systemui.accessibility.accessibilitymenu.AccessibilityMenuService;
+import com.android.systemui.accessibility.accessibilitymenu.Flags;
 import com.android.systemui.accessibility.accessibilitymenu.R;
 import com.android.systemui.accessibility.accessibilitymenu.activity.A11yMenuSettingsActivity.A11yMenuPreferenceFragment;
 import com.android.systemui.accessibility.accessibilitymenu.model.A11yMenuShortcut;
@@ -79,6 +80,11 @@
     public View getView(int position, View convertView, ViewGroup parent) {
         if (convertView == null) {
             convertView = mInflater.inflate(R.layout.grid_item, parent, false);
+
+            if (Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+                configureShortcutSize(convertView,
+                        A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService));
+            }
         }
 
         A11yMenuShortcut shortcutItem = (A11yMenuShortcut) getItem(position);
@@ -126,16 +132,29 @@
                 });
     }
 
-    private void configureShortcutView(View convertView, A11yMenuShortcut shortcutItem) {
+    private void configureShortcutSize(View convertView, boolean isLargeButtonsEnabled) {
         ImageButton shortcutIconButton = convertView.findViewById(R.id.shortcutIconBtn);
         TextView shortcutLabel = convertView.findViewById(R.id.shortcutLabel);
-
-        if (A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService)) {
+        if (isLargeButtonsEnabled) {
             ViewGroup.LayoutParams params = shortcutIconButton.getLayoutParams();
             params.width = (int) (params.width * LARGE_BUTTON_SCALE);
             params.height = (int) (params.height * LARGE_BUTTON_SCALE);
             shortcutLabel.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, mLargeTextSize);
         }
+    }
+
+    private void configureShortcutView(View convertView, A11yMenuShortcut shortcutItem) {
+        ImageButton shortcutIconButton = convertView.findViewById(R.id.shortcutIconBtn);
+        TextView shortcutLabel = convertView.findViewById(R.id.shortcutLabel);
+
+        if (!Flags.a11yMenuSettingsBackButtonFixAndLargeButtonSizing()) {
+            if (A11yMenuPreferenceFragment.isLargeButtonsEnabled(mService)) {
+                ViewGroup.LayoutParams params = shortcutIconButton.getLayoutParams();
+                params.width = (int) (params.width * LARGE_BUTTON_SCALE);
+                params.height = (int) (params.height * LARGE_BUTTON_SCALE);
+                shortcutLabel.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, mLargeTextSize);
+            }
+        }
 
         if (shortcutItem.getId() == A11yMenuShortcut.ShortcutId.UNSPECIFIED_ID_VALUE.ordinal()) {
             // Sets empty shortcut icon and label when the shortcut is ADD_ITEM.
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
index a3a1fa5..0c07616 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt
@@ -24,6 +24,7 @@
 import android.graphics.Path
 import android.graphics.Rect
 import android.graphics.RectF
+import android.os.Build
 import android.os.Looper
 import android.os.RemoteException
 import android.util.Log
@@ -88,6 +89,9 @@
                 contentAfterFadeInInterpolator = PathInterpolator(0f, 0f, 0.6f, 1f)
             )
 
+        // TODO(b/288507023): Remove this flag.
+        @JvmField val DEBUG_LAUNCH_ANIMATION = Build.IS_DEBUGGABLE
+
         private val DEFAULT_LAUNCH_ANIMATOR = LaunchAnimator(TIMINGS, INTERPOLATORS)
         private val DEFAULT_DIALOG_TO_APP_ANIMATOR = LaunchAnimator(DIALOG_TIMINGS, INTERPOLATORS)
 
@@ -244,11 +248,13 @@
                 callOnIntentStartedOnMainThread(willAnimate)
             }
         } else {
-            // TODO(b/288507023): Remove this log.
-            Log.d(
-                TAG,
-                "Calling controller.onIntentStarted(willAnimate=$willAnimate) [controller=$this]"
-            )
+            if (DEBUG_LAUNCH_ANIMATION) {
+                Log.d(
+                    TAG,
+                    "Calling controller.onIntentStarted(willAnimate=$willAnimate) " +
+                            "[controller=$this]"
+                )
+            }
             this.onIntentStarted(willAnimate)
         }
     }
@@ -549,8 +555,12 @@
                 removeTimeout()
                 iCallback?.invoke()
 
-                // TODO(b/288507023): Remove this log.
-                Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [no window opening]")
+                if (DEBUG_LAUNCH_ANIMATION) {
+                    Log.d(
+                        TAG,
+                        "Calling controller.onLaunchAnimationCancelled() [no window opening]"
+                    )
+                }
                 controller.onLaunchAnimationCancelled()
                 return
             }
@@ -769,8 +779,9 @@
             Log.i(TAG, "Remote animation timed out")
             timedOut = true
 
-            // TODO(b/288507023): Remove this log.
-            Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [animation timed out]")
+            if (DEBUG_LAUNCH_ANIMATION) {
+                Log.d(TAG, "Calling controller.onLaunchAnimationCancelled() [animation timed out]")
+            }
             controller.onLaunchAnimationCancelled()
         }
 
@@ -786,11 +797,12 @@
 
             animation?.cancel()
 
-            // TODO(b/288507023): Remove this log.
-            Log.d(
-                TAG,
-                "Calling controller.onLaunchAnimationCancelled() [remote animation cancelled]",
-            )
+            if (DEBUG_LAUNCH_ANIMATION) {
+                Log.d(
+                    TAG,
+                    "Calling controller.onLaunchAnimationCancelled() [remote animation cancelled]",
+                )
+            }
             controller.onLaunchAnimationCancelled()
         }
 
diff --git a/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt b/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
index 31e7d7c..73b366e 100644
--- a/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
+++ b/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/transformation/PunchHole.kt
@@ -72,15 +72,16 @@
     }
 
     private fun DrawScope.drawHole(bounds: Element) {
+        val boundsSize = bounds.lastSize.toSize()
         if (shape == RectangleShape) {
-            drawRect(Color.Black, blendMode = BlendMode.DstOut)
+            drawRect(Color.Black, size = boundsSize, blendMode = BlendMode.DstOut)
             return
         }
 
         // TODO(b/290184746): Cache outline if the size of bounds does not change.
         drawOutline(
             shape.createOutline(
-                bounds.lastSize.toSize(),
+                boundsSize,
                 layoutDirection,
                 this,
             ),
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
index 81b9eb0..e06a69b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
@@ -55,6 +55,7 @@
 import com.android.systemui.bouncer.ui.viewmodel.PatternBouncerViewModel
 import com.android.systemui.bouncer.ui.viewmodel.PinBouncerViewModel
 import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.scene.shared.model.Direction
 import com.android.systemui.scene.shared.model.SceneKey
 import com.android.systemui.scene.shared.model.SceneModel
 import com.android.systemui.scene.shared.model.UserAction
@@ -82,9 +83,10 @@
     override val key = SceneKey.Bouncer
 
     override fun destinationScenes(): StateFlow<Map<UserAction, SceneModel>> =
-        MutableStateFlow<Map<UserAction, SceneModel>>(
+        MutableStateFlow(
                 mapOf(
                     UserAction.Back to SceneModel(SceneKey.Lockscreen),
+                    UserAction.Swipe(Direction.DOWN) to SceneModel(SceneKey.Lockscreen),
                 )
             )
             .asStateFlow()
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/ribbon/ui/composable/Ribbon.kt b/packages/SystemUI/compose/features/src/com/android/systemui/ribbon/ui/composable/Ribbon.kt
new file mode 100644
index 0000000..daa1592
--- /dev/null
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/ribbon/ui/composable/Ribbon.kt
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.ribbon.ui.composable
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Box
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.graphicsLayer
+import androidx.compose.ui.layout.layout
+import com.android.compose.modifiers.thenIf
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.roundToInt
+import kotlin.math.sin
+import kotlin.math.tan
+
+/**
+ * Renders a "ribbon" at the bottom right corner of its container.
+ *
+ * The [content] is rendered leaning at an angle of [degrees] degrees (between `1` and `89`,
+ * inclusive), with an alpha of [alpha] (between `0f` and `1f`, inclusive).
+ *
+ * The background color of the strip can be modified by passing a value to the [backgroundColor] or
+ * `null` to remove the strip background.
+ *
+ * Note: this function assumes that it's been placed at the bottom right of its parent by its
+ * caller. It's the caller's responsibility to meet that assumption by actually placing this
+ * composable element at the bottom right.
+ */
+@Composable
+fun BottomRightCornerRibbon(
+    content: @Composable () -> Unit,
+    modifier: Modifier = Modifier,
+    degrees: Int = 45,
+    alpha: Float = 0.6f,
+    backgroundColor: Color? = Color.Red,
+) {
+    check(degrees in 1..89)
+    check(alpha in 0f..1f)
+
+    val radians = degrees * (PI / 180)
+
+    Box(
+        content = { content() },
+        modifier =
+            modifier
+                .graphicsLayer {
+                    this.alpha = alpha
+
+                    val w = size.width
+                    val h = size.height
+
+                    val sine = sin(radians).toFloat()
+                    val cosine = cos(radians).toFloat()
+
+                    translationX = (w - w * cosine + h * sine) / 2f
+                    translationY = (h - w * sine + h * cosine) / 2f
+                    rotationZ = 360f - degrees
+                }
+                .thenIf(backgroundColor != null) { Modifier.background(backgroundColor!!) }
+                .layout { measurable, constraints ->
+                    val placeable = measurable.measure(constraints)
+
+                    val tangent = tan(radians)
+                    val leftPadding = (placeable.measuredHeight / tangent).roundToInt()
+                    val rightPadding = (placeable.measuredHeight * tangent).roundToInt()
+
+                    layout(
+                        width = placeable.measuredWidth + leftPadding + rightPadding,
+                        height = placeable.measuredHeight,
+                    ) {
+                        placeable.place(leftPadding, 0)
+                    }
+                }
+    )
+}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
index 019287d..6a5a368 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
@@ -18,14 +18,19 @@
 
 package com.android.systemui.scene.ui.composable
 
+import android.os.SystemProperties
+import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
 import androidx.compose.runtime.DisposableEffect
 import androidx.compose.runtime.collectAsState
 import androidx.compose.runtime.getValue
 import androidx.compose.runtime.remember
+import androidx.compose.ui.Alignment
 import androidx.compose.ui.ExperimentalComposeUiApi
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.input.pointer.PointerEventPass
 import androidx.compose.ui.input.pointer.motionEventSpy
 import androidx.compose.ui.input.pointer.pointerInput
@@ -37,6 +42,7 @@
 import com.android.compose.animation.scene.Swipe
 import com.android.compose.animation.scene.UserAction as SceneTransitionUserAction
 import com.android.compose.animation.scene.observableTransitionState
+import com.android.systemui.ribbon.ui.composable.BottomRightCornerRibbon
 import com.android.systemui.scene.shared.model.Direction
 import com.android.systemui.scene.shared.model.ObservableTransitionState
 import com.android.systemui.scene.shared.model.SceneKey
@@ -75,53 +81,70 @@
     val currentDestinations: Map<UserAction, SceneModel> by
         currentScene.destinationScenes().collectAsState()
     val state = remember { SceneTransitionLayoutState(currentSceneKey.toTransitionSceneKey()) }
+    val isRibbonEnabled = remember { SystemProperties.getBoolean("flexi.ribbon", false) }
 
     DisposableEffect(viewModel, state) {
         viewModel.setTransitionState(state.observableTransitionState().map { it.toModel() })
         onDispose { viewModel.setTransitionState(null) }
     }
 
-    SceneTransitionLayout(
-        currentScene = currentSceneKey.toTransitionSceneKey(),
-        onChangeScene = viewModel::onSceneChanged,
-        transitions = SceneContainerTransitions,
-        state = state,
-        modifier =
-            modifier
-                .fillMaxSize()
-                .motionEventSpy { event -> viewModel.onMotionEvent(event) }
-                .pointerInput(Unit) {
-                    awaitPointerEventScope {
-                        while (true) {
-                            awaitPointerEvent(PointerEventPass.Final)
-                            viewModel.onMotionEventComplete()
+    Box(
+        modifier = Modifier.fillMaxSize(),
+    ) {
+        SceneTransitionLayout(
+            currentScene = currentSceneKey.toTransitionSceneKey(),
+            onChangeScene = viewModel::onSceneChanged,
+            transitions = SceneContainerTransitions,
+            state = state,
+            modifier =
+                modifier
+                    .fillMaxSize()
+                    .motionEventSpy { event -> viewModel.onMotionEvent(event) }
+                    .pointerInput(Unit) {
+                        awaitPointerEventScope {
+                            while (true) {
+                                awaitPointerEvent(PointerEventPass.Final)
+                                viewModel.onMotionEventComplete()
+                            }
                         }
                     }
-                }
-    ) {
-        sceneByKey.forEach { (sceneKey, composableScene) ->
-            scene(
-                key = sceneKey.toTransitionSceneKey(),
-                userActions =
-                    if (sceneKey == currentSceneKey) {
-                            currentDestinations
-                        } else {
-                            composableScene.destinationScenes().value
-                        }
-                        .map { (userAction, destinationSceneModel) ->
-                            toTransitionModels(userAction, destinationSceneModel)
-                        }
-                        .toMap(),
-            ) {
-                with(composableScene) {
-                    this@scene.Content(
-                        modifier =
-                            Modifier.element(sceneKey.toTransitionSceneKey().rootElementKey)
-                                .fillMaxSize(),
-                    )
+        ) {
+            sceneByKey.forEach { (sceneKey, composableScene) ->
+                scene(
+                    key = sceneKey.toTransitionSceneKey(),
+                    userActions =
+                        if (sceneKey == currentSceneKey) {
+                                currentDestinations
+                            } else {
+                                composableScene.destinationScenes().value
+                            }
+                            .map { (userAction, destinationSceneModel) ->
+                                toTransitionModels(userAction, destinationSceneModel)
+                            }
+                            .toMap(),
+                ) {
+                    with(composableScene) {
+                        this@scene.Content(
+                            modifier =
+                                Modifier.element(sceneKey.toTransitionSceneKey().rootElementKey)
+                                    .fillMaxSize(),
+                        )
+                    }
                 }
             }
         }
+
+        if (isRibbonEnabled) {
+            BottomRightCornerRibbon(
+                content = {
+                    Text(
+                        text = "flexi\uD83E\uDD43",
+                        color = Color.White,
+                    )
+                },
+                modifier = Modifier.align(Alignment.BottomEnd),
+            )
+        }
     }
 }
 
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt b/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
index 5d6dd3b..23d3089 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
@@ -48,10 +48,11 @@
  */
 fun SystemUIDialogFactory.create(
     context: Context = this.applicationContext,
+    theme: Int = SystemUIDialog.DEFAULT_THEME,
     dismissOnDeviceLock: Boolean = SystemUIDialog.DEFAULT_DISMISS_ON_DEVICE_LOCK,
     content: @Composable (SystemUIDialog) -> Unit,
 ): ComponentSystemUIDialog {
-    val dialog = create(context, dismissOnDeviceLock)
+    val dialog = create(context, theme, dismissOnDeviceLock)
 
     // Create the dialog so that it is properly constructed before we set the Compose content.
     // Otherwise, the ComposeView won't render properly.
diff --git a/packages/SystemUI/proguard_common.flags b/packages/SystemUI/proguard_common.flags
index 75de943..e2d8891 100644
--- a/packages/SystemUI/proguard_common.flags
+++ b/packages/SystemUI/proguard_common.flags
@@ -1,16 +1,8 @@
-# Preserve line number information for debugging stack traces.
--keepattributes SourceFile,LineNumberTable
-
 -keep class com.android.systemui.VendorServices
 
 # the `#inject` methods are accessed via reflection to work on ContentProviders
 -keepclassmembers class * extends com.android.systemui.dagger.SysUIComponent { void inject(***); }
 
-# Needed for builds to properly initialize KeyFrames from xml scene
--keepclassmembers class * extends androidx.constraintlayout.motion.widget.Key {
-  public <init>();
-}
-
 # Needed to ensure callback field references are kept in their respective
 # owning classes when the downstream callback registrars only store weak refs.
 # TODO(b/264686688): Handle these cases with more targeted annotations.
@@ -59,7 +51,6 @@
     public <init>(android.content.Context, android.util.AttributeSet);
 }
 
--keep class ** extends androidx.preference.PreferenceFragment
 -keep class com.android.systemui.tuner.*
 
 # The plugins and core log subpackages act as shared libraries that might be referenced in
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml
new file mode 100644
index 0000000..6835d59
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+**
+** Copyright 2023, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- This file is needed when flag lockscreen.enable_landscape is on
+     Required for landscape lockscreen on small screens. -->
+<com.android.keyguard.KeyguardPINView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:androidprv="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/keyguard_pin_view"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_gravity="center_horizontal|bottom"
+    android:clipChildren="false"
+    android:clipToPadding="false"
+    android:orientation="vertical">
+
+    <!-- Layout here is visually identical to the previous keyguard_pin_view.
+         I.E., 'constraints here effectively the same as the previous linear layout '-->
+    <androidx.constraintlayout.motion.widget.MotionLayout
+        android:id="@+id/pin_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:clipChildren="false"
+        android:clipToPadding="false"
+        android:layoutDirection="ltr"
+        android:orientation="vertical"
+        androidprv:layoutDescription="@xml/keyguard_pin_scene"
+        android:layout_gravity="center_horizontal">
+
+        <!-- Guideline need to align PIN pad left of centre,
+        when on small screen landscape layout -->
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/pin_pad_center_guideline"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            androidprv:layout_constraintGuide_percent="0.5" />
+
+        <!-- Guideline used to place the top row of keys relative to the screen height. This will be
+        updated in KeyguardPINView to reduce the height of the PIN pad. -->
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/pin_pad_top_guideline"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            androidprv:layout_constraintGuide_percent="0" />
+
+        <LinearLayout
+            android:id="@+id/keyguard_bouncer_message_container"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:clipChildren="false"
+            android:clipToPadding="false"
+            android:layoutDirection="ltr"
+            android:orientation="vertical"
+            androidprv:layout_constraintTop_toTopOf="parent">
+
+            <include layout="@layout/keyguard_bouncer_message_area" />
+
+            <com.android.systemui.bouncer.ui.BouncerMessageView
+                android:id="@+id/bouncer_message_view"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical" />
+
+        </LinearLayout>
+
+        <!-- Set this to be just above key1. It would be better to introduce a barrier above
+          key1/key2/key3, then place this View above that. Sadly, that doesn't work (the Barrier
+          drops to the bottom of the page, and key1/2/3 all shoot up to the top-left). In any
+          case, the Flow should ensure that key1/2/3 all have the same top, so this should be
+          fine. -->
+        <com.android.keyguard.AlphaOptimizedRelativeLayout
+            android:id="@+id/row0"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom"
+            androidprv:layout_constraintBottom_toTopOf="@id/key1"
+            androidprv:layout_constraintEnd_toEndOf="parent"
+            androidprv:layout_constraintStart_toStartOf="parent"
+            androidprv:layout_constraintTop_toBottomOf="@id/keyguard_bouncer_message_container"
+            androidprv:layout_constraintVertical_bias="0.5">
+
+            <com.android.keyguard.PasswordTextView
+                android:id="@+id/pinEntry"
+                style="@style/Widget.TextView.Password"
+                android:layout_width="@dimen/keyguard_security_width"
+                android:layout_height="@dimen/keyguard_password_height"
+                android:layout_centerHorizontal="true"
+                android:layout_marginRight="72dp"
+                android:contentDescription="@string/keyguard_accessibility_pin_area"
+                androidprv:scaledTextSize="@integer/scaled_password_text_size" />
+
+        </com.android.keyguard.AlphaOptimizedRelativeLayout>
+
+        <com.android.keyguard.KeyguardPinFlowView
+            android:id="@+id/flow1"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:layout_marginBottom="8dp"
+            android:clipChildren="false"
+            android:clipToPadding="false"
+            android:orientation="horizontal"
+
+            androidprv:constraint_referenced_ids="key1,key2,key3,key4,key5,key6,key7,key8,key9,delete_button,key0,key_enter"
+
+            androidprv:flow_horizontalGap="@dimen/num_pad_key_margin_end"
+            androidprv:flow_horizontalStyle="packed"
+            androidprv:flow_maxElementsWrap="3"
+
+            androidprv:flow_verticalBias="1.0"
+            androidprv:flow_verticalGap="@dimen/num_pad_entry_row_margin_bottom"
+            androidprv:flow_verticalStyle="packed"
+            androidprv:flow_wrapMode="aligned"
+
+            androidprv:layout_constraintBottom_toTopOf="@+id/keyguard_selector_fade_container"
+            androidprv:layout_constraintEnd_toEndOf="parent"
+            androidprv:layout_constraintStart_toStartOf="parent"
+            androidprv:layout_constraintTop_toBottomOf="@id/pin_pad_top_guideline" />
+
+        <com.android.keyguard.NumPadButton
+            android:id="@+id/delete_button"
+            style="@style/NumPadKey.Delete"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key0"
+            android:contentDescription="@string/keyboardview_keycode_delete" />
+
+        <com.android.keyguard.NumPadButton
+            android:id="@+id/key_enter"
+            style="@style/NumPadKey.Enter"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:contentDescription="@string/keyboardview_keycode_enter" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key1"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key2"
+            androidprv:digit="1"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key2"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key3"
+            androidprv:digit="2"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key3"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key4"
+            androidprv:digit="3"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key4"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key5"
+            androidprv:digit="4"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key5"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key6"
+            androidprv:digit="5"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key6"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key7"
+            androidprv:digit="6"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key7"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key8"
+            androidprv:digit="7"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key8"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key9"
+            androidprv:digit="8"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key9"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/delete_button"
+            androidprv:digit="9"
+            androidprv:textView="@+id/pinEntry" />
+
+        <com.android.keyguard.NumPadKey
+            android:id="@+id/key0"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:accessibilityTraversalBefore="@id/key_enter"
+            androidprv:digit="0"
+            androidprv:textView="@+id/pinEntry" />
+
+        <include
+            android:id="@+id/keyguard_selector_fade_container"
+            layout="@layout/keyguard_eca"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
+            android:layout_marginTop="@dimen/keyguard_eca_top_margin"
+            android:orientation="vertical"
+            androidprv:layout_constraintBottom_toBottomOf="parent"
+            androidprv:layout_constraintTop_toBottomOf="@+id/flow1" />
+
+    </androidx.constraintlayout.motion.widget.MotionLayout>
+
+</com.android.keyguard.KeyguardPINView>
\ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/values-land/donottranslate.xml b/packages/SystemUI/res-keyguard/values-land/donottranslate.xml
deleted file mode 100644
index 9912b69..0000000
--- a/packages/SystemUI/res-keyguard/values-land/donottranslate.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2021 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT 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="num_pad_key_ratio">1.51</string>
-</resources>
diff --git a/packages/SystemUI/res-keyguard/values-sq/strings.xml b/packages/SystemUI/res-keyguard/values-sq/strings.xml
index 84f7bb5..ce53b7e 100644
--- a/packages/SystemUI/res-keyguard/values-sq/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-sq/strings.xml
@@ -28,7 +28,7 @@
     <string name="keyguard_enter_password" msgid="6483623792371009758">"Fut fjalëkalimin"</string>
     <string name="keyguard_sim_error_message_short" msgid="633630844240494070">"Karta e pavlefshme."</string>
     <string name="keyguard_charged" msgid="5478247181205188995">"I karikuar"</string>
-    <string name="keyguard_plugged_in_wireless" msgid="2537874724955057383">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet me valë"</string>
+    <string name="keyguard_plugged_in_wireless" msgid="2537874724955057383">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet në mënyrë wireless"</string>
     <string name="keyguard_plugged_in_dock" msgid="2122073051904360987">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet"</string>
     <string name="keyguard_plugged_in" msgid="8169926454348380863">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet"</string>
     <string name="keyguard_plugged_in_charging_fast" msgid="4386594091107340426">"<xliff:g id="PERCENTAGE">%s</xliff:g> • Po karikohet me shpejtësi"</string>
@@ -41,7 +41,7 @@
     <string name="keyguard_missing_sim_instructions" msgid="7735360104844653246">"Shto një kartë SIM."</string>
     <string name="keyguard_missing_sim_instructions_long" msgid="3451467338947610268">"Karta SIM mungon ose është e palexueshme. Shto një kartë SIM."</string>
     <string name="keyguard_permanent_disabled_sim_message_short" msgid="3955052454216046100">"Kartë SIM e papërdorshme."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5034635040020685428">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit me valë për një kartë tjetër SIM."</string>
+    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5034635040020685428">"Karta jote SIM është çaktivizuar përgjithmonë.\n Kontakto me ofruesin e shërbimit wireless për një tjetër kartë SIM."</string>
     <string name="keyguard_sim_locked_message" msgid="7095293254587575270">"Karta SIM është e kyçur."</string>
     <string name="keyguard_sim_puk_locked_message" msgid="2503428315518592542">"Karta SIM është e kyçur me PUK."</string>
     <string name="keyguard_sim_unlock_progress_dialog_message" msgid="8489092646014631659">"Karta SIM po shkyçet…"</string>
diff --git a/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml b/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml
new file mode 100644
index 0000000..44af9ef
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/xml/keyguard_pin_scene.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2023, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<MotionScene
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:motion="http://schemas.android.com/apk/res-auto"
+    xmlns:androidprv="http://schemas.android.com/apk/res-auto">
+
+    <Transition
+        motion:constraintSetStart="@id/single_constraints"
+        motion:constraintSetEnd="@+id/split_constraints"
+        motion:duration="0"
+        motion:autoTransition="none">
+    </Transition>
+
+    <ConstraintSet android:id="@+id/single_constraints">
+        <!-- No changes to default layout -->
+    </ConstraintSet>
+
+    <ConstraintSet android:id="@+id/split_constraints">
+
+        <Constraint
+            android:id="@+id/keyguard_bouncer_message_container"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+            androidprv:layout_constraintStart_toStartOf="parent"
+            androidprv:layout_constraintTop_toTopOf="parent" />
+        <Constraint
+            android:id="@+id/row0"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+            androidprv:layout_constraintStart_toStartOf="parent"
+            androidprv:layout_constraintTop_toBottomOf="@+id/keyguard_bouncer_message_container" />
+        <Constraint
+            android:id="@+id/flow1"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            androidprv:layout_constraintBottom_toBottomOf="parent"
+            androidprv:layout_constraintEnd_toEndOf="parent"
+            androidprv:layout_constraintStart_toStartOf="@+id/pin_pad_center_guideline"
+            androidprv:layout_constraintTop_toTopOf="parent"
+            android:layout_marginBottom="0dp"
+            androidprv:flow_verticalBias="0.5" />
+        <Constraint
+            android:id="@+id/keyguard_selector_fade_container"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            androidprv:layout_constraintBottom_toBottomOf="parent"
+            androidprv:layout_constraintEnd_toStartOf="@+id/pin_pad_center_guideline"
+            androidprv:layout_constraintStart_toStartOf="parent"
+            android:layout_marginBottom="@dimen/keyguard_eca_bottom_margin"
+            android:layout_marginTop="@dimen/keyguard_eca_top_margin" />
+
+    </ConstraintSet>
+</MotionScene>
\ No newline at end of file
diff --git a/packages/SystemUI/res-product/values-sq/strings.xml b/packages/SystemUI/res-product/values-sq/strings.xml
index 619f22f..f7421c1 100644
--- a/packages/SystemUI/res-product/values-sq/strings.xml
+++ b/packages/SystemUI/res-product/values-sq/strings.xml
@@ -20,7 +20,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="dock_alignment_slow_charging" product="default" msgid="6997633396534416792">"Drejtvendose përsëri telefonin për karikim më të shpejtë"</string>
-    <string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"Drejtvendose përsëri telefonin për ta karikuar me valë"</string>
+    <string name="dock_alignment_not_charging" product="default" msgid="3980752926226749808">"Drejtvendose përsëri telefonin për karikim wireless"</string>
     <string name="inattentive_sleep_warning_message" product="tv" msgid="6844464574089665063">"Pajisja Android TV së shpejti do të fiket. Shtyp një buton për ta mbajtur të ndezur."</string>
     <string name="inattentive_sleep_warning_message" product="default" msgid="5693904520452332224">"Pajisja së shpejti do të fiket. Shtype për ta mbajtur të ndezur."</string>
     <string name="keyguard_missing_sim_message" product="tablet" msgid="408124574073032188">"Nuk ka kartë SIM në tablet."</string>
diff --git a/packages/SystemUI/res/layout/auth_biometric_contents.xml b/packages/SystemUI/res/layout/auth_biometric_contents.xml
deleted file mode 100644
index 50b3bec..0000000
--- a/packages/SystemUI/res/layout/auth_biometric_contents.xml
+++ /dev/null
@@ -1,165 +0,0 @@
-<!--
-  ~ Copyright (C) 2019 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!-- TODO(b/251476085): inline in biometric_prompt_layout after Biometric*Views are un-flagged -->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="@integer/biometric_dialog_text_gravity"
-        android:singleLine="true"
-        android:marqueeRepeatLimit="1"
-        android:ellipsize="marquee"
-        android:importantForAccessibility="no"
-        style="@style/TextAppearance.AuthCredential.Title"/>
-
-    <TextView
-        android:id="@+id/subtitle"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="@integer/biometric_dialog_text_gravity"
-        android:singleLine="true"
-        android:marqueeRepeatLimit="1"
-        android:ellipsize="marquee"
-        android:importantForAccessibility="no"
-        style="@style/TextAppearance.AuthCredential.Subtitle"/>
-
-    <TextView
-        android:id="@+id/description"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:scrollbars ="vertical"
-        style="@style/TextAppearance.AuthCredential.Description"/>
-
-    <Space android:id="@+id/space_above_icon"
-        android:layout_width="match_parent"
-        android:layout_height="48dp" />
-
-    <FrameLayout
-        android:id="@+id/biometric_icon_frame"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center">
-
-        <include layout="@layout/auth_biometric_icon"/>
-
-        <com.android.systemui.biometrics.BiometricPromptLottieViewWrapper
-            android:id="@+id/biometric_icon_overlay"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:contentDescription="@null"
-            android:scaleType="fitXY" />
-    </FrameLayout>
-
-    <!-- For sensors such as UDFPS, this view is used during custom measurement/layout to add extra
-         padding so that the biometric icon is always in the right physical position. -->
-    <Space android:id="@+id/space_below_icon"
-        android:layout_width="match_parent"
-        android:layout_height="12dp" />
-
-    <TextView
-        android:id="@+id/indicator"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:paddingHorizontal="24dp"
-        android:textSize="12sp"
-        android:gravity="center_horizontal"
-        android:accessibilityLiveRegion="polite"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:marqueeRepeatLimit="marquee_forever"
-        android:scrollHorizontally="true"
-        android:fadingEdge="horizontal"
-        android:textColor="@color/biometric_dialog_gray"/>
-
-    <LinearLayout
-        android:id="@+id/button_bar"
-        android:layout_width="match_parent"
-        android:layout_height="88dp"
-        style="?android:attr/buttonBarStyle"
-        android:orientation="horizontal"
-        android:paddingTop="24dp">
-
-        <Space android:id="@+id/leftSpacer"
-            android:layout_width="8dp"
-            android:layout_height="match_parent"
-            android:visibility="visible" />
-
-        <!-- Negative Button, reserved for app -->
-        <Button android:id="@+id/button_negative"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
-            android:layout_gravity="center_vertical"
-            android:ellipsize="end"
-            android:maxLines="2"
-            android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"/>
-        <!-- Cancel Button, replaces negative button when biometric is accepted -->
-        <Button android:id="@+id/button_cancel"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
-            android:layout_gravity="center_vertical"
-            android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"
-            android:text="@string/cancel"
-            android:visibility="gone"/>
-        <!-- "Use Credential" Button, replaces if device credential is allowed -->
-        <Button android:id="@+id/button_use_credential"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            style="@*android:style/Widget.DeviceDefault.Button.Borderless.Colored"
-            android:layout_gravity="center_vertical"
-            android:maxWidth="@dimen/biometric_dialog_button_negative_max_width"
-            android:visibility="gone"/>
-
-        <Space android:id="@+id/middleSpacer"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:visibility="visible"/>
-
-        <!-- Positive Button -->
-        <Button android:id="@+id/button_confirm"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            style="@*android:style/Widget.DeviceDefault.Button.Colored"
-            android:layout_gravity="center_vertical"
-            android:ellipsize="end"
-            android:maxLines="2"
-            android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
-            android:text="@string/biometric_dialog_confirm"
-            android:visibility="gone"/>
-        <!-- Try Again Button -->
-        <Button android:id="@+id/button_try_again"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            style="@*android:style/Widget.DeviceDefault.Button.Colored"
-            android:layout_gravity="center_vertical"
-            android:ellipsize="end"
-            android:maxLines="2"
-            android:maxWidth="@dimen/biometric_dialog_button_positive_max_width"
-            android:text="@string/biometric_dialog_try_again"
-            android:visibility="gone"/>
-
-        <Space android:id="@+id/rightSpacer"
-            android:layout_width="8dp"
-            android:layout_height="match_parent"
-            android:visibility="visible" />
-    </LinearLayout>
-
-</merge>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/auth_biometric_face_view.xml b/packages/SystemUI/res/layout/auth_biometric_face_view.xml
deleted file mode 100644
index e3d0732..0000000
--- a/packages/SystemUI/res/layout/auth_biometric_face_view.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ Copyright (C) 2019 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!-- TODO(b/251476085): remove after BiometricFaceView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFaceView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/contents"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFaceView>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml b/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml
deleted file mode 100644
index 896d836..0000000
--- a/packages/SystemUI/res/layout/auth_biometric_fingerprint_and_face_view.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ Copyright (C) 2021 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!-- TODO(b/251476085): remove after BiometricFingerprintAndFaceView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/contents"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceView>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml b/packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml
deleted file mode 100644
index e36f9796..0000000
--- a/packages/SystemUI/res/layout/auth_biometric_fingerprint_view.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  ~ Copyright (C) 2019 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<!-- TODO(b/251476085): remove after BiometricFingerprintView is un-flagged -->
-<com.android.systemui.biometrics.AuthBiometricFingerprintView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/contents"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <include layout="@layout/auth_biometric_contents"/>
-
-</com.android.systemui.biometrics.AuthBiometricFingerprintView>
\ 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
index 82facd0..8b5aeaa 100644
--- a/packages/SystemUI/res/layout/battery_percentage_view.xml
+++ b/packages/SystemUI/res/layout/battery_percentage_view.xml
@@ -27,4 +27,5 @@
         android:gravity="center_vertical|start"
         android:paddingStart="@dimen/battery_level_padding_start"
         android:importantForAccessibility="no"
+        android:includeFontPadding="false"
         />
diff --git a/packages/SystemUI/res/layout/battery_status_chip.xml b/packages/SystemUI/res/layout/battery_status_chip.xml
index ff68ac0..7437183 100644
--- a/packages/SystemUI/res/layout/battery_status_chip.xml
+++ b/packages/SystemUI/res/layout/battery_status_chip.xml
@@ -25,7 +25,8 @@
     <LinearLayout
         android:id="@+id/rounded_container"
         android:layout_width="wrap_content"
-        android:layout_height="@dimen/ongoing_appops_chip_height"
+        android:layout_height="wrap_content"
+        android:minHeight="@dimen/ongoing_appops_chip_height"
         android:layout_gravity="center"
         android:background="@drawable/statusbar_chip_bg"
         android:clipToOutline="true"
@@ -36,7 +37,7 @@
         <com.android.systemui.battery.BatteryMeterView
             android:id="@+id/battery_meter_view"
             android:layout_width="wrap_content"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:layout_marginHorizontal="10dp" />
 
     </LinearLayout>
diff --git a/packages/SystemUI/res/layout/combined_qs_header.xml b/packages/SystemUI/res/layout/combined_qs_header.xml
index 3a15ae4..60a78d6 100644
--- a/packages/SystemUI/res/layout/combined_qs_header.xml
+++ b/packages/SystemUI/res/layout/combined_qs_header.xml
@@ -118,34 +118,37 @@
         app:layout_constraintStart_toEndOf="@id/date"
         app:layout_constraintTop_toTopOf="@id/clock" />
 
-    <LinearLayout
+    <FrameLayout
         android:id="@+id/shade_header_system_icons"
         android:layout_width="wrap_content"
         android:layout_height="@dimen/shade_header_system_icons_height"
-        android:clickable="true"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
-        android:paddingStart="@dimen/shade_header_system_icons_padding_start"
-        android:paddingEnd="@dimen/shade_header_system_icons_padding_end"
-        android:paddingTop="@dimen/shade_header_system_icons_padding_top"
-        android:paddingBottom="@dimen/shade_header_system_icons_padding_bottom"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="@id/privacy_container"
         app:layout_constraintTop_toTopOf="@id/clock">
-
-        <com.android.systemui.statusbar.phone.StatusIconContainer
-            android:id="@+id/statusIcons"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_height="wrap_content"
-            android:paddingEnd="@dimen/signal_cluster_battery_padding" />
-
-        <com.android.systemui.battery.BatteryMeterView
-            android:id="@+id/batteryRemainingIcon"
+        <LinearLayout
+            android:id="@+id/hover_system_icons_container"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            app:textAppearance="@style/TextAppearance.QS.Status" />
-    </LinearLayout>
+            android:layout_height="match_parent"
+            android:layout_gravity="right|center_vertical"
+            android:paddingStart="@dimen/hover_system_icons_container_padding_start"
+            android:paddingEnd="@dimen/hover_system_icons_container_padding_end"
+            android:paddingTop="@dimen/hover_system_icons_container_padding_top"
+            android:paddingBottom="@dimen/hover_system_icons_container_padding_bottom">
+
+            <com.android.systemui.statusbar.phone.StatusIconContainer
+                android:id="@+id/statusIcons"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:layout_height="wrap_content"
+                android:paddingEnd="@dimen/signal_cluster_battery_padding" />
+
+            <com.android.systemui.battery.BatteryMeterView
+                android:id="@+id/batteryRemainingIcon"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                app:textAppearance="@style/TextAppearance.QS.Status" />
+        </LinearLayout>
+    </FrameLayout>
 
     <FrameLayout
         android:id="@+id/privacy_container"
diff --git a/packages/SystemUI/res/layout/media_projection_app_selector.xml b/packages/SystemUI/res/layout/media_projection_app_selector.xml
index e474938..b77f78d 100644
--- a/packages/SystemUI/res/layout/media_projection_app_selector.xml
+++ b/packages/SystemUI/res/layout/media_projection_app_selector.xml
@@ -20,10 +20,11 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_gravity="center"
-    androidprv:maxCollapsedHeight="0dp"
+    androidprv:maxCollapsedHeight="10000dp"
     androidprv:maxCollapsedHeightSmall="56dp"
     androidprv:maxWidth="@*android:dimen/chooser_width"
     android:id="@*android:id/contentPanel">
+    <!-- maxCollapsedHeight above is huge, to make sure the layout is always expanded. -->
 
     <LinearLayout
         android:id="@*android:id/chooser_header"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 59fcf0e..5a70b79 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -79,6 +79,7 @@
                     android:id="@+id/status_bar_start_side_except_heads_up"
                     android:layout_height="wrap_content"
                     android:layout_width="match_parent"
+                    android:layout_gravity="center_vertical|start"
                     android:clipChildren="false">
                     <ViewStub
                         android:id="@+id/operator_name_stub"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 206a7ee..27db1c9 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Skuif af"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Beweeg links"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Beweeg regs"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrotingwisselaar"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Vergroot die hele skerm"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Vergroot \'n deel van die skerm"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent-aandag is aan"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Stel versteknotasapp in Instellings"</string>
     <string name="install_app" msgid="5066668100199613936">"Installeer app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Sinkroniseer wedersyds na eksterne skerm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktiveer skerm"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoon en kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Onlangse appgebruik"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Sien onlangse toegang"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 09157f8..a68ec15 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ወደ ታች ውሰድ"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ወደ ግራ ውሰድ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ወደ ቀኝ ውሰድ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"የማጉላት ማብሪያ/ማጥፊያ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ሙሉ ገፅ እይታን ያጉሉ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"የማያ ገጹን ክፍል አጉላ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"የረዳት ትኩረት በርቷል"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"በቅንብሮች ውስጥ ነባሪ የማስታወሻዎች መተግበሪያን ያቀናብሩ"</string>
     <string name="install_app" msgid="5066668100199613936">"መተግበሪያን ጫን"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ወደ ውጫዊ ማሳያ ይንጸባረቅ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ማሳያን አንቃ"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ማይክሮፎን እና ካሜራ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"የቅርብ ጊዜ የመተግበሪያ አጠቃቀም"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"የቅርብ ጊዜ መዳረሻን አሳይ"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 31b7cbe..42e60c5 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"نقل للأسفل"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"نقل لليسار"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"نقل لليمين"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"مفتاح تبديل وضع التكبير"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"تكبير الشاشة كلها"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"تكبير جزء من الشاشة"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"‏ميزة لفت انتباه \"مساعد Google\" مفعّلة."</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"يمكنك ضبط تطبيق تدوين الملاحظات التلقائي في \"الإعدادات\"."</string>
     <string name="install_app" msgid="5066668100199613936">"تثبيت التطبيق"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"هل تريد بث محتوى جهازك على الشاشة الخارجية؟"</string>
+    <string name="enable_display" msgid="8308309634883321977">"تفعيل العرض"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"الميكروفون والكاميرا"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"آخر استخدام في التطبيقات"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"عرض آخر استخدام في التطبيقات"</string>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index 732d19d..7026e0c 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"তললৈ নিয়ক"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"বাওঁফাললৈ নিয়ক"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"সোঁফাললৈ নিয়ক"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"বিবৰ্ধনৰ ছুইচ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"পূৰ্ণ স্ক্ৰীন বিবৰ্ধন কৰক"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"স্ক্ৰীনৰ কিছু অংশ বিবৰ্ধন কৰক"</string>
@@ -1132,7 +1140,7 @@
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g>ক আটাইবোৰ ডিভাইচৰ লগ এক্সেছ কৰাৰ অনুমতি প্ৰদান কৰিবনে?"</string>
     <string name="log_access_confirmation_allow" msgid="752147861593202968">"কেৱল এবাৰ এক্সেছ কৰাৰ অনুমতি দিয়ক"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"অনুমতি নিদিব"</string>
-    <string name="log_access_confirmation_body" msgid="6883031912003112634">"আপোনাৰ ডিভাইচত কি কি ঘটে সেয়া ডিভাইচ লগে ৰেকৰ্ড কৰে। এপ্‌সমূহে সমস্যা বিচাৰিবলৈ আৰু সমাধান কৰিবলৈ এই লগসমূহ ব্যৱহাৰ কৰিব পাৰে।\n\nকিছুমান লগত সংবেদনশীল তথ্য থাকিব পাৰে, গতিকে কেৱল আপুনি বিশ্বাস কৰা এপকহে আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি দিয়ক। \n\nআপুনি যদি এই এপ্‌টোক আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি নিদিয়ে, তথাপিও ই নিজৰ লগসমূহ এক্সেছ কৰিব পাৰিব। আপোনাৰ ডিভাইচৰ নিৰ্মাতাই তথাপিও হয়তো আপোনাৰ ডিভাইচটোত থকা কিছু লগ অথবা তথ্য এক্সেছ কৰিব পাৰিব।"</string>
+    <string name="log_access_confirmation_body" msgid="6883031912003112634">"আপোনাৰ ডিভাইচত কি কি ঘটে সেয়া ডিভাইচ লগে ৰেকৰ্ড কৰে। এপ্‌সমূহে সমস্যা বিচাৰিবলৈ আৰু সমাধান কৰিবলৈ এই লগসমূহ ব্যৱহাৰ কৰিব পাৰে।\n\nকিছুমানৰ লগত সংবেদনশীল তথ্য থাকিব পাৰে, গতিকে কেৱল আপুনি বিশ্বাস কৰা এপকহে আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি দিয়ক। \n\nআপুনি যদি এই এপ্‌টোক আটাইবোৰ ডিভাইচ লগ এক্সেছ কৰাৰ অনুমতি নিদিয়ে, তথাপিও ই নিজৰ লগসমূহ এক্সেছ কৰিব পাৰিব। আপোনাৰ ডিভাইচৰ নিৰ্মাতাই তথাপিও হয়তো আপোনাৰ ডিভাইচটোত থকা কিছু লগ অথবা তথ্য এক্সেছ কৰিব পাৰিব।"</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"অধিক জানক"</string>
     <string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"<xliff:g id="URL">%s</xliff:g>ত অধিক জানক"</string>
     <string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"<xliff:g id="APPNAME">%1$s</xliff:g> খোলক"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistantএ আপোনাৰ কথা শুনি আছে"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ছেটিঙত টোকাৰ ডিফ’ল্ট এপ্ ছেট কৰক"</string>
     <string name="install_app" msgid="5066668100199613936">"এপ্‌টো ইনষ্টল কৰক"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"বাহ্যিক ডিছপ্লে’লৈ মিৰ’ৰ কৰিবনে?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ডিছপ্লে’ সক্ষম কৰক"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"মাইক্ৰ’ফ’ন আৰু কেমেৰা"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"শেহতীয়া এপৰ ব্যৱহাৰ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"শেহতীয়া এক্সেছ চাওক"</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 080f450..68a8b87 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Aşağı köçürün"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Sola köçürün"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Sağa köçürün"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Böyütmə dəyişdiricisi"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Tam ekranı böyüdün"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekran hissəsinin böyüdülməsi"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent aktivdir"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ayarlarda defolt qeydlər tətbiqi ayarlayın"</string>
     <string name="install_app" msgid="5066668100199613936">"Tətbiqi quraşdırın"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Xarici displeyə əks etdirilsin?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Displeyi aktivləşdirin"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon və kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Son tətbiq istifadəsi"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Son girişə baxın"</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index b524c34..37aa823 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Pomerite nadole"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Pomerite nalevo"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Pomerite nadesno"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prelazak na drugi režim uvećanja"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Uvećajte ceo ekran"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Uvećajte deo ekrana"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Pomoćnik je u aktivnom stanju"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Podesite podrazumevanu aplikaciju za beleške u Podešavanjima"</string>
     <string name="install_app" msgid="5066668100199613936">"Instaliraj aplikaciju"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite li da preslikate na spoljnji ekran?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Omogući ekran"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavno koristila aplikacija"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Prikaži nedavni pristup"</string>
@@ -1186,10 +1192,10 @@
     <string name="privacy_dialog_manage_permissions" msgid="2543451567190470413">"Upravljaj pristupom"</string>
     <string name="privacy_dialog_active_call_usage" msgid="7858746847946397562">"Koristi telefonski poziv"</string>
     <string name="privacy_dialog_recent_call_usage" msgid="1214810644978167344">"Nedavno korišćeno u telefonskom pozivu"</string>
-    <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Koristi <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+    <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="privacy_dialog_recent_app_usage" msgid="4883417856848222450">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
-    <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Koristi <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
+    <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
     <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
-    <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koristi <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
+    <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
     <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index dd8199e..69fce40 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Перамясціць ніжэй"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Перамясціць улева"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Перамясціць управа"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Пераключальнік павелічэння"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Павялічыць увесь экран"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Павялічыць частку экрана"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Памочнік гатовы выконваць каманды"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайце ў Наладах стандартную праграму для нататак"</string>
     <string name="install_app" msgid="5066668100199613936">"Усталяваць праграму"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Адлюстраваць на знешнім дысплеі?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Уключыць дысплэй"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Мікрафон і камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Нядаўна выкарыстоўваліся праграмамі"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Паглядзець нядаўні доступ"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 896756d..3c0dd637 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Преместване надолу"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Преместване наляво"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Преместване надясно"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Превключване на увеличението"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увеличаване на целия екран"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увеличаване на част от екрана"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Функцията за активиране на Асистент е включена"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайте стандартно приложение за бележки от настройките"</string>
     <string name="install_app" msgid="5066668100199613936">"Инсталиране на приложението"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Да се дублира ли на външния екран?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Активиране на екрана"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Скорошно използване на приложението"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Вижте скорошния достъп"</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 5c1b445..0975b98 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"নিচে নামান"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"বাঁদিকে সরান"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ডানদিকে সরান"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"বড় করে দেখার সুইচ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"সম্পূর্ণ স্ক্রিন বড় করে দেখা"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"স্ক্রিনের কিছুটা অংশ বড় করুন"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"অ্যাসিস্ট্যান্ট আপনার কথা শোনার জন্য চালু করা আছে"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"\'সেটিংস\' থেকে ডিফল্ট নোট নেওয়ার অ্যাপ সেট করুন"</string>
     <string name="install_app" msgid="5066668100199613936">"অ্যাপ ইনস্টল করুন"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"এক্সটার্নাল ডিসপ্লে আয়না?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ডিসপ্লে চালু করুন"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"মাইক্রোফোন ও ক্যামেরা"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"সম্প্রতি ব্যবহার করা অ্যাপ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"সাম্প্রতিক অ্যাক্সেস দেখুন"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 63f62f1..021ba8a 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Pomjeranje prema dolje"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Pomjeranje lijevo"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Pomjeranje desno"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prekidač za uvećavanje"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Uvećavanje prikaza preko cijelog ekrana"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Uvećavanje dijela ekrana"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Pažnja Asistenta je uključena"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Postavite zadanu aplikaciju za bilješke u Postavkama"</string>
     <string name="install_app" msgid="5066668100199613936">"Instaliraj aplikaciju"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Preslikati na vanjski ekran?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Omogući ekran"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavno korištenje aplikacije"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Prikaži nedavni pristup"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index f54a0ac..ab2c25b 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mou cap avall"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mou cap a l\'esquerra"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mou cap a la dreta"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Canvia al mode d\'ampliació"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Amplia la pantalla completa"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Amplia una part de la pantalla"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"L\'Assistent està activat"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defineix l\'aplicació de notes predeterminada a Configuració"</string>
     <string name="install_app" msgid="5066668100199613936">"Instal·la l\'aplicació"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vols replicar-ho a la pantalla externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Activa la pantalla"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micròfon i càmera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Ús recent de l\'aplicació"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Mostra l\'accés recent"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 1bfe1f4..9bde3bb 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -112,7 +112,7 @@
     <string name="screenrecord_continue" msgid="4055347133700593164">"Začít"</string>
     <string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Nahrávání obrazovky"</string>
     <string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Nahrávání obrazovky a zvuku"</string>
-    <string name="screenrecord_taps_label" msgid="1595690528298857649">"Zobrazovat klepnutí na obrazovku"</string>
+    <string name="screenrecord_taps_label" msgid="1595690528298857649">"Zobrazovat klepnutí na displej"</string>
     <string name="screenrecord_stop_label" msgid="72699670052087989">"Zastavit"</string>
     <string name="screenrecord_share_label" msgid="5025590804030086930">"Sdílet"</string>
     <string name="screenrecord_save_title" msgid="1886652605520893850">"Nahrávka obrazovky se uložila"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Přesunout dolů"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Přesunout doleva"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Přesunout doprava"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Přepínač zvětšení"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zvětšit celou obrazovku"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zvětšit část obrazovky"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Pozornost Asistenta je zapnutá"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Výchozí aplikaci pro poznámky nastavíte v Nastavení"</string>
     <string name="install_app" msgid="5066668100199613936">"Nainstalovat aplikaci"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Zrcadlit na externí displej?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktivovat displej"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon a fotoaparát"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedávné použití aplikacemi"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobrazit nedávný přístup"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 17853e7..94ab189 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -174,12 +174,12 @@
     <string name="biometric_re_enroll_dialog_confirm" msgid="3049858021857801836">"Konfigurer"</string>
     <string name="biometric_re_enroll_dialog_cancel" msgid="93760939407091417">"Ikke nu"</string>
     <string name="biometric_re_enroll_notification_content" msgid="8685925877186288180">"Dette er påkrævet for at forbedre sikkerheden og ydeevnen"</string>
-    <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Konfigurer oplåsning med fingeraftryk igen"</string>
-    <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Oplåsning med fingeraftryk"</string>
-    <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Konfigurer oplåsning med fingeraftryk"</string>
-    <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Hvis du vil konfigurere oplåsning med fingeraftryk igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere oplåsning med fingeraftryk igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
-    <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Hvis du vil konfigurere oplåsning med fingeraftryk igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere oplåsning med fingeraftryk igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
-    <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Oplåsning med fingeraftryk kunne ikke konfigureres. Gå til Indstillinger for at prøve igen."</string>
+    <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Konfigurer fingeroplåsning igen"</string>
+    <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Fingeroplåsning"</string>
+    <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Konfigurer fingeroplåsning"</string>
+    <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Hvis du vil konfigurere fingeroplåsning igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere fingeroplåsning igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
+    <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Hvis du vil konfigurere fingeroplåsning igen, bliver dine nuværende fingeraftryksbilleder og -modeller slettet.\n\nNår de er slettet, skal du konfigurere fingeroplåsning igen for at bruge dit fingeraftryk til at låse din telefon op eller verificere din identitet."</string>
+    <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Fingeroplåsning kunne ikke konfigureres. Gå til Indstillinger for at prøve igen."</string>
     <string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Konfigurer ansigtsoplåsning igen"</string>
     <string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Ansigtsoplåsning"</string>
     <string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Konfigurer ansigtsoplåsning"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Flyt ned"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Flyt til venstre"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Flyt til højre"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Skift forstørrelsestilstand"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Forstør hele skærmen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Forstør en del af skærmen"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent lytter"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Angiv standardapp til noter i Indstillinger"</string>
     <string name="install_app" msgid="5066668100199613936">"Installer app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vil du spejle til ekstern skærm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktivér skærm"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon og kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Seneste brug af apps"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se seneste adgang"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 822ab27..4ae8f27 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Nach unten bewegen"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Nach links bewegen"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Nach rechts bewegen"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrößerungsschalter"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ganzen Bildschirm vergrößern"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Teil des Bildschirms vergrößern"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant-Aktivierung an"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standard-Notizen-App in den Einstellungen einrichten"</string>
     <string name="install_app" msgid="5066668100199613936">"App installieren"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Auf externen Bildschirm spiegeln?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Anzeige aktivieren"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon &amp; Kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Kürzliche App-Nutzung"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Kürzliche Zugriffe ansehen"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index c33b753..b279abf 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Μετακίνηση κάτω"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Μετακίνηση αριστερά"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Μετακίνηση δεξιά"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Εναλλαγή μεγιστοποίησης"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Μεγέθυνση πλήρους οθόνης"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Μεγέθυνση μέρους της οθόνης"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Ο Βοηθός βρίσκεται σε αναμονή"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ορίστε την προεπιλεγμένη εφαρμογή σημειώσεων στις Ρυθμίσεις"</string>
     <string name="install_app" msgid="5066668100199613936">"Εγκατάσταση εφαρμογής"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Κατοπτρισμός σε εξωτερική οθόνη;"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Ενεργοποίηση οθόνης"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Μικρόφωνο και Κάμερα"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Πρόσφατη χρήση εφαρμογής"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Εμφάνιση πρόσφατης πρόσβασης"</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 901459d..e036eb73 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 01aa637..060bb99 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -863,6 +863,10 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+    <string name="accessibility_control_increase_window_width" msgid="6992249470832493283">"Increase width of magnifier"</string>
+    <string name="accessibility_control_decrease_window_width" msgid="5740401560105929681">"Decrease width of magnifier"</string>
+    <string name="accessibility_control_increase_window_height" msgid="2200966116612324260">"Increase height of magnifier"</string>
+    <string name="accessibility_control_decrease_window_height" msgid="2054479949445332761">"Decrease height of magnifier"</string>
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 901459d..e036eb73 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 901459d..e036eb73 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Move down"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Move left"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Move right"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Magnification switch"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Magnify full screen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Magnify part of screen"</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index c496aee..936bbeb 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -863,6 +863,10 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‏‎‏‎‎‎‎‎‏‏‎‎‏‏‏‎‏‏‎‏‏‏‎‎‎‏‎‏‏‏‏‎‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‎‎‎Move down‎‏‎‎‏‎"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‏‎‎‎‎‏‎‏‎‏‎‏‏‎‎‎‎‏‎‎‎‏‎‎‏‎‏‎‎‏‎‏‏‏‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‎‏‏‎Move left‎‏‎‎‏‎"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‏‎‎‏‏‏‎‎‎‎‎‏‏‏‏‏‎‏‎‎‎‎‎‎‏‏‎‏‎‎‎‎‎‏‎‏‎‏‏‏‏‎‎‎‏‎‏‎‎‎‎Move right‎‏‎‎‏‎"</string>
+    <string name="accessibility_control_increase_window_width" msgid="6992249470832493283">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‎‏‎‎‎‎‏‎‎‏‎‏‏‏‎‏‎‏‏‏‎‏‏‎‎‎‏‏‏‎‎‎‎‏‏‏‏‎‎‎‏‎‎‏‎‎‎‎‏‎‏‏‏‎‎‎‏‏‎Increase width of magnifier‎‏‎‎‏‎"</string>
+    <string name="accessibility_control_decrease_window_width" msgid="5740401560105929681">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‎‎‎‎‎‏‏‎‎‏‏‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‏‎‎‏‎‎‏‎‏‏‏‏‎‏‎‎‎‏‎Decrease width of magnifier‎‏‎‎‏‎"</string>
+    <string name="accessibility_control_increase_window_height" msgid="2200966116612324260">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‏‎‏‏‎‎‏‏‏‎‎‎‎‎‏‎‏‏‎‎‏‎‏‏‏‎‏‎‏‏‎‎‏‎‎‏‏‏‎‏‏‏‎‏‎‎‏‎‎‎Increase height of magnifier‎‏‎‎‏‎"</string>
+    <string name="accessibility_control_decrease_window_height" msgid="2054479949445332761">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‏‎‏‎‏‎‏‎‎‎‎‏‎‎‎‎‎‎‎‎‏‏‎‏‏‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‏‎Decrease height of magnifier‎‏‎‎‏‎"</string>
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‎‏‏‏‎‎‏‎‏‎‎‎‎‏‎‎‎‎‎‎‏‏‎‏‏‏‏‎‏‎‏‏‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‎‏‎‎‎‏‏‎‏‎Magnification switch‎‏‎‎‏‎"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‎‎‏‏‎‏‏‏‎‏‏‎‎‎‏‎‏‎‎‏‏‏‏‏‏‎‏‎‏‎‏‏‏‎‏‎‎‏‎‏‎‏‏‏‎‏‎‎‎‎‎‏‎Magnify full screen‎‏‎‎‏‎"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‏‏‎‎‎‎‏‎‎‏‎‎‏‎‎‎‎‎‏‎‏‎‏‎‏‏‎‏‏‏‏‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‎‏‎‏‎Magnify part of screen‎‏‎‎‏‎"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 3653839..15b3001 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover hacia abajo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover hacia la izquierda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover hacia la derecha"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor de ampliación"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte de la pantalla"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistente está prestando atención"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Configura la app de notas predeterminada en Configuración"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalar app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"¿Quieres duplicar a la pantalla externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Habilitar pantalla"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono y cámara"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso reciente en apps"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver accesos recientes"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 0680821..fa43536 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover hacia abajo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover hacia la izquierda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover hacia la derecha"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Botón para cambiar el modo de ampliación"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte de la pantalla"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"El Asistente está activado"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Configura la aplicación de notas predeterminada en Ajustes"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalar aplicación"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"¿Replicar en pantalla externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Habilitar pantalla"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono y cámara"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso reciente en aplicaciones"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver acceso reciente"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 988d4d7..ad80a59 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Teisalda alla"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Teisalda vasakule"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Teisalda paremale"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suurenduse lüliti"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Täisekraani suurendamine"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekraanikuva osa suurendamine"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent on aktiveeritud"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Määrake seadetes märkmete vaikerakendus."</string>
     <string name="install_app" msgid="5066668100199613936">"Installi rakendus"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Kas peegeldada välisekraanile?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Luba ekraan"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon ja kaamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Rakenduste hiljutine kasutamine"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Kuva hiljutine juurdepääs"</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 71cb074..b417c10 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Eraman behera"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Eraman ezkerrera"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Eraman eskuinera"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Lupa aplikatzeko botoia"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Handitu pantaila osoa"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Handitu pantailaren zati bat"</string>
@@ -1080,7 +1088,7 @@
     <string name="wifi_wont_autoconnect_for_now" msgid="5782282612749867762">"Oraingoz ez da automatikoki konektatuko wifira"</string>
     <string name="see_all_networks" msgid="3773666844913168122">"Ikusi guztiak"</string>
     <string name="to_switch_networks_disconnect_ethernet" msgid="6698111101156951955">"Sarea aldatzeko, deskonektatu Etherneta"</string>
-    <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Gailuaren funtzionamendua hobetzeko, aplikazioek eta zerbitzuek wifi-sareak bilatzen jarraituko dute, baita wifi-konexioa desaktibatuta dagoenean ere. Aukera hori aldatzeko, joan wifi-sareen bilaketaren ezarpenetara. "<annotation id="link">"Aldatu"</annotation></string>
+    <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Gailuaren funtzionamendua hobetzeko, aplikazioek eta zerbitzuek wifi-sareak bilatzen jarraituko dute, baita wifi-konexioa desaktibatuta dagoenean ere. Aukera hori aldatzeko, joan wifi-sareak bilatzeko eginbidearen ezarpenetara. "<annotation id="link">"Aldatu"</annotation></string>
     <string name="turn_off_airplane_mode" msgid="8425587763226548579">"Desaktibatu hegaldi modua"</string>
     <string name="qs_tile_request_dialog_text" msgid="3501359944139877694">"<xliff:g id="APPNAME">%1$s</xliff:g> aplikazioak lauza hau gehitu nahi du Ezarpen bizkorrak menuan:"</string>
     <string name="qs_tile_request_dialog_add" msgid="4888460910694986304">"Gehitu lauza"</string>
@@ -1132,7 +1140,7 @@
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"Gailuko erregistro guztiak erabiltzeko baimena eman nahi diozu <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> aplikazioari?"</string>
     <string name="log_access_confirmation_allow" msgid="752147861593202968">"Eman behin erabiltzeko baimena"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"Ez eman baimenik"</string>
-    <string name="log_access_confirmation_body" msgid="6883031912003112634">"Gailuko erregistroetan gailuan gertatzen den guztia gordetzen da. Arazoak bilatu eta konpontzeko erabil ditzakete aplikazioek erregistro horiek.\n\nBaliteke erregistro batzuek kontuzko informazioa edukitzea. Beraz, eman gailuko erregistro guztiak erabiltzeko baimena fidagarritzat jotzen dituzun aplikazioei bakarrik. \n\nNahiz eta gailuko erregistro guztiak erabiltzeko baimena ez eman aplikazio honi, aplikazioak hari dagozkion erregistroak atzitu ahalko ditu. Gainera, baliteke gailuaren fabrikatzaileak gailuko erregistro edo datu batzuk atzitu ahal izatea."</string>
+    <string name="log_access_confirmation_body" msgid="6883031912003112634">"Gailuko erregistroetan gailuan gertatzen den guztia gordetzen da. Arazoak bilatu eta konpontzeko erabil ditzakete aplikazioek erregistro horiek.\n\nBaliteke erregistro batzuek kontuzko informazioa edukitzea. Beraz, eman gailuko erregistro guztiak erabiltzeko baimena fidagarritzat jotzen dituzun aplikazioei bakarrik. \n\nNahiz eta gailuko erregistro guztiak erabiltzeko baimena ez eman aplikazio honi, aplikazioak hari dagozkion erregistroak erabili ahalko ditu. Gainera, baliteke gailuaren fabrikatzaileak gailuko erregistro edo datu batzuk erabili ahal izatea."</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Lortu informazio gehiago"</string>
     <string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"Lortu informazio gehiago <xliff:g id="URL">%s</xliff:g> helbidean"</string>
     <string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"Ireki <xliff:g id="APPNAME">%1$s</xliff:g>"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Laguntzailea zerbitzuak arreta jarrita dauka"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ezarri oharren aplikazio lehenetsia ezarpenetan"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalatu aplikazioa"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Kanpoko pantailan islatu nahi duzu?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Gaitu pantaila"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofonoa eta kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Aplikazioen azken erabilera"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ikusi azkenaldiko sarbidea"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 8902103..1135816 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"انتقال به پایین"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"انتقال به راست"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"انتقال به چپ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"کلید درشت‌نمایی"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"درشت‌نمایی تمام‌صفحه"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"درشت‌نمایی بخشی از صفحه"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"توجه «دستیار» روشن است"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"برنامه پیش‌فرض یادداشت را در «تنظیمات» تنظیم کنید"</string>
     <string name="install_app" msgid="5066668100199613936">"نصب برنامه"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"در نمایشگر خارجی پخش شود؟"</string>
+    <string name="enable_display" msgid="8308309634883321977">"فعال کردن نمایشگر"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"میکروفون و دوربین"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"استفاده اخیر از برنامه"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"دیدن دسترسی اخیر"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 7e2ab65..eef5a47 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Siirrä alas"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Siirrä vasemmalle"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Siirrä oikealle"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suurennusvalinta"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Koko näytön suurennus"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Suurenna osa näytöstä"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant on aktiivinen"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Aseta oletusmuistiinpanosovellus Asetuksista"</string>
     <string name="install_app" msgid="5066668100199613936">"Asenna sovellus"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Peilataanko ulkoiselle näytölle?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Ota näyttö käyttöön"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoni ja kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Sovellusten viimeaikainen käyttö"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Katso viimeaikainen käyttö"</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index a863623..f4f4105 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Déplacer vers le bas"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Déplacer vers la gauche"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Déplacer vers la droite"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Commutateur d\'agrandissement"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Agrandir la totalité de l\'écran"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Agrandir une partie de l\'écran"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant à l\'écoute"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Définir l\'application de prise de notes par défaut dans les Paramètres"</string>
     <string name="install_app" msgid="5066668100199613936">"Installer l\'application"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Dupliquer l\'écran sur un moniteur externe?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Activer l\'écran"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microphone et appareil photo"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilisation récente par les applications"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Afficher l\'accès récent"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index a3920de..81a8363 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Déplacer vers le bas"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Déplacer vers la gauche"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Déplacer vers la droite"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Changer de mode d\'agrandissement"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Agrandir tout l\'écran"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Agrandir une partie de l\'écran"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant à l\'écoute"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Définir une appli de notes par défaut dans les paramètres"</string>
     <string name="install_app" msgid="5066668100199613936">"Installer l\'appli"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Mirroring sur écran externe ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Activer l\'écran"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micro et caméra"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilisation récente par les applis"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consulter les accès récents"</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 344c0d4..509de37 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover cara abaixo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover cara á esquerda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover cara á dereita"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor do modo de ampliación"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar pantalla completa"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Amplía parte da pantalla"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"A atención do Asistente está activada"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Establece a aplicación de notas predeterminada en Configuración"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalar aplicación"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Queres proxectar contido nunha pantalla externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Activar pantalla"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micrófono e cámara"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente por parte de aplicacións"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ver acceso recente"</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index a32c78fc..55fa871 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"નીચે ખસેડો"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ડાબી બાજુ ખસેડો"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"જમણી બાજુ ખસેડો"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"મોટું કરવાની સુવિધાવાળી સ્વિચ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"પૂર્ણ સ્ક્રીનને મોટી કરો"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"સ્ક્રીનનો કોઈ ભાગ મોટો કરો"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant સક્રિય છે"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"સેટિંગમાં નોંધની ડિફૉલ્ટ ઍપ સેટ કરો"</string>
     <string name="install_app" msgid="5066668100199613936">"ઍપ ઇન્સ્ટૉલ કરો"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"શું બાહ્ય ડિસ્પ્લે પર મિરર કરીએ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ડિસ્પ્લે ચાલુ કરો"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"માઇક્રોફોન અને કૅમેરા"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"તાજેતરનો ઍપનો વપરાશ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"તાજેતરનો ઍક્સેસ મેનેજ કરો"</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index c73b8f7..173c607 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -299,7 +299,7 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"वर्क ऐप्लिकेशन"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"रोकी गई"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"नाइट लाइट"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"शाम को चालू की जाएगी"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"शाम को चालू होगी"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"सुबह तक चालू रहेगी"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g> पर चालू की जाएगी"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> तक"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"नीचे ले जाएं"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"बाईं ओर ले जाएं"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"दाईं ओर ले जाएं"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ज़ूम करने की सुविधा वाला स्विच"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"फ़ुल स्क्रीन को ज़ूम करें"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रीन के किसी हिस्से को ज़ूम करें"</string>
@@ -905,8 +913,8 @@
     <string name="controls_providers_title" msgid="6879775889857085056">"कंट्रोल जोड़ने के लिए ऐप्लिकेशन चुनें"</string>
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# कंट्रोल जोड़ा गया.}one{# कंट्रोल जोड़ा गया.}other{# कंट्रोल जोड़े गए.}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"हटाया गया"</string>
-    <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> को जोड़ना है?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> यह चुन सकता है कि इस पैनल पर कौनसे कंट्रोल और कॉन्टेंट दिखे."</string>
+    <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> ऐप्लिकेशन को जोड़ना है?"</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> ऐप्लिकेशन यह चुन सकता है कि इस पैनल पर कौनसे कंट्रोल और कॉन्टेंट दिखे."</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> के लिए कंट्रोल हटाने हैं?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"पसंदीदा बनाया गया"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"पसंदीदा बनाया गया, क्रम संख्या <xliff:g id="NUMBER">%d</xliff:g>"</string>
@@ -1129,7 +1137,7 @@
     <string name="bt_le_audio_broadcast_dialog_unknown_name" msgid="3791472237793443044">"कोई जानकारी नहीं"</string>
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
-    <string name="log_access_confirmation_title" msgid="4843557604739943395">"क्या <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> को डिवाइस लॉग का ऐक्सेस देना है?"</string>
+    <string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> को डिवाइस लॉग ऐक्सेस करने की अनुमति देनी है?"</string>
     <string name="log_access_confirmation_allow" msgid="752147861593202968">"एक बार ऐक्सेस करने की अनुमति दें"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"अनुमति न दें"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"डिवाइस लॉग में आपके डिवाइस पर की गई कार्रवाइयां रिकॉर्ड होती हैं. ऐप्लिकेशन, इन लॉग का इस्तेमाल गड़बड़ियां ढूंढने और उन्हें ठीक करने के लिए कर सकते हैं.\n\nकुछ लॉग में संवेदनशील जानकारी हो सकती है. इसलिए, सिर्फ़ भरोसेमंद ऐप्लिकेशन को डिवाइस के सभी लॉग का ऐक्सेस दें. \n\nअगर इस ऐप्लिकेशन को डिवाइस के सभी लॉग का ऐक्सेस नहीं दिया जाता है, तब भी यह डिवाइस पर मौजूद अपने लॉग ऐक्सेस कर सकता है. डिवाइस को बनाने वाली कंपनी फिर भी डिवाइस के कुछ लॉग या जानकारी ऐक्सेस कर सकती है."</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant आपकी बातें सुन रही है"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिंग में जाकर, नोट लेने की सुविधा देने वाले ऐप्लिकेशन को डिफ़ॉल्ट के तौर पर सेट करें"</string>
     <string name="install_app" msgid="5066668100199613936">"ऐप्लिकेशन इंस्टॉल करें"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाहरी डिसप्ले को अन्य डिवाइस पर दिखाना है?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"डिसप्ले चालू करें"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"माइक्रोफ़ोन और कैमरा"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"हाल ही में इस्तेमाल करने वाला ऐप्लिकेशन"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"हाल में ऐक्सेस करने वाले ऐप"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index f9b220d..42acd48 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Premjesti dolje"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Premjesti ulijevo"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Premjesti udesno"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prebacivanje povećavanja"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Povećajte cijeli zaslon"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Povećaj dio zaslona"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Pažnja Asistenta je aktivirana"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Postavite zadanu aplikaciju za bilješke u postavkama"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalacija"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite li zrcaliti na vanjski zaslon?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Omogući zaslon"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavna upotreba aplikacije"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Pogledajte nedavni pristup"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 0d40770..e27733f 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mozgatás lefelé"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mozgatás balra"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mozgatás jobbra"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Nagyításváltó"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"A teljes képernyő felnagyítása"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Képernyő bizonyos részének nagyítása"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"A Segéd figyel"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Állítson be alapértelmezett jegyzetkészítő alkalmazást a Beállításokban"</string>
     <string name="install_app" msgid="5066668100199613936">"Alkalmazás telepítése"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Tükrözi a kijelzőt a külső képernyőre?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Képernyő engedélyezése"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon és kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Legutóbbi alkalmazáshasználat"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Legutóbbi hozzáférés"</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index e64a8de3..d2a5d75 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -399,7 +399,7 @@
     <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"Ավելացնելով նոր օգտատեր՝ դուք դուրս կգաք հյուրի ռեժիմից։ Հյուրի ընթացիկ աշխատաշրջանի բոլոր հավելվածներն ու տվյալները կջնջվեն։"</string>
     <string name="user_limit_reached_title" msgid="2429229448830346057">"Սահմանաչափը սպառված է"</string>
     <string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{Հնարավոր է ստեղծել միայն մեկ օգտատեր։}one{Կարող եք առավելագույնը # օգտատեր ավելացնել։}other{Կարող եք առավելագույնը # օգտատեր ավելացնել։}}"</string>
-    <string name="user_remove_user_title" msgid="9124124694835811874">"Հեռացնե՞լ օգտատիրոջը:"</string>
+    <string name="user_remove_user_title" msgid="9124124694835811874">"Հեռացնե՞լ օգտատիրոջը"</string>
     <string name="user_remove_user_message" msgid="6702834122128031833">"Այս օգտատիրոջ բոլոր հավելվածներն ու տվյալները կջնջվեն:"</string>
     <string name="user_remove_user_remove" msgid="8387386066949061256">"Հեռացնել"</string>
     <string name="media_projection_dialog_title" msgid="3316063622495360646">"Սկսե՞լ տեսագրումը կամ հեռարձակումը <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> հավելվածով"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Տեղափոխել ներքև"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Տեղափոխել ձախ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Տեղափոխել աջ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Խոշորացման փոփոխություն"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Խոշորացնել ամբողջ էկրանը"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Խոշորացնել էկրանի որոշակի հատվածը"</string>
@@ -1130,7 +1138,7 @@
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"Հասանելի դարձնե՞լ <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> հավելվածին սարքի բոլոր մատյանները"</string>
-    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Թույլատրել մեկանգամյա մուտքը"</string>
+    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Թույլատրել մեկանգամյա մուտք"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"Չթույլատրել"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"Այն, ինչ տեղի է ունենում ձեր սարքում, գրանցվում է սարքի մատյաններում։ Հավելվածները կարող են դրանք օգտագործել անսարքությունները հայտնաբերելու և վերացնելու նպատակով։\n\nՔանի որ որոշ մատյաններ անձնական տեղեկություններ են պարունակում, խորհուրդ ենք տալիս հասանելի դարձնել ձեր սարքի բոլոր մատյանները միայն այն հավելվածներին, որոնց վստահում եք։ \n\nԵթե այս հավելվածին նման թույլտվություն չեք տվել, դրան նախկինի պես հասանելի կլինեն իր մատյանները։ Հնարավոր է՝ ձեր սարքի արտադրողին ևս հասանելի լինեն սարքի որոշ մատյաններ և տեղեկություններ։"</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Իմանալ ավելին"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Օգնականը լսում է"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Կարգավորեք նշումների կանխադրված հավելված Կարգավորումներում"</string>
     <string name="install_app" msgid="5066668100199613936">"Տեղադրել հավելվածը"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Հայելապատճենե՞լ արտաքին էկրանին"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Միացնել էկրանը"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Խոսափող և տեսախցիկ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Հավելվածի վերջին օգտագործումը"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Տեսնել վերջին օգտագործումը"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index d2a9747..f908c33 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Pindahkan ke bawah"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Pindahkan ke kiri"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Pindahkan ke kanan"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Tombol pembesaran"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Memperbesar tampilan layar penuh"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Perbesar sebagian layar"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asisten sedang memerhatikan"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setel aplikasi catatan default di Setelan"</string>
     <string name="install_app" msgid="5066668100199613936">"Instal aplikasi"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Cerminkan ke layar eksternal?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktifkan layar"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon &amp; Kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Penggunaan aplikasi baru-baru ini"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Lihat akses terbaru"</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index d5bb28a..1fb1304 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Færa niður"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Færa til vinstri"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Færa til hægri"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Stækkunarrofi"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Stækka allan skjáinn"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Stækka hluta skjásins"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Hjálparinn er að hlusta"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Stilltu sjálfgefið glósuforrit í stillingunum"</string>
     <string name="install_app" msgid="5066668100199613936">"Setja upp forrit"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Spegla yfir á ytri skjá?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Virkja skjá"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Hljóðnemi og myndavél"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nýlega notað af forriti"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Sjá nýlegan aðgang"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 9f6228d..bab86e3 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -174,17 +174,17 @@
     <string name="biometric_re_enroll_dialog_confirm" msgid="3049858021857801836">"Configura"</string>
     <string name="biometric_re_enroll_dialog_cancel" msgid="93760939407091417">"Non ora"</string>
     <string name="biometric_re_enroll_notification_content" msgid="8685925877186288180">"L\'operazione è necessaria per migliorare la sicurezza e le prestazioni"</string>
-    <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Riconfigura lo sblocco con l\'impronta"</string>
-    <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Sblocco con l\'impronta"</string>
-    <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Configura lo sblocco con l\'impronta"</string>
-    <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Per riconfigurare lo sblocco con l\'impronta, i modelli e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
-    <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Per riconfigurare lo sblocco con l\'impronta, il modello e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
-    <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Impossibile configurare lo sblocco con l\'impronta. Vai alle Impostazioni e riprova."</string>
-    <string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Riconfigura lo sblocco con il volto"</string>
-    <string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Sblocco con il volto"</string>
-    <string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Configura lo sblocco con il volto"</string>
-    <string name="face_re_enroll_dialog_content" msgid="7353502359464038511">"Per riconfigurare lo sblocco con il volto, l\'attuale modello del volto verrà eliminato.\n\nDovrai riconfigurare questa funzionalità per usare il volto per sbloccare il telefono."</string>
-    <string name="face_reenroll_failure_dialog_content" msgid="7073947334397236935">"Impossibile configurare lo sblocco con il volto. Vai alle Impostazioni e riprova."</string>
+    <string name="fingerprint_re_enroll_notification_title" msgid="4539432429683916604">"Riconfigura lo Sblocco con l\'Impronta"</string>
+    <string name="fingerprint_re_enroll_notification_name" msgid="630798657797645704">"Sblocco con l\'Impronta"</string>
+    <string name="fingerprint_re_enroll_dialog_title" msgid="3526033128113925780">"Configura lo Sblocco con l\'Impronta"</string>
+    <string name="fingerprint_re_enroll_dialog_content" msgid="4866561176695984879">"Per riconfigurare lo Sblocco con l\'Impronta, i modelli e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
+    <string name="fingerprint_re_enroll_dialog_content_singular" msgid="3083663339787381218">"Per riconfigurare lo Sblocco con l\'Impronta, il modello e le immagini dell\'impronta correnti verranno eliminati.\n\nDopo la cancellazione, dovrai riconfigurare la funzionalità per usare l\'impronta per sbloccare il telefono o verificare la tua identità."</string>
+    <string name="fingerprint_reenroll_failure_dialog_content" msgid="4733768492747300666">"Impossibile configurare lo Sblocco con l\'Impronta. Vai alle Impostazioni e riprova."</string>
+    <string name="face_re_enroll_notification_title" msgid="1850838867718410520">"Riconfigura lo Sblocco con il Volto"</string>
+    <string name="face_re_enroll_notification_name" msgid="7384545252206120659">"Sblocco con il Volto"</string>
+    <string name="face_re_enroll_dialog_title" msgid="6392173708176069994">"Configura lo Sblocco con il Volto"</string>
+    <string name="face_re_enroll_dialog_content" msgid="7353502359464038511">"Per riconfigurare lo Sblocco con il Volto, l\'attuale modello del volto verrà eliminato.\n\nDovrai riconfigurare questa funzionalità per usare il volto per sbloccare il telefono."</string>
+    <string name="face_reenroll_failure_dialog_content" msgid="7073947334397236935">"Impossibile configurare lo Sblocco con il Volto. Vai alle Impostazioni e riprova."</string>
     <string name="fingerprint_dialog_touch_sensor" msgid="2817887108047658975">"Tocca il sensore di impronte"</string>
     <string name="fingerprint_dialog_authenticated_confirmation" msgid="1603899612957562862">"Premi l\'icona Sblocca per continuare"</string>
     <string name="fingerprint_dialog_use_fingerprint_instead" msgid="6178228876763024452">"Impossibile riconoscere il volto. Usa l\'impronta."</string>
@@ -192,7 +192,7 @@
     <skip />
     <string name="keyguard_face_failed" msgid="9044619102286917151">"Volto non riconosciuto"</string>
     <string name="keyguard_suggest_fingerprint" msgid="8742015961962702960">"Usa l\'impronta"</string>
-    <string name="keyguard_face_unlock_unavailable" msgid="1581949044193418736">"Sblocco con il volto non disponibile"</string>
+    <string name="keyguard_face_unlock_unavailable" msgid="1581949044193418736">"Sblocco con il Volto non disponibile"</string>
     <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth collegato."</string>
     <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Percentuale della batteria sconosciuta."</string>
     <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connesso a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string>
@@ -256,7 +256,7 @@
     <string name="accessibility_quick_settings_rotation" msgid="4800050198392260738">"Rotazione automatica dello schermo"</string>
     <string name="quick_settings_location_label" msgid="2621868789013389163">"Geolocalizzazione"</string>
     <string name="quick_settings_screensaver_label" msgid="1495003469366524120">"Salvaschermo"</string>
-    <string name="quick_settings_camera_label" msgid="5612076679385269339">"Accesso alla fotocamera"</string>
+    <string name="quick_settings_camera_label" msgid="5612076679385269339">"Accesso alla videocamera"</string>
     <string name="quick_settings_mic_label" msgid="8392773746295266375">"Accesso al microfono"</string>
     <string name="quick_settings_camera_mic_available" msgid="1453719768420394314">"Disponibile"</string>
     <string name="quick_settings_camera_mic_blocked" msgid="4710884905006788281">"Bloccato"</string>
@@ -367,7 +367,7 @@
     <string name="keyguard_face_successful_unlock" msgid="4203999851465708287">"Sbloccato con il volto"</string>
     <string name="keyguard_face_successful_unlock_alt1" msgid="5853906076353839628">"Volto riconosciuto"</string>
     <string name="keyguard_retry" msgid="886802522584053523">"Scorri verso l\'alto per riprovare"</string>
-    <string name="accesssibility_keyguard_retry" msgid="8880238862712870676">"Scorri verso l\'alto per riprovare lo sblocco con il volto"</string>
+    <string name="accesssibility_keyguard_retry" msgid="8880238862712870676">"Scorri verso l\'alto per riprovare lo Sblocco con il Volto"</string>
     <string name="require_unlock_for_nfc" msgid="1305686454823018831">"Sblocca per usare NFC"</string>
     <string name="do_disclosure_generic" msgid="4896482821974707167">"Questo dispositivo appartiene alla tua organizzazione"</string>
     <string name="do_disclosure_with_name" msgid="2091641464065004091">"Questo dispositivo appartiene a <xliff:g id="ORGANIZATION_NAME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Sposta giù"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Sposta a sinistra"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Sposta a destra"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Opzione Ingrandimento"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ingrandisci l\'intero schermo"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ingrandisci parte dello schermo"</string>
@@ -1086,7 +1094,7 @@
     <string name="qs_tile_request_dialog_add" msgid="4888460910694986304">"Aggiungi riquadro"</string>
     <string name="qs_tile_request_dialog_not_add" msgid="4168716573114067296">"Non aggiungerlo"</string>
     <string name="qs_user_switch_dialog_title" msgid="3045189293587781366">"Seleziona utente"</string>
-    <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{C\'è # app attiva}many{Ci sono # app attive}other{Ci sono # app attive}}"</string>
+    <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{# app è attiva}many{# di app sono attive}other{# app sono attive}}"</string>
     <string name="fgs_dot_content_description" msgid="2865071539464777240">"Nuove informazioni"</string>
     <string name="fgs_manager_dialog_title" msgid="5879184257257718677">"App attive"</string>
     <string name="fgs_manager_dialog_message" msgid="2670045017200730076">"Queste app sono attive e in esecuzione, anche quando non le utilizzi. Questo migliora la loro funzionalità, ma influisce sulla durata della batteria."</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"L\'assistente è attivo"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Imposta l\'app per le note predefinita nelle Impostazioni"</string>
     <string name="install_app" msgid="5066668100199613936">"Installa app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vuoi eseguire il mirroring al display esterno?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Attiva display"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microfono e fotocamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente da app"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Vedi accesso recente"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 44ad445..294f77f 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"הזזה למטה"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"הזזה שמאלה"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"הזזה ימינה"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"מעבר למצב הגדלה"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"הגדלה של המסך המלא"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"הגדלת חלק מהמסך"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"‏Assistant מאזינה"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"צריך להגדיר את אפליקציית ברירת המחדל לפתקים ב\'הגדרות\'"</string>
     <string name="install_app" msgid="5066668100199613936">"התקנת האפליקציה"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"לשקף למסך חיצוני?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"הפעלת המסך"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"מיקרופון ומצלמה"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"נעשה שימוש לאחרונה באפליקציות"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"צפייה בהרשאות הגישה האחרונות"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 5bd77fc..9daaabc 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"下に移動"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"左に移動"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"右に移動"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"拡大スイッチ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"画面全体を拡大します"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"画面の一部を拡大します"</string>
@@ -906,7 +914,7 @@
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# 件のコントロールを追加しました。}other{# 件のコントロールを追加しました。}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"削除済み"</string>
     <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> を追加しますか?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> はここに表示されるコントロールとコンテンツを選択できます。"</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"ここに表示されるコントロールとコンテンツを <xliff:g id="APPNAME">%s</xliff:g> が選択できるようになります。"</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> のコントロールを削除しますか?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"お気に入りに追加済み"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"お気に入りに追加済み、位置: <xliff:g id="NUMBER">%d</xliff:g>"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"アシスタントは起動済みです"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"[設定] でデフォルトのメモアプリを設定してください"</string>
     <string name="install_app" msgid="5066668100199613936">"アプリをインストール"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"外部ディスプレイにミラーリングしますか?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ディスプレイを有効にする"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"マイクとカメラ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"最近のアプリの使用状況"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"最近のアクセスを表示"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index e0aa8ca..4d3f4c7 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ქვემოთ გადატანა"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"მარცხნივ გადატანა"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"მარჯვნივ გადატანა"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"გადიდების გადართვა"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"გაადიდეთ სრულ ეკრანზე"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ეკრანის ნაწილის გადიდება"</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 917383b..0e54c22 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Төмен қарай жылжыту"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Солға жылжыту"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Оңға жылжыту"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Ұлғайту режиміне ауыстырғыш"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Толық экранды ұлғайту"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Экранның бөлігін ұлғайту"</string>
@@ -927,7 +935,7 @@
     <string name="controls_favorite_load_none" msgid="7687593026725357775">"Үйлесімді басқару элементтері қолжетімді емес."</string>
     <string name="controls_favorite_other_zone_header" msgid="9089613266575525252">"Басқа"</string>
     <string name="controls_dialog_title" msgid="2343565267424406202">"Құрылғы басқару элементтеріне қосу"</string>
-    <string name="controls_dialog_ok" msgid="2770230012857881822">"Енгізу"</string>
+    <string name="controls_dialog_ok" msgid="2770230012857881822">"Қосу"</string>
     <string name="controls_dialog_remove" msgid="3775288002711561936">"Жою"</string>
     <string name="controls_dialog_message" msgid="342066938390663844">"<xliff:g id="APP">%s</xliff:g> ұсынған"</string>
     <string name="controls_tile_locked" msgid="731547768182831938">"Құрылғы құлыпталды."</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant қосулы."</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Параметрлерден әдепкі жазба қолданбасын орнатыңыз."</string>
     <string name="install_app" msgid="5066668100199613936">"Қолданбаны орнату"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Сыртқы экран арқылы да көрсету керек пе?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Дисплейді қосу"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон және камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Соңғы рет қолданбаның датчикті пайдалануы"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Соңғы рет пайдаланғандар"</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 92c2c1b..564af36 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ផ្លាស់ទី​ចុះ​ក្រោម"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ផ្លាស់ទី​ទៅ​ឆ្វេង"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ផ្លាស់ទីទៅ​ស្តាំ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ប៊ូតុងបិទបើកការ​ពង្រីក"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ពង្រីក​ពេញអេក្រង់"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ពង្រីក​ផ្នែកនៃ​អេក្រង់"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"ភាពប្រុងប្រៀប​របស់ Google Assistant ត្រូវបានបើក"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"កំណត់កម្មវិធីកំណត់ចំណាំលំនាំដើមនៅក្នុងការកំណត់"</string>
     <string name="install_app" msgid="5066668100199613936">"ដំឡើង​កម្មវិធី"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"បញ្ចាំងទៅ​ឧបករណ៍បញ្ចាំង​ខាងក្រៅឬ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"បើក​ឧបករណ៍បញ្ចាំង"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"មីក្រូហ្វូន និងកាមេរ៉ា"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ការប្រើប្រាស់កម្មវិធីថ្មីៗនេះ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"មើលការចូលប្រើនាពេលថ្មីៗនេះ"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 6c0f833..6516213 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -232,7 +232,7 @@
     <string name="data_usage_disabled_dialog_mobile_title" msgid="2286843518689837719">"ಮೊಬೈಲ್ ಡೇಟಾವನ್ನು ವಿರಾಮಗೊಳಿಸಲಾಗಿದೆ"</string>
     <string name="data_usage_disabled_dialog_title" msgid="9131615296036724838">"ಡೇಟಾ ವಿರಾಮಗೊಳಿಸಲಾಗಿದೆ"</string>
     <string name="data_usage_disabled_dialog" msgid="7933201635215099780">"ಡೇಟಾ ಬಳಕೆಯು ನೀವು ಹೊಂದಿಸಿರುವ ಮಿತಿಯನ್ನು ತಲುಪಿದೆ. ಹೀಗಾಗಿ ನೀವು ಈಗ ಮೊಬೈಲ್ ಡೇಟಾ ಬಳಸುತ್ತಿಲ್ಲ.\n\nನೀವು ಮುಂದುವರಿದರೆ, ಡೇಟಾ ಬಳಕೆಗೆ ಶುಲ್ಕ ತೆರಬೇಕಾಗಬಹುದು."</string>
-    <string name="data_usage_disabled_dialog_enable" msgid="2796648546086408937">"ಮುಂದುವರಿಸು"</string>
+    <string name="data_usage_disabled_dialog_enable" msgid="2796648546086408937">"ಮುಂದುವರಿಸಿ"</string>
     <string name="accessibility_location_active" msgid="2845747916764660369">"ಸ್ಥಳ ವಿನಂತಿಗಳು ಸಕ್ರಿಯವಾಗಿವೆ"</string>
     <string name="accessibility_sensors_off_active" msgid="2619725434618911551">"ಸೆನ್ಸರ್‌ಗಳು ಆಫ್ ಆಗಿವೆ"</string>
     <string name="accessibility_clear_all" msgid="970525598287244592">"ಎಲ್ಲಾ ಅಧಿಸೂಚನೆಗಳನ್ನು ತೆರವುಗೊಳಿಸು."</string>
@@ -504,7 +504,7 @@
     <string name="screen_pinning_description_gestural" msgid="7246323931831232068">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಮೇಲೆ ಸ್ವೈಪ್ ಮಾಡಿ ಮತ್ತು ಅನ್‌ಪಿನ್ ಮಾಡಲು ಹೋಲ್ಡ್ ಮಾಡಿ."</string>
     <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಅನ್‌ಪಿನ್ ಮಾಡಲು ಅವಲೋಕನವನ್ನು ಸ್ಪರ್ಶಿಸಿ ಮತ್ತು ಹೋಲ್ಡ್ ಮಾಡಿ."</string>
     <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"ನೀವು ಅನ್‌ಪಿನ್ ಮಾಡುವವರೆಗೆ ಅದನ್ನು ವೀಕ್ಷಣೆಯಲ್ಲಿಡುತ್ತದೆ. ಅನ್‌ಪಿನ್ ಮಾಡಲು ಮುಖಪುಟವನ್ನು ಸ್ಪರ್ಶಿಸಿ ಮತ್ತು ಒತ್ತಿಹಿಡಿಯಿರಿ."</string>
-    <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"ವೈಯಕ್ತಿಕ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಬಹುದು (ಉದಾ, ಸಂಪರ್ಕಗಳು ಮತ್ತು ಇಮೇಲ್ ವಿಷಯ)."</string>
+    <string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"ವೈಯಕ್ತಿಕ ಡೇಟಾವನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಬಹುದು(ಉದಾ, ಸಂಪರ್ಕಗಳು ಮತ್ತು ಇಮೇಲ್ ಕಂಟೆಂಟ್‍)."</string>
     <string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"ಪಿನ್ ಮಾಡಲಾದ ಆ್ಯಪ್ ಇತರ ಆ್ಯಪ್‌ಗಳನ್ನು ತೆರೆಯಬಹುದು."</string>
     <string name="screen_pinning_toast" msgid="8177286912533744328">"ಈ ಆ್ಯಪ್ ಅನ್ನು ಅನ್‌‌ಪಿನ್ ಮಾಡಲು, ಹಿಂದಕ್ಕೆ ಮತ್ತು ಸಮಗ್ರ ನೋಟ ಬಟನ್‌ಗಳನ್ನು ಸ್ಪರ್ಶಿಸಿ &amp; ಒತ್ತಿಹಿಡಿಯಿರಿ"</string>
     <string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"ಈ ಆ್ಯಪ್ ಅನ್ನು ಅನ್‌ಪಿನ್ ಮಾಡಲು, ಹಿಂದಕ್ಕೆ ಮತ್ತು ಮುಖಪುಟ ಬಟನ್‌ಗಳನ್ನು ಸ್ಪರ್ಶಿಸಿ &amp; ಒತ್ತಿಹಿಡಿಯಿರಿ"</string>
@@ -651,7 +651,7 @@
     <string name="keyboard_shortcut_group_system_home" msgid="7465138628692109907">"ಮುಖಪುಟ"</string>
     <string name="keyboard_shortcut_group_system_recents" msgid="8628108256824616927">"ಇತ್ತೀಚಿನವುಗಳು"</string>
     <string name="keyboard_shortcut_group_system_back" msgid="1055709713218453863">"ಹಿಂದೆ"</string>
-    <string name="keyboard_shortcut_group_system_notifications" msgid="3615971650562485878">"ಅಧಿಸೂಚನೆಗಳು"</string>
+    <string name="keyboard_shortcut_group_system_notifications" msgid="3615971650562485878">"ನೋಟಿಫಿಕೇಶನ್‌ಗಳು"</string>
     <string name="keyboard_shortcut_group_system_shortcuts_helper" msgid="4856808328618265589">"ಕೀಬೋರ್ಡ್ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು"</string>
     <string name="keyboard_shortcut_group_system_switch_input" msgid="952555530383268166">"ಕೀಬೋರ್ಡ್‌ ಲೇಔಟ್‌ ಬದಲಾಯಿಸಿ"</string>
     <string name="keyboard_shortcut_clear_text" msgid="4679927133259287577">"ಪಠ್ಯ ತೆರವುಗೊಳಿಸಿ"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ಕೆಳಗೆ ಸರಿಸಿ"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ಎಡಕ್ಕೆ ಸರಿಸಿ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ಬಲಕ್ಕೆ ಸರಿಸಿ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ಝೂಮ್ ಮಾಡುವ ಸ್ವಿಚ್"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ಪೂರ್ಣ ಸ್ಕ್ರೀನ್‌ ಅನ್ನು ಹಿಗ್ಗಿಸಿ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ಸ್ಕ್ರೀನ್‌ನ ಅರ್ಧಭಾಗವನ್ನು ಝೂಮ್ ಮಾಡಿ"</string>
@@ -1129,7 +1137,7 @@
     <string name="bt_le_audio_broadcast_dialog_unknown_name" msgid="3791472237793443044">"ಅಪರಿಚಿತ"</string>
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
-    <string name="log_access_confirmation_title" msgid="4843557604739943395">"ಎಲ್ಲಾ ಸಾಧನದ ಲಾಗ್‌ಗಳನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಲು <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> ಗೆ ಅನುಮತಿಸುವುದೇ?"</string>
+    <string name="log_access_confirmation_title" msgid="4843557604739943395">"ಎಲ್ಲಾ ಸಾಧನದ ಲಾಗ್‌ಗಳನ್ನು ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಲು <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> ಗೆ ಅನುಮತಿಸಬೇಕೆ?"</string>
     <string name="log_access_confirmation_allow" msgid="752147861593202968">"ಒಂದು ಬಾರಿಯ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸಿ"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"ಅನುಮತಿಸಬೇಡಿ"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿನ ಕಾರ್ಯಾಚರಣೆಗಳನ್ನು ಸಾಧನದ ಲಾಗ್‌ಗಳು ರೆಕಾರ್ಡ್ ಮಾಡುತ್ತವೆ. ಸಮಸ್ಯೆಗಳನ್ನು ಪತ್ತೆಹಚ್ಚಲು ಮತ್ತು ಪರಿಹರಿಸಲು ಆ್ಯಪ್‌ಗಳು ಈ ಲಾಗ್ ಅನ್ನು ಬಳಸಬಹುದು.\n\nಕೆಲವು ಲಾಗ್‌ಗಳು ಸೂಕ್ಷ್ಮ ಮಾಹಿತಿಯನ್ನು ಒಳಗೊಂಡಿರಬಹುದು, ಆದ್ದರಿಂದ ನಿಮ್ಮ ವಿಶ್ವಾಸಾರ್ಹ ಆ್ಯಪ್‌ಗಳಿಗೆ ಮಾತ್ರ ಸಾಧನದ ಎಲ್ಲಾ ಲಾಗ್‌ಗಳಿಗೆ ಪ್ರವೇಶವನ್ನು ಅನುಮತಿಸಿ. \n\nಎಲ್ಲಾ ಸಾಧನ ಲಾಗ್‌ಗಳನ್ನು ಪ್ರವೇಶಿಸಲು ನೀವು ಈ ಆ್ಯಪ್‌ಗೆ ಅನುಮತಿಸದಿದ್ದರೆ, ಅದು ಆಗಲೂ ತನ್ನದೇ ಆದ ಲಾಗ್‌ಗಳನ್ನು ಪ್ರವೇಶಿಸಬಹುದು. ನಿಮ್ಮ ಸಾಧನ ತಯಾರಕರಿಗೆ ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿನ ಕೆಲವು ಲಾಗ್‌ಗಳು ಅಥವಾ ಮಾಹಿತಿಯನ್ನು ಪ್ರವೇಶಿಸಲು ಈಗಲೂ ಸಾಧ್ಯವಾಗುತ್ತದೆ."</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ನಿಮ್ಮ ಮಾತನ್ನು ಆಲಿಸುತ್ತಿದೆ"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ ಡೀಫಾಲ್ಟ್ ಟಿಪ್ಪಣಿಗಳ ಆ್ಯಪ್ ಅನ್ನು ಸೆಟ್ ಮಾಡಿ"</string>
     <string name="install_app" msgid="5066668100199613936">"ಆ್ಯಪ್ ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಿ"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ಬಾಹ್ಯ ಡಿಸ್‌ಪ್ಲೇಗೆ ಪ್ರತಿಬಿಂಬಿಸಬೇಕೆ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ಡಿಸ್‌ಪ್ಲೇ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ಮೈಕ್ರೊಫೋನ್ ಮತ್ತು ಕ್ಯಾಮರಾ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ಇತ್ತೀಚಿನ ಆ್ಯಪ್ ಬಳಕೆ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ಇತ್ತೀಚಿನ ಆ್ಯಕ್ಸೆಸ್ ಅನ್ನು ನೋಡಿ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 491c4e4..62d6bd6 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"아래로 이동"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"왼쪽으로 이동"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"오른쪽으로 이동"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"확대 전환"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"전체 화면 확대"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"화면 일부 확대"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"어시스턴트가 대기 중임"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"설정에서 기본 메모 앱 설정"</string>
     <string name="install_app" msgid="5066668100199613936">"앱 설치"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"외부 디스플레이로 미러링하시겠습니까?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"디스플레이 사용 설정"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"마이크 및 카메라"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"최근 앱 사용"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"최근 액세스 보기"</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 77e4e9c..2eddca2 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Төмөн жылдыруу"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Солго жылдыруу"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Оңго жылдыруу"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Чоңойтуу режимине которулуу"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Толук экранда ачуу"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Экрандын бир бөлүгүн чоңойтуу"</string>
@@ -906,7 +914,7 @@
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# көзөмөл кошулду.}other{# көзөмөл кошулду.}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"Өчүрүлдү"</string>
     <string name="controls_panel_authorization_title" msgid="267429338785864842">"<xliff:g id="APPNAME">%s</xliff:g> кошулсунбу?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> бул жерде көрсөтүлө турган башкаруу элементтерин жана контентти тандай алат."</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> бул жерде көрүнө турган нерселерди тандайт."</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"<xliff:g id="APPNAME">%s</xliff:g> башкаруу элементтери өчүрүлсүнбү?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"Сүйүктүүлөргө кошулду"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"Сүйүктүүлөргө <xliff:g id="NUMBER">%d</xliff:g>-позицияга кошулду"</string>
@@ -1132,7 +1140,7 @@
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> колдонмосуна түзмөктөгү бардык таржымалдарды жеткиликтүү кыласызбы?"</string>
     <string name="log_access_confirmation_allow" msgid="752147861593202968">"Бир жолу жеткиликтүү кылуу"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"Тыюу салуу"</string>
-    <string name="log_access_confirmation_body" msgid="6883031912003112634">"Түзмөктө аткарылган бардык аракеттер түзмөктүн таржымалдарында сакталып калат. Колдонмолор бул таржымалдарды колдонуп, маселелерди оңдошот.\n\nАйрым таржымалдарда купуя маалымат болушу мүмкүн, андыктан ишенимдүү колдонмолорго гана түзмөктөгү бардык таржымалдарды пайдаланууга уруксат бериңиз. \n\nЭгер бул колдонмого түзмөктөгү бардык таржымалдарга кирүүгө тыюу салсаңыз, ал өзүнүн таржымалдарын пайдалана берет. Түзмөктү өндүрүүчү түзмөгүңүздөгү айрым таржымалдарды же маалыматты көрө берет."</string>
+    <string name="log_access_confirmation_body" msgid="6883031912003112634">"Түзмөктө жасалган аракеттердин баары таржымалдарда сакталат. Колдонмолор алардын жардамы менен мүмкүн болгон мүчүлүштүктөрдү таап, оңдоп турат.\n\nАйрым таржымалдарда купуя маалымат камтылышы мүмкүн болгондуктан, түзмөктөгү бардык таржымалдарды ишенимдүү колдонмолорго гана жеткиликтүү кылыңыз. \n\nЭгер бул колдонмого түзмөктөгү айрым таржымалдарды гана жеткиликтүү кылсаңыз, ал мурункудай эле өзүнүн таржымалдарын көрө берет. Түзмөгүңүздөгү айрым таржымалдар же нерселер анын өндүрүүчүсүнө көрүнүшү мүмкүн."</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Кеңири маалымат"</string>
     <string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"Кеңири маалымат: <xliff:g id="URL">%s</xliff:g>"</string>
     <string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"<xliff:g id="APPNAME">%1$s</xliff:g> ачуу"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Жардамчы иштетилди"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Параметрлерден демейки кыска жазуулар колдонмосун тууралаңыз"</string>
     <string name="install_app" msgid="5066668100199613936">"Колдонмону орнотуу"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Тышкы экранга чыгарасызбы?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Экранды иштетүү"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон жана камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Жакында колдонмолордо иштетилген"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Акыркы пайдалануусун көрүү"</string>
diff --git a/packages/SystemUI/res/values-land/config.xml b/packages/SystemUI/res/values-land/config.xml
index d800d49..85fb3ac 100644
--- a/packages/SystemUI/res/values-land/config.xml
+++ b/packages/SystemUI/res/values-land/config.xml
@@ -42,4 +42,8 @@
     <!-- Whether we use large screen shade header which takes only one row compared to QS header -->
     <bool name="config_use_large_screen_shade_header">true</bool>
 
+    <!-- Whether to force split shade.
+     For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+     TODO (b/293290851) - change this comment/resource when flag is enabled -->
+    <bool name="force_config_use_split_notification_shade">true</bool>
 </resources>
diff --git a/packages/SystemUI/res/values-land/dimens.xml b/packages/SystemUI/res/values-land/dimens.xml
index 0667cd8..259b9ad 100644
--- a/packages/SystemUI/res/values-land/dimens.xml
+++ b/packages/SystemUI/res/values-land/dimens.xml
@@ -88,4 +88,7 @@
          overlaid -->
     <dimen name="global_actions_button_size">72dp</dimen>
     <dimen name="global_actions_button_padding">26dp</dimen>
+
+    <dimen name="keyguard_indication_margin_bottom">8dp</dimen>
+    <dimen name="lock_icon_margin_bottom">24dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index ec17441..3f3cc27 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ຍ້າຍລົງ"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ຍ້າຍໄປຊ້າຍ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ຍ້າຍໄປຂວາ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ສະຫຼັບການຂະຫຍາຍ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ຂະຫຍາຍເຕັມຈໍ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ຂະຫຍາຍບາງສ່ວນຂອງໜ້າຈໍ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"ການເອີ້ນໃຊ້ຜູ້ຊ່ວຍເປີດຢູ່"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ຕັ້ງຄ່າແອັບຈົດບັນທຶກເລີ່ມຕົ້ນໃນການຕັ້ງຄ່າ"</string>
     <string name="install_app" msgid="5066668100199613936">"ຕິດຕັ້ງແອັບ"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ສາຍໃສ່ຈໍສະແດງຜົນພາຍນອກບໍ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ເປີດການນຳໃຊ້ຈໍສະແດງຜົນ"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ໄມໂຄຣໂຟນ ແລະ ກ້ອງຖ່າຍຮູບ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ການໃຊ້ແອັບຫຼ້າສຸດ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ເບິ່ງສິດເຂົ້າເຖິງຫຼ້າສຸດ"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index e418e18..808c732 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Perkelti žemyn"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Perkelti kairėn"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Perkelti dešinėn"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Didinimo jungiklis"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Viso ekrano didinimas"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Didinti ekrano dalį"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Padėjėjas klauso"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nustatykite numatytąją užrašų programą Nustatymuose"</string>
     <string name="install_app" msgid="5066668100199613936">"Įdiegti programą"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Bendrinti ekrano vaizdą išoriniame ekrane?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Įgalinti ekraną"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofonas ir fotoaparatas"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Pastarasis programos naudojimas"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Žr. pastarąją prieigą"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 4b5fea3..52ccc16 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Pārvietot uz leju"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Pārvietot pa kreisi"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Pārvietot pa labi"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Palielinājuma slēdzis"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Palielināt visu ekrānu"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Palielināt ekrāna daļu"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistents klausās"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Iestatījumos iestatiet noklusējuma piezīmju lietotni."</string>
     <string name="install_app" msgid="5066668100199613936">"Instalēt lietotni"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vai spoguļot ārējā displejā?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Iespējot displeju"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofons un kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nesen izmantoja lietotnes"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Skatīt neseno piekļuvi"</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 80aa943..7d218ba 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -299,13 +299,13 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Работни апликации"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Паузирано"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"Ноќно светло"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Вклуч. на зајдисонце"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"На зајдисонце"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"До изгрејсонце"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Вклучување: <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"До <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Темна тема"</string>
     <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Штедач на батерија"</string>
-    <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"Вклуч. на зајдисонце"</string>
+    <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"На зајдисонце"</string>
     <string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"До изгрејсонце"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"Се вклучува во <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_dark_mode_secondary_label_until" msgid="2289774641256492437">"До <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Премести надолу"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Премести налево"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Премести надесно"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Прекинувач за зголемување"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Зголемете го целиот екран"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Зголемувајте дел од екранот"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Вниманието на „Помошникот“ е вклучено"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Поставете стандардна апликација за белешки во „Поставки“"</string>
     <string name="install_app" msgid="5066668100199613936">"Инсталирајте ја апликацијата"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Да се синхронизира на надворешниот екран?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Овозможи екран"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Неодамнешно користење на апликација"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Видете го скорешниот пристап"</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 021607d..b5feddb 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -299,7 +299,7 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"ഔദ്യോഗിക ആപ്പുകൾ"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"തൽക്കാലം നിർത്തി"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"നൈറ്റ് ലൈറ്റ്"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"സൂര്യാസ്‌തമയത്തിന്"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"അസ്‌തമയത്തിന്"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"സൂര്യോദയം വരെ"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g>-ന്"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> വരെ"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"താഴേക്ക് നീക്കുക"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ഇടത്തേക്ക് നീക്കുക"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"വലത്തേക്ക് നീക്കുക"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"മാഗ്നിഫിക്കേഷൻ മോഡ് മാറുക"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"സ്ക്രീൻ പൂർണ്ണമായും മാഗ്നിഫൈ ചെയ്യുക"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"സ്‌ക്രീനിന്റെ ഭാഗം മാഗ്നിഫൈ ചെയ്യുക"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant സജീവമാണ്"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ക്രമീകരണത്തിൽ കുറിപ്പുകൾക്കുള്ള ഡിഫോൾട്ട് ആപ്പ് സജ്ജീകരിക്കുക"</string>
     <string name="install_app" msgid="5066668100199613936">"ആപ്പ് ഇൻസ്റ്റാൾ ചെയ്യൂ"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ബാഹ്യ ഡിസ്‌പ്ലേയിലേക്ക് മിറർ ചെയ്യണോ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ഡിസ്‌പ്ലേ പ്രവർത്തനക്ഷമമാക്കുക"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"മൈക്രോഫോണും ക്യാമറയും"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"അടുത്തിടെയുള്ള ആപ്പ് ഉപയോഗം"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"അടുത്തിടെയുള്ള ആക്‌സസ് കാണുക"</string>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 9c7cf8b..4bf4f6a 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Доош зөөх"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Зүүн тийш зөөх"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Баруун тийш зөөх"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Томруулах сэлгэлт"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Бүтэн дэлгэцийг томруулах"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Дэлгэцийн нэг хэсгийг томруулах"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Туслах анхаарлаа хандуулж байна"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Тохиргоонд тэмдэглэлийн өгөгдмөл апп тохируулна уу"</string>
     <string name="install_app" msgid="5066668100199613936">"Аппыг суулгах"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Гадны дэлгэцэд тусгал үүсгэх үү?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Дэлгэцийг идэвхжүүлэх"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон болон камер"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Аппын саяхны ашиглалт"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Саяхны хандалтыг харах"</string>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 72c5cb6..eb30836 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"खाली हलवा"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"डावीकडे हलवा"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"उजवीकडे हलवा"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"मॅग्निफिकेशन स्विच"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"फुल स्क्रीन मॅग्निफाय करा"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रीनचा काही भाग मॅग्निफाय करा"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant चे लक्ष हे आता अ‍ॅक्टिव्ह आहे"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिंग्ज मध्ये डीफॉल्ट टिपा अ‍ॅप सेट करा"</string>
     <string name="install_app" msgid="5066668100199613936">"अ‍ॅप इंस्टॉल करा"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाह्य डिस्प्लेवर मिरर करायचे आहे का?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"डिस्प्ले सुरू करा"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"मायक्रोफोन आणि कॅमेरा"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"अलीकडील अ‍ॅप वापर"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"अलीकडील अ‍ॅक्सेस पहा"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index fd4e6b5..f57a665 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Alih ke bawah"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Alih ke kiri"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Alih ke kanan"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Suis pembesaran"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Besarkan skrin penuh"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Besarkan sebahagian skrin"</string>
@@ -906,7 +914,7 @@
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# kawalan ditambah.}other{# kawalan ditambah.}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"Dialih keluar"</string>
     <string name="controls_panel_authorization_title" msgid="267429338785864842">"Tambahkan <xliff:g id="APPNAME">%s</xliff:g>?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g>boleh memilih kawalan dan kandungan yang dipaparkan di sini."</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> boleh memilih kawalan dan kandungan yang dipaparkan di sini."</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Alih keluar kawalan untuk <xliff:g id="APPNAME">%s</xliff:g>?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"Digemari"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"Digemari, kedudukan <xliff:g id="NUMBER">%d</xliff:g>"</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 5d249de..bfb43ff 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -100,7 +100,7 @@
     <string name="screenrecord_title" msgid="4257171601439507792">"ဖန်သားပြင်ရိုက်ကူးစက်"</string>
     <string name="screenrecord_background_processing_label" msgid="7244617554884238898">"စကရင်ရိုက်ကူးမှု အပြီးသတ်နေသည်"</string>
     <string name="screenrecord_channel_description" msgid="4147077128486138351">"ဖန်သားပြင် ရိုက်ကူးသည့် စက်ရှင်အတွက် ဆက်တိုက်လာနေသော အကြောင်းကြားချက်"</string>
-    <string name="screenrecord_permission_dialog_title" msgid="303380743267672953">"စတင် ရိုက်သံဖမ်းမလား။"</string>
+    <string name="screenrecord_permission_dialog_title" msgid="303380743267672953">"ရိုက်သံဖမ်းခြင်း စတင်မလား။"</string>
     <string name="screenrecord_permission_dialog_warning_entire_screen" msgid="4152602778470789965">"ရုပ်သံဖမ်းနေစဉ် Android သည် သင့်ဖန်သားပြင်တွင် မြင်နိုင်သည့် (သို့) သင့်စက်တွင် ဖွင့်ထားသည့် အရာအားလုံးကို တွေ့နိုင်သည်။ စကားဝှက်၊ ငွေပေးချေမှု အချက်အလက်၊ မက်ဆေ့ဂျ်၊ ဓာတ်ပုံ၊ အသံနှင့် ဗီဒီယိုကဲ့သို့ အရာများကို ဂရုစိုက်ပါ။"</string>
     <string name="screenrecord_permission_dialog_warning_single_app" msgid="6818309727772146138">"အက်ပ်တစ်ခုကို ရုပ်သံဖမ်းနေစဉ် Android သည် ယင်းအက်ပ်တွင် ပြထားသည့် (သို့) ဖွင့်ထားသည့် အရာအားလုံးကို တွေ့နိုင်သည်။ ထို့ကြောင့် စကားဝှက်၊ ငွေပေးချေမှု အချက်အလက်၊ မက်ဆေ့ဂျ်၊ ဓာတ်ပုံ၊ အသံနှင့် ဗီဒီယိုကဲ့သို့ အရာများကို ဂရုစိုက်ပါ။"</string>
     <string name="screenrecord_permission_dialog_continue" msgid="5811122652514424967">"ရုပ်သံ စဖမ်းရန်"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"အောက်သို့ရွှေ့ရန်"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ဘယ်ဘက်သို့ရွှေ့ရန်"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ညာဘက်သို့ရွှေ့ရန်"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ချဲ့ရန် ခလုတ်"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ဖန်သားပြင်အပြည့် ချဲ့သည်"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ဖန်သားပြင် တစ်စိတ်တစ်ပိုင်းကို ချဲ့ပါ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant နားထောင်နေသည်"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ဆက်တင်များတွင် မူရင်းမှတ်စုများအက်ပ် သတ်မှတ်ပါ"</string>
     <string name="install_app" msgid="5066668100199613936">"အက်ပ် ထည့်သွင်းရန်"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ပြင်ပဖန်သားပြင်သို့ စကရင်ပွားမလား။"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ဖန်သားပြင်ကို ဖွင့်ရန်"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"မိုက်ခရိုဖုန်းနှင့် ကင်မရာ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"လတ်တလော အက်ပ်အသုံးပြုမှု"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"လတ်တလောအသုံးပြုမှုကို ကြည့်ရန်"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 1784675..6923671 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Flytt ned"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Flytt til venstre"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Flytt til høyre"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Forstørringsbryter"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Forstørr hele skjermen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Forstørr en del av skjermen"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistentoppmerksomhet er på"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Du kan velge en standardapp for notater i Innstillinger"</string>
     <string name="install_app" msgid="5066668100199613936">"Installer appen"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vil du speile til en ekstern skjerm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Slå på skjermen"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon og kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nylig appbruk"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se nylig tilgang"</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 94ac4b7..9347184 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -299,13 +299,13 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"कामसम्बन्धी एपहरू"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"पज गरिएको छ"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"Night Light"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"सूर्यास्तमा सक्रिय"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"सर्यास्त हुँदा अन हुन्छ"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"सूर्योदयसम्म"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"<xliff:g id="TIME">%s</xliff:g> मा सक्रिय"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"<xliff:g id="TIME">%s</xliff:g> सम्म"</string>
     <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"अँध्यारो थिम"</string>
     <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"ब्याट्री सेभर"</string>
-    <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"सूर्यास्तमा सक्रिय"</string>
+    <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"सर्यास्त हुँदा अन हुन्छ"</string>
     <string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"सूर्योदयसम्म"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at" msgid="5128758823486361279">"<xliff:g id="TIME">%s</xliff:g> मा सक्रिय"</string>
     <string name="quick_settings_dark_mode_secondary_label_until" msgid="2289774641256492437">"<xliff:g id="TIME">%s</xliff:g> सम्म"</string>
@@ -396,7 +396,7 @@
     <string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"हो, जारी राख्नुहोस्"</string>
     <string name="guest_notification_app_name" msgid="2110425506754205509">"अतिथि मोड"</string>
     <string name="guest_notification_session_active" msgid="5567273684713471450">"तपाईं अतिथि मोड चलाउँदै हुनुहुन्छ"</string>
-    <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"तपाईंले नयाँ प्रयोगकर्ता थप्नुभयो भने तपाईं अतिथि मोडबाट बाहिरिनु हुने छ र हालको अतिथि सत्रका सबै एप तथा डेटा मेटिने छ।"</string>
+    <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"तपाईंले नयाँ प्रयोगकर्ता हाल्नुभयो भने तपाईं अतिथि मोडबाट बाहिरिनु हुने छ र हालको अतिथि सत्रका सबै एप तथा डेटा मेटिने छ।"</string>
     <string name="user_limit_reached_title" msgid="2429229448830346057">"प्रयोगकर्ताको सीमा पुग्यो"</string>
     <string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{एउटा प्रोफाइल मात्र बनाउन सकिन्छ।}other{तपाईं बढीमा # जना प्रयोगकर्ता सामेल गराउन सक्नुहुन्छ।}}"</string>
     <string name="user_remove_user_title" msgid="9124124694835811874">"प्रयोगकर्ता हटाउन चाहनुहुन्छ?"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"तल सार्नुहोस्"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"बायाँ सार्नुहोस्"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"दायाँ सार्नुहोस्"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"म्याग्निफिकेसन स्विच"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"पूरै स्क्रिन जुम इन गर्नुहोस्"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"स्क्रिनको केही भाग म्याग्निफाइ गर्नुहोस्"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"सहायकले सुनिरहेको छ"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"सेटिङमा गई नोट बनाउने डिफल्ट एप तोक्नुहोस्"</string>
     <string name="install_app" msgid="5066668100199613936">"एप इन्स्टल गर्नुहोस्"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"बाह्य डिस्प्लेमा मिरर गर्ने हो?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"डिस्प्ले अन गर्नुहोस्"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"माइक्रोफोन तथा क्यामेरा"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"एपको हालसालैको प्रयोग"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"हालसालै एक्सेस गर्ने एप हेर्नुहोस्"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index f15eda0..a42337f 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Omlaag verplaatsen"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Naar links verplaatsen"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Naar rechts verplaatsen"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Vergrotingsschakelaar"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Volledig scherm vergroten"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Deel van het scherm vergroten"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent-aandacht aan"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standaard notitie-app instellen in Instellingen"</string>
     <string name="install_app" msgid="5066668100199613936">"App installeren"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Spiegelen naar extern scherm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Scherm aanzetten"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microfoon en camera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Recent app-gebruik"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Recente toegang bekijken"</string>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index 8e34628..24aef78 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ତଳକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ବାମକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ଡାହାଣକୁ ମୁଭ୍ କରନ୍ତୁ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ମ୍ୟାଗ୍ନିଫିକେସନ୍ ସ୍ୱିଚ୍"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ସମ୍ପୂର୍ଣ୍ଣ ସ୍କ୍ରିନକୁ ମ୍ୟାଗ୍ନିଫାଏ କରନ୍ତୁ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ସ୍କ୍ରିନର ଅଂଶ ମାଗ୍ନିଫାଏ କରନ୍ତୁ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ଆଟେନସନ ଚାଲୁ ଅଛି"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ସେଟିଂସରେ ଡିଫଲ୍ଟ ନୋଟ୍ସ ଆପ ସେଟ କରନ୍ତୁ"</string>
     <string name="install_app" msgid="5066668100199613936">"ଆପ ଇନଷ୍ଟଲ କରନ୍ତୁ"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ଏକ୍ସଟର୍ନଲ ଡିସପ୍ଲେକୁ ମିରର କରିବେ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ଡିସପ୍ଲେକୁ ସକ୍ଷମ କରନ୍ତୁ"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ମାଇକ୍ରୋଫୋନ ଏବଂ କେମେରା"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ବର୍ତ୍ତମାନର ଆପ ବ୍ୟବହାର"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ବର୍ତ୍ତମାନର ଆକ୍ସେସ ଦେଖନ୍ତୁ"</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 0861ca3..2ebc398 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ਹੇਠਾਂ ਲਿਜਾਓ"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ਖੱਬੇ ਲਿਜਾਓ"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ਸੱਜੇ ਲਿਜਾਓ"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"ਵੱਡਦਰਸ਼ੀਕਰਨ ਸਵਿੱਚ"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ਪੂਰੀ ਸਕ੍ਰੀਨ ਨੂੰ ਵੱਡਦਰਸ਼ੀ ਕਰੋ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ਸਕ੍ਰੀਨ ਦੇ ਹਿੱਸੇ ਨੂੰ ਵੱਡਾ ਕਰੋ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant ਧਿਆਨ ਸੁਵਿਧਾ ਨੂੰ ਚਾਲੂ ਹੈ"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਜਾ ਕੇ ਪੂਰਵ-ਨਿਰਧਾਰਿਤ ਨੋਟ ਐਪ ਨੂੰ ਸੈੱਟ ਕਰੋ"</string>
     <string name="install_app" msgid="5066668100199613936">"ਐਪ ਸਥਾਪਤ ਕਰੋ"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"ਕੀ ਬਾਹਰੀ ਡਿਸਪਲੇ \'ਤੇ ਪ੍ਰਤਿਬਿੰਬਿਤ ਕਰਨਾ ਹੈ?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ਡਿਸਪਲੇ ਚਾਲੂ ਕਰੋ"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ਮਾਈਕ੍ਰੋਫ਼ੋਨ ਅਤੇ ਕੈਮਰਾ"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ਹਾਲ ਹੀ ਵਿੱਚ ਵਰਤੀ ਗਈ ਐਪ"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ਹਾਲੀਆ ਪਹੁੰਚ ਦੇਖੋ"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index fff57db..b495a57 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Przesuń w dół"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Przesuń w lewo"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Przesuń w prawo"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Przełączanie powiększenia"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Powiększanie pełnego ekranu"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Powiększ część ekranu"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asystent jest aktywny"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ustaw domyślną aplikację do obsługi notatek w Ustawieniach"</string>
     <string name="install_app" msgid="5066668100199613936">"Zainstaluj aplikację"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Powielić na wyświetlaczu zewnętrznym?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Włącz wyświetlacz"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon i aparat"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Aplikacje korzystające w ostatnim czasie"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobacz ostatni dostęp"</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 431863e..abfc941 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -109,7 +109,7 @@
     <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sons do dispositivo, como música, chamadas e toques"</string>
     <string name="screenrecord_mic_label" msgid="2111264835791332350">"Microfone"</string>
     <string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Áudio e microfone do dispositivo"</string>
-    <string name="screenrecord_continue" msgid="4055347133700593164">"Início"</string>
+    <string name="screenrecord_continue" msgid="4055347133700593164">"Iniciar"</string>
     <string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Gravando tela"</string>
     <string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Gravando tela e áudio"</string>
     <string name="screenrecord_taps_label" msgid="1595690528298857649">"Mostrar toques na tela"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Chave de ampliação"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar toda a tela"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte da tela"</string>
@@ -906,7 +914,7 @@
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# controle adicionado.}one{# controle adicionado.}many{# de controles adicionados.}other{# controles adicionados.}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"Removido"</string>
     <string name="controls_panel_authorization_title" msgid="267429338785864842">"Adicionar o app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"O app <xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Remover controles do app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"Adicionado como favorito"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"Adicionado como favorito (posição <xliff:g id="NUMBER">%d</xliff:g>)"</string>
@@ -1130,7 +1138,7 @@
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"Permitir que o app <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> acesse todos os registros do dispositivo?"</string>
-    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir o acesso único"</string>
+    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir acesso único"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"Não permitir"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"Os registros do dispositivo gravam o que acontece nele. Os apps podem usar esses registros para encontrar e corrigir problemas.\n\nAlguns registros podem conter informações sensíveis, então autorize o acesso a eles apenas para os apps em que você confia. \n\nSe você não permitir que esse app acesse todos os registros do dispositivo, ele ainda vai poder acessar os dele. O fabricante do dispositivo também pode ter acesso a alguns registros ou informações."</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Saiba mais"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Atenção do Assistente ativada"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defina o app de notas padrão nas Configurações"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalar o app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Espelhar para a tela externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Ativar tela"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microfone e câmera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente do app"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consultar acessos recentes"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 1c0ff6b..85cd09a 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Interruptor de ampliação"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar o ecrã inteiro"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte do ecrã"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 431863e..abfc941 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -109,7 +109,7 @@
     <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sons do dispositivo, como música, chamadas e toques"</string>
     <string name="screenrecord_mic_label" msgid="2111264835791332350">"Microfone"</string>
     <string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Áudio e microfone do dispositivo"</string>
-    <string name="screenrecord_continue" msgid="4055347133700593164">"Início"</string>
+    <string name="screenrecord_continue" msgid="4055347133700593164">"Iniciar"</string>
     <string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Gravando tela"</string>
     <string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Gravando tela e áudio"</string>
     <string name="screenrecord_taps_label" msgid="1595690528298857649">"Mostrar toques na tela"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mover para baixo"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mover para a esquerda"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mover para a direita"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Chave de ampliação"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ampliar toda a tela"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ampliar parte da tela"</string>
@@ -906,7 +914,7 @@
     <string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# controle adicionado.}one{# controle adicionado.}many{# de controles adicionados.}other{# controles adicionados.}}"</string>
     <string name="controls_removed" msgid="3731789252222856959">"Removido"</string>
     <string name="controls_panel_authorization_title" msgid="267429338785864842">"Adicionar o app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
-    <string name="controls_panel_authorization" msgid="7045551688535104194">"<xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
+    <string name="controls_panel_authorization" msgid="7045551688535104194">"O app <xliff:g id="APPNAME">%s</xliff:g> pode escolher quais controles e conteúdos aparecem aqui."</string>
     <string name="controls_panel_remove_app_authorization" msgid="5920442084735364674">"Remover controles do app <xliff:g id="APPNAME">%s</xliff:g>?"</string>
     <string name="accessibility_control_favorite" msgid="8694362691985545985">"Adicionado como favorito"</string>
     <string name="accessibility_control_favorite_position" msgid="54220258048929221">"Adicionado como favorito (posição <xliff:g id="NUMBER">%d</xliff:g>)"</string>
@@ -1130,7 +1138,7 @@
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"Permitir que o app <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> acesse todos os registros do dispositivo?"</string>
-    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir o acesso único"</string>
+    <string name="log_access_confirmation_allow" msgid="752147861593202968">"Permitir acesso único"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"Não permitir"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"Os registros do dispositivo gravam o que acontece nele. Os apps podem usar esses registros para encontrar e corrigir problemas.\n\nAlguns registros podem conter informações sensíveis, então autorize o acesso a eles apenas para os apps em que você confia. \n\nSe você não permitir que esse app acesse todos os registros do dispositivo, ele ainda vai poder acessar os dele. O fabricante do dispositivo também pode ter acesso a alguns registros ou informações."</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"Saiba mais"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Atenção do Assistente ativada"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Defina o app de notas padrão nas Configurações"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalar o app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Espelhar para a tela externa?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Ativar tela"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microfone e câmera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Uso recente do app"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Consultar acessos recentes"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 513abc2..1f57dfe0 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Mută în jos"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Mută la stânga"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Mută spre dreapta"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Comutator de mărire"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Mărește tot ecranul"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Mărește o parte a ecranului"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistentul este atent"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setează aplicația prestabilită de note din Setări"</string>
     <string name="install_app" msgid="5066668100199613936">"Instalează aplicația"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Oglindești pe ecranul extern?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Activează ecranul"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Microfon și cameră"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilizare recentă în aplicații"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Vezi accesarea recentă"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 694ccdf..1ea9d34 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Переместить вниз"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Переместить влево"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Переместить вправо"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Переключатель режима увеличения"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увеличение всего экрана"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увеличить часть экрана"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Ассистент готов слушать"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Задайте стандартное приложение для заметок в настройках."</string>
     <string name="install_app" msgid="5066668100199613936">"Установить приложение"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Дублировать на внешний дисплей?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Включить дисплей"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Недавнее использование приложениями"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Посмотреть недавний доступ"</string>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 7ac474d..3f2978c 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"පහළට ගෙන යන්න"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"වමට ගෙන යන්න"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"දකුණට ගෙන යන්න"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"විශාලන ස්විචය"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"පූර්ණ තිරය විශාලනය කරන්න"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"තිරයේ කොටසක් විශාලනය කරන්න"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"සහයක අවධානය යොමු කරයි"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"සැකසීම් තුළ පෙරනිමි සටහන් යෙදුම සකසන්න"</string>
     <string name="install_app" msgid="5066668100199613936">"යෙදුම ස්ථාපනය කරන්න"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"බාහිර සංදර්ශකයට දර්පණය කරන්න ද?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"සංදර්ශකය සබල කරන්න"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"මයික්‍රොෆෝනය සහ කැමරාව"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"මෑත යෙදුම් භාවිතය"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"මෑත ප්‍රවේශය බලන්න"</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 92813d0..ba94b1a 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -299,7 +299,7 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Pracovné aplikácie"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Pozastavené"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"Nočný režim"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Zapne sa pri západe slnka"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Zap. pri záp. slnka"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"Do východu slnka"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Od <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Posunúť nadol"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Posunúť doľava"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Posunúť doprava"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Prepínač zväčenia"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zväčšenie celej obrazovky"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zväčšiť časť obrazovky"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Pozornosť Asistenta je zapnutá"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nastavte predvolenú aplikáciu na poznámky v Nastaveniach"</string>
     <string name="install_app" msgid="5066668100199613936">"Inštalovať aplikáciu"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Chcete zrkadliť na externú obrazovku?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Povoliť obrazovku"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofón a fotoaparát"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedávne využitie aplikácie"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Zobraziť nedávny prístup"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 0650354..8baa3b6 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Premakni navzdol"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Premakni levo"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Premakni desno"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Stikalo za povečavo"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Povečanje celotnega zaslona"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Povečava dela zaslona"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Zaznavanje pomočnika je vklopljeno."</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Nastavite privzeto aplikacijo za zapiske v nastavitvah."</string>
     <string name="install_app" msgid="5066668100199613936">"Namesti aplikacijo"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Želite zrcaliti v zunanji zaslon?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Omogoči zaslon"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon in fotoaparat"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Nedavna uporaba v aplikacijah"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Ogled nedavnih dostopov"</string>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 08d3c55..ec1a6cc 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -299,7 +299,7 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Aplikacionet e punës"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Vendosur në pauzë"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"Drita e natës"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Në perëndim të diellit"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Aktiv në perëndim"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"Deri në lindje të diellit"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Aktive në <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Deri në <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -382,7 +382,7 @@
     <string name="interruption_level_none_twoline" msgid="8579382742855486372">"Heshtje\ne plotë"</string>
     <string name="interruption_level_priority_twoline" msgid="8523482736582498083">"Vetëm\nme prioritet"</string>
     <string name="interruption_level_alarms_twoline" msgid="2045067991335708767">"Vetëm\nalarmet"</string>
-    <string name="keyguard_indication_charging_time_wireless" msgid="577856646141738675">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet me valë • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
+    <string name="keyguard_indication_charging_time_wireless" msgid="577856646141738675">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet në mënyrë wireless • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
     <string name="keyguard_indication_charging_time" msgid="6492711711891071502">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
     <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet shpejt • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
     <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet ngadalë • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Lëvize poshtë"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Lëvize majtas"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Lëvize djathtas"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Ndërrimi i zmadhimit"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Zmadho ekranin e plotë"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Zmadho një pjesë të ekranit"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Vëmendja e \"Asistentit\" aktive"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Cakto aplikacionin e parazgjedhur të shënimeve te \"Cilësimet\""</string>
     <string name="install_app" msgid="5066668100199613936">"Instalo aplikacionin"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Të pasqyrohet në ekranin e jashtëm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktivizo ekranin"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofoni dhe kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Përdorimi i fundit i aplikacionit"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Shiko qasjen e fundit"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 1856303..fc67121 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Померите надоле"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Померите налево"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Померите надесно"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Прелазак на други режим увећања"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Увећајте цео екран"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Увећајте део екрана"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Помоћник је у активном стању"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Подесите подразумевану апликацију за белешке у Подешавањима"</string>
     <string name="install_app" msgid="5066668100199613936">"Инсталирај апликацију"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Желите ли да пресликате на спољњи екран?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Омогући екран"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Микрофон и камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Недавно користила апликација"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Прикажи недавни приступ"</string>
@@ -1186,10 +1192,10 @@
     <string name="privacy_dialog_manage_permissions" msgid="2543451567190470413">"Управљај приступом"</string>
     <string name="privacy_dialog_active_call_usage" msgid="7858746847946397562">"Користи телефонски позив"</string>
     <string name="privacy_dialog_recent_call_usage" msgid="1214810644978167344">"Недавно коришћено у телефонском позиву"</string>
-    <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Користи <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+    <string name="privacy_dialog_active_app_usage" msgid="631997836335929880">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
     <string name="privacy_dialog_recent_app_usage" msgid="4883417856848222450">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
-    <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Користи <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
+    <string name="privacy_dialog_active_app_usage_1" msgid="9047570143069220911">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
     <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string>
-    <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Користи <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
+    <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
     <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 76b6f1d..98c8301 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Flytta nedåt"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Flytta åt vänster"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Flytta åt höger"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Förstoringsreglage"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Förstora hela skärmen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Förstora en del av skärmen"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistenten är aktiverad"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ställ in en standardapp för anteckningar i inställningarna"</string>
     <string name="install_app" msgid="5066668100199613936">"Installera appen"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Vill du spegla till extern skärm?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Aktivera skärm"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon och kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Senaste appanvändning"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Se senaste åtkomst"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 1713544..0bc5750 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Sogeza chini"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Sogeza kushoto"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Sogeza kulia"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Swichi ya ukuzaji"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Kuza skrini nzima"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Kuza sehemu ya skrini"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Programu ya Mratibu imewashwa"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Teua programu chaguomsingi ya madokezo katika Mipangilio"</string>
     <string name="install_app" msgid="5066668100199613936">"Sakinisha programu"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Ungependa kuonyesha kwenye skrini ya nje?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Washa skrini"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Maikrofoni na Kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Matumizi ya programu hivi majuzi"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Angalia ufikiaji wa majuzi"</string>
diff --git a/packages/SystemUI/res/values-sw600dp-land/config.xml b/packages/SystemUI/res/values-sw600dp-land/config.xml
index 588638f..e63229a 100644
--- a/packages/SystemUI/res/values-sw600dp-land/config.xml
+++ b/packages/SystemUI/res/values-sw600dp-land/config.xml
@@ -36,4 +36,8 @@
     <integer name="power_menu_lite_max_columns">3</integer>
     <integer name="power_menu_lite_max_rows">2</integer>
 
+    <!-- Whether to force split shade.
+    For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+    TODO (b/293290851) - change this comment/resource when flag is enabled -->
+    <bool name="force_config_use_split_notification_shade">false</bool>
 </resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 915dcdb..1e54fc9 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -80,10 +80,10 @@
 
     <dimen name="large_screen_shade_header_height">42dp</dimen>
     <!-- start padding is smaller to account for status icon margins coming from drawable itself -->
-    <dimen name="shade_header_system_icons_padding_start">3dp</dimen>
-    <dimen name="shade_header_system_icons_padding_end">4dp</dimen>
-    <dimen name="shade_header_system_icons_padding_top">2dp</dimen>
-    <dimen name="shade_header_system_icons_padding_bottom">2dp</dimen>
+    <dimen name="hover_system_icons_container_padding_start">3dp</dimen>
+    <dimen name="hover_system_icons_container_padding_end">4dp</dimen>
+    <dimen name="hover_system_icons_container_padding_top">2dp</dimen>
+    <dimen name="hover_system_icons_container_padding_bottom">2dp</dimen>
 
     <!-- Lockscreen shade transition values -->
     <dimen name="lockscreen_shade_transition_by_tap_distance">200dp</dimen>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index c0e4c3d..f3954d6 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"கீழே நகர்த்து"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"இடப்புறம் நகர்த்து"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"வலப்புறம் நகர்த்து"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"பெரிதாக்கல் ஸ்விட்ச்"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"முழுத்திரையைப் பெரிதாக்கும்"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"திரையின் ஒரு பகுதியைப் பெரிதாக்கும்"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"அசிஸ்டண்ட்டின் கவனம் இயக்கத்தில் உள்ளது"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"குறிப்பு எடுப்பதற்கான இயல்புநிலை ஆப்ஸை அமைப்புகளில் அமையுங்கள்"</string>
     <string name="install_app" msgid="5066668100199613936">"ஆப்ஸை நிறுவுங்கள்"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"வெளிப்புறக் காட்சிக்கு மிரர் செய்யவா?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"காட்சியை இயக்கு"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"மைக்ரோஃபோனும் கேமராவும்"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"சமீபத்திய ஆப்ஸ் பயன்பாடு"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"சமீபத்திய அணுகலைக் காட்டு"</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 22a329b..1d221f4 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"కిందకి పంపండి"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ఎడమవైపుగా జరపండి"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"కుడివైపుగా జరపండి"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"మ్యాగ్నిఫికేషన్ స్విచ్"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ఫుల్ స్క్రీన్‌ను మ్యాగ్నిఫై చేయండి"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"స్క్రీన్‌లో భాగాన్ని మ్యాగ్నిఫై చేయండి"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistant అటెన్షన్ ఆన్‌లో ఉంది"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"సెట్టింగ్‌లలో ఆటోమేటిక్‌గా ఉండేలా ఒక నోట్స్ యాప్‌ను సెట్ చేసుకోండి"</string>
     <string name="install_app" msgid="5066668100199613936">"యాప్‌ను ఇన్‌స్టాల్ చేయండి"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"బాహ్య డిస్‌ప్లే‌ను మిర్రర్ చేయాలా?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"డిస్‌ప్లే‌ను ఎనేబుల్ చేయండి"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"మైక్రోఫోన్ &amp; కెమెరా"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"ఇటీవలి యాప్ వినియోగం"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ఇటీవలి యాక్సెస్‌ను చూడండి"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 3887b9f..df4ab83 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"ย้ายลง"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"ย้ายไปทางซ้าย"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"ย้ายไปทางขวา"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"เปลี่ยนโหมดการขยาย"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"ขยายเป็นเต็มหน้าจอ"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"ขยายบางส่วนของหน้าจอ"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"การเรียกใช้งาน Assistant เปิดอยู่"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"กำหนดแอปการจดบันทึกเริ่มต้นในการตั้งค่า"</string>
     <string name="install_app" msgid="5066668100199613936">"ติดตั้งแอป"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"มิเรอร์ไปยังจอแสดงผลภายนอกไหม"</string>
+    <string name="enable_display" msgid="8308309634883321977">"เปิดใช้จอแสดงผล"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"ไมโครโฟนและกล้อง"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"การใช้แอปครั้งล่าสุด"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"ดูการเข้าถึงล่าสุด"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 2fdee72..a6535fd 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Ibaba"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Ilipat pakaliwa"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Ilipat pakanan"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Switch ng pag-magnify"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"I-magnify ang buong screen"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"I-magnify ang isang bahagi ng screen"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index b01fee1..a8a9ba4 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Aşağı taşı"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Sola taşı"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Sağa taşı"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Büyütme moduna geçin"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Tam ekran büyütme"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekranın bir parçasını büyütün"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Asistan dinliyor"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Ayarlar\'ı kullanarak varsayılan notlar ayarlayın"</string>
     <string name="install_app" msgid="5066668100199613936">"Uygulamayı yükle"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Harici ekrana yansıtılsın mı?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Ekranı etkinleştir"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon ve Kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Son uygulama kullanımı"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Son erişimi göster"</string>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index db34413..48c45ae 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -299,7 +299,7 @@
     <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Робочі додатки"</string>
     <string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"Призупинено"</string>
     <string name="quick_settings_night_display_label" msgid="8180030659141778180">"Нічний екран"</string>
-    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Вмикається ввечері"</string>
+    <string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Запуск увечері"</string>
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"До сходу сонця"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Вмикається о <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"До <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -754,7 +754,7 @@
     <string name="accessibility_qs_edit_remove_tile_action" msgid="775511891457193480">"вилучити опцію"</string>
     <string name="accessibility_qs_edit_tile_add_action" msgid="5051211910345301833">"додати опцію в кінець"</string>
     <string name="accessibility_qs_edit_tile_start_move" msgid="2009373939914517817">"Перемістити опцію"</string>
-    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Додати опцію"</string>
+    <string name="accessibility_qs_edit_tile_start_add" msgid="7560798153975555772">"Додати панель"</string>
     <string name="accessibility_qs_edit_tile_move_to_position" msgid="5198161544045930556">"Перемістити на позицію <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_qs_edit_tile_add_to_position" msgid="9029163095148274690">"Додати на позицію <xliff:g id="POSITION">%1$d</xliff:g>"</string>
     <string name="accessibility_qs_edit_position" msgid="4509277359815711830">"Позиція <xliff:g id="POSITION">%1$d</xliff:g>"</string>
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Перемістити вниз"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Перемістити ліворуч"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Перемістити праворуч"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Перемикач режиму збільшення"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Збільшення всього екрана"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Збільшити частину екрана"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Асистента активовано"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Призначте стандартний додаток для нотаток у налаштуваннях"</string>
     <string name="install_app" msgid="5066668100199613936">"Установити додаток"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Дублювати на зовнішньому екрані?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Увімкнути екран"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Мікрофон і камера"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Нещодавнє використання додатками"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Переглянути нещодавній доступ"</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 8115e2e..de38ca1 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"نیچے منتقل کریں"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"بائیں منتقل کریں"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"دائیں منتقل کریں"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"میگنیفکیشن پر سوئچ کریں"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"فُل اسکرین کو بڑا کریں"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"اسکرین کا حصہ بڑا کریں"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"اسسٹنٹ کی توجہ آن ہے"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"ترتیبات میں ڈیفالٹ نوٹس ایپ سیٹ کریں"</string>
     <string name="install_app" msgid="5066668100199613936">"ایپ انسٹال کریں"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"بیرونی ڈسپلے پر مرر کریں؟"</string>
+    <string name="enable_display" msgid="8308309634883321977">"ڈسپلے کو فعال کریں"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"مائیکروفون اور کیمرا"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"حالیہ ایپ کا استعمال"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"حالیہ رسائی دیکھیں"</string>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 30e0618..e5703b2 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Pastga siljitish"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Chapga siljitish"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Oʻngga siljitish"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Kattalashtirish rejimini almashtirish"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Ekranni toʻliq kattalashtirish"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Ekran qismini kattalashtirish"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Assistent diqqati yoniq"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Standart qaydlar ilovasini Sozlamalar orqali tanlang"</string>
     <string name="install_app" msgid="5066668100199613936">"Ilovani oʻrnatish"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Tashqi displeyda aks ettirilsinmi?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Displeyni yoqish"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Mikrofon va kamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Ilovadan oxirgi foydalanish"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Oxirgi ruxsatni koʻrish"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index f4c62a5..f022aea 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Di chuyển xuống"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Di chuyển sang trái"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Di chuyển sang phải"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Nút chuyển phóng to"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Phóng to toàn màn hình"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Phóng to một phần màn hình"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Trợ lý đang bật"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Đặt ứng dụng ghi chú mặc định trong phần Cài đặt"</string>
     <string name="install_app" msgid="5066668100199613936">"Cài đặt ứng dụng"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Đồng bộ hoá hai chiều sang màn hình ngoài?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Bật màn hình"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Micrô và máy ảnh"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Hoạt động sử dụng gần đây của ứng dụng"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Xem hoạt động truy cập gần đây"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index f3ade03..6876b1c 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"下移"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"左移"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"右移"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"切换放大模式"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大整个屏幕"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大部分屏幕"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"已开启 Google 助理感知功能"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在设置中设置默认记事应用"</string>
     <string name="install_app" msgid="5066668100199613936">"安装应用"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"镜像到外接显示屏?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"启用显示屏"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"麦克风和摄像头"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"近期应用对手机传感器的使用情况"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期使用情况"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index efc5671..31f2a85 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"向下移"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"向左移"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"向右移"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"放大開關"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大成個畫面"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大部分螢幕畫面"</string>
@@ -1130,7 +1138,7 @@
     <string name="dream_time_complication_12_hr_time_format" msgid="4691197486690291529">"h:mm"</string>
     <string name="dream_time_complication_24_hr_time_format" msgid="6248280719733640813">"kk:mm"</string>
     <string name="log_access_confirmation_title" msgid="4843557604739943395">"要允許「<xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g>」存取所有裝置記錄嗎?"</string>
-    <string name="log_access_confirmation_allow" msgid="752147861593202968">"允許存取一次"</string>
+    <string name="log_access_confirmation_allow" msgid="752147861593202968">"允許單次存取"</string>
     <string name="log_access_confirmation_deny" msgid="2389461495803585795">"不允許"</string>
     <string name="log_access_confirmation_body" msgid="6883031912003112634">"裝置記錄會記下裝置的活動。應用程式可透過這些記錄找出並修正問題。\n\n部分記錄可能包含敏感資料,因此請只允許信任的應用程式存取所有裝置記錄。\n\n如果不允許此應用程式存取所有裝置記錄,此應用程式仍能存取自己的記錄,且裝置製造商可能仍可存取裝置上的部分記錄或資料。"</string>
     <string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"瞭解詳情"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"「Google 助理」感應功能已開啟"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在「設定」中指定預設筆記應用程式"</string>
     <string name="install_app" msgid="5066668100199613936">"安裝應用程式"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"要鏡像投射至外部顯示屏嗎?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"啟用顯示屏"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"麥克風和相機"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"近期應用程式使用情況"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期存取記錄"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index af84a31..81ce876 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"向下移"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"向左移"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"向右移"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"切換放大模式"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"放大整個螢幕畫面"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"放大局部螢幕畫面"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Google 助理感知功能已開啟"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在「設定」中指定預設記事應用程式"</string>
     <string name="install_app" msgid="5066668100199613936">"安裝應用程式"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"要以鏡像方式投放至外部螢幕嗎?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"啟用螢幕"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"麥克風和相機"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"最近曾使用感應器的應用程式"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"查看近期存取記錄"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 11cf44b..63f32227 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -863,6 +863,14 @@
     <string name="accessibility_control_move_down" msgid="5390922476900974512">"Yehlisa"</string>
     <string name="accessibility_control_move_left" msgid="8156206978511401995">"Yisa kwesokunxele"</string>
     <string name="accessibility_control_move_right" msgid="8926821093629582888">"Yisa kwesokudla"</string>
+    <!-- no translation found for accessibility_control_increase_window_width (6992249470832493283) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_width (5740401560105929681) -->
+    <skip />
+    <!-- no translation found for accessibility_control_increase_window_height (2200966116612324260) -->
+    <skip />
+    <!-- no translation found for accessibility_control_decrease_window_height (2054479949445332761) -->
+    <skip />
     <string name="magnification_mode_switch_description" msgid="2698364322069934733">"Iswishi yokukhulisa"</string>
     <string name="magnification_mode_switch_state_full_screen" msgid="5229653514979530561">"Khulisa isikrini esigcwele"</string>
     <string name="magnification_mode_switch_state_window" msgid="8597100249594076965">"Khulisa ingxenye eyesikrini"</string>
@@ -1170,10 +1178,8 @@
     <string name="assistant_attention_content_description" msgid="6830215897604642875">"Ukunaka kwe-Assistant kuvuliwe"</string>
     <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Setha i-app yamanothi azenzakalelayo Kumsethingi"</string>
     <string name="install_app" msgid="5066668100199613936">"Faka i-app"</string>
-    <!-- no translation found for connected_display_dialog_start_mirroring (6237895789920854982) -->
-    <skip />
-    <!-- no translation found for enable_display (8308309634883321977) -->
-    <skip />
+    <string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Fanisa nesibonisi sangaphandle?"</string>
+    <string name="enable_display" msgid="8308309634883321977">"Nika amandla isibonisi"</string>
     <string name="privacy_dialog_title" msgid="7839968133469098311">"Imakrofoni Nekhamera"</string>
     <string name="privacy_dialog_summary" msgid="2458769652125995409">"Ukusetshenziswa kwakamuva kwe-app"</string>
     <string name="privacy_dialog_more_button" msgid="7610604080293562345">"Bona ukufinyelela kwakamuva"</string>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index c134806..c72f565 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -592,6 +592,11 @@
     <!-- Whether to use the split 2-column notification shade -->
     <bool name="config_use_split_notification_shade">false</bool>
 
+    <!-- Whether to force split shade.
+    For now, this value has effect only when flag lockscreen.enable_landscape is enabled.
+    TODO (b/293290851) - change this comment/resource when flag is enabled -->
+    <bool name="force_config_use_split_notification_shade">false</bool>
+
     <!-- Whether we use large screen shade header which takes only one row compared to QS header -->
     <bool name="config_use_large_screen_shade_header">false</bool>
 
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 62c4424..ae3138e 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -496,10 +496,10 @@
     <dimen name="large_screen_shade_header_min_height">@dimen/qs_header_row_min_height</dimen>
     <dimen name="large_screen_shade_header_left_padding">@dimen/qs_horizontal_margin</dimen>
     <dimen name="shade_header_system_icons_height">@dimen/large_screen_shade_header_min_height</dimen>
-    <dimen name="shade_header_system_icons_padding_start">0dp</dimen>
-    <dimen name="shade_header_system_icons_padding_end">0dp</dimen>
-    <dimen name="shade_header_system_icons_padding_top">0dp</dimen>
-    <dimen name="shade_header_system_icons_padding_bottom">0dp</dimen>
+    <dimen name="hover_system_icons_container_padding_start">0dp</dimen>
+    <dimen name="hover_system_icons_container_padding_end">0dp</dimen>
+    <dimen name="hover_system_icons_container_padding_top">0dp</dimen>
+    <dimen name="hover_system_icons_container_padding_bottom">0dp</dimen>
 
     <!-- The top margin of the panel that holds the list of notifications.
          On phones it's always 0dp but it's overridden in Car UI
@@ -1232,6 +1232,7 @@
     <dimen name="magnification_setting_image_button_open_in_full_padding_horizontal">28dp</dimen>
     <dimen name="magnification_setting_drag_corner_radius">28dp</dimen>
     <dimen name="magnification_setting_drag_size">56dp</dimen>
+    <fraction name="magnification_resize_window_size_amount">10%</fraction>
 
     <!-- Seekbar with icon buttons -->
     <dimen name="seekbar_icon_size">24dp</dimen>
diff --git a/packages/SystemUI/res/values/flags.xml b/packages/SystemUI/res/values/flags.xml
index 0d45422..0903463 100644
--- a/packages/SystemUI/res/values/flags.xml
+++ b/packages/SystemUI/res/values/flags.xml
@@ -38,9 +38,6 @@
          protected. -->
     <bool name="flag_battery_shield_icon">false</bool>
 
-    <!-- Whether face auth will immediately stop when the display state is OFF -->
-    <bool name="flag_stop_face_auth_on_display_off">true</bool>
-
     <!-- Whether we want to stop pulsing while running the face scanning animation -->
     <bool name="flag_stop_pulsing_face_scanning_animation">true</bool>
 </resources>
diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml
index e48901e..bd251bd 100644
--- a/packages/SystemUI/res/values/ids.xml
+++ b/packages/SystemUI/res/values/ids.xml
@@ -172,6 +172,10 @@
     <item type="id" name="accessibility_action_move_right"/>
     <item type="id" name="accessibility_action_move_up"/>
     <item type="id" name="accessibility_action_move_down"/>
+    <item type="id" name="accessibility_action_increase_window_width"/>
+    <item type="id" name="accessibility_action_decrease_window_width"/>
+    <item type="id" name="accessibility_action_increase_window_height"/>
+    <item type="id" name="accessibility_action_decrease_window_height"/>
 
     <!-- Accessibility actions for Accessibility floating menu. -->
     <item type="id" name="action_move_top_left"/>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 6840108..29c9767 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2403,6 +2403,16 @@
     <string name="accessibility_control_move_left">Move left</string>
     <!-- Action in accessibility menu to move the magnification window right. [CHAR LIMIT=30] -->
     <string name="accessibility_control_move_right">Move right</string>
+
+    <!-- Action in accessibility menu to increase the magnification window width. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_control_increase_window_width">Increase width of magnifier</string>
+    <!-- Action in accessibility menu to decrease the magnification window width. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_control_decrease_window_width">Decrease width of magnifier</string>
+    <!-- Action in accessibility menu to increase the magnification window height. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_control_increase_window_height">Increase height of magnifier</string>
+    <!-- Action in accessibility menu to decrease the magnification window height. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_control_decrease_window_height">Decrease height of magnifier</string>
+
     <!-- Content description for magnification mode switch. [CHAR LIMIT=NONE] -->
     <string name="magnification_mode_switch_description">Magnification switch</string>
     <!-- A11y state description for magnification mode switch that device is in full-screen mode. [CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/shared/Android.bp b/packages/SystemUI/shared/Android.bp
index a6517c1..0415341 100644
--- a/packages/SystemUI/shared/Android.bp
+++ b/packages/SystemUI/shared/Android.bp
@@ -46,6 +46,7 @@
         ":wm_shell_util-sources",
     ],
     static_libs: [
+        "BiometricsSharedLib",
         "PluginCoreLib",
         "SystemUIAnimationLib",
         "SystemUIPluginLib",
diff --git a/packages/SystemUI/shared/biometrics/Android.bp b/packages/SystemUI/shared/biometrics/Android.bp
new file mode 100644
index 0000000..2bd7d97
--- /dev/null
+++ b/packages/SystemUI/shared/biometrics/Android.bp
@@ -0,0 +1,20 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "frameworks_base_packages_SystemUI_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
+}
+
+android_library {
+    name: "BiometricsSharedLib",
+    srcs: [
+        "src/**/*.java",
+        "src/**/*.kt",
+    ],
+    resource_dirs: [
+        "res",
+    ],
+    min_sdk_version: "current",
+}
diff --git a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml b/packages/SystemUI/shared/biometrics/AndroidManifest.xml
similarity index 68%
copy from packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml
copy to packages/SystemUI/shared/biometrics/AndroidManifest.xml
index 1a52e93..861321b 100644
--- a/packages/SystemUI/res-keyguard/values-sw600dp-land/donottranslate.xml
+++ b/packages/SystemUI/shared/biometrics/AndroidManifest.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ~ Copyright (C) 2021 The Android Open Source Project
+  ~ Copyright (C) 2023 The Android Open Source Project
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
   ~ limitations under the License.
   -->
 
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- Don't use the smaller PIN pad keys if we have the screen space to support it. -->
-    <string name="num_pad_key_ratio">1.0</string>
-</resources>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.android.systemui.shared.biometrics">
+</manifest>
\ No newline at end of file
diff --git a/packages/SystemUI/shared/biometrics/res/values/strings.xml b/packages/SystemUI/shared/biometrics/res/values/strings.xml
new file mode 100644
index 0000000..c15c2b3
--- /dev/null
+++ b/packages/SystemUI/shared/biometrics/res/values/strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2023 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT 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">
+    <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+    <string name="udfps_accessibility_touch_hints_left"> Move left </string>
+    <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+    <string name="udfps_accessibility_touch_hints_down"> Move down </string>
+    <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+    <string name="udfps_accessibility_touch_hints_right"> Move right </string>
+    <!-- [CHAR LIMIT=NONE] Messages shown when users press outside udfps region during -->
+    <string name="udfps_accessibility_touch_hints_up"> Move up </string>
+</resources>
\ No newline at end of file
diff --git a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java
similarity index 91%
rename from packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java
index 31f014c..9574fba 100644
--- a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsUtils.java
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/UdfpsUtils.java
@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-package com.android.settingslib.udfps;
+package com.android.systemui.biometrics;
 
 import android.content.Context;
+import android.content.res.Resources;
 import android.graphics.Point;
 import android.util.DisplayUtils;
 import android.util.Log;
@@ -26,7 +27,8 @@
 import android.view.MotionEvent;
 import android.view.Surface;
 
-import com.android.settingslib.R;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
+import com.android.systemui.shared.biometrics.R;
 
 /** Utility class for working with udfps. */
 public class UdfpsUtils {
@@ -95,12 +97,13 @@
             return null;
         }
 
-        String[] touchHints = context.getResources().getStringArray(
-                R.array.udfps_accessibility_touch_hints);
-        if (touchHints.length != 4) {
-            Log.e(TAG, "expected exactly 4 touch hints, got " + touchHints.length + "?");
-            return null;
-        }
+        Resources resources = context.getResources();
+        String[] touchHints = new String[] {
+                resources.getString(R.string.udfps_accessibility_touch_hints_left),
+                resources.getString(R.string.udfps_accessibility_touch_hints_down),
+                resources.getString(R.string.udfps_accessibility_touch_hints_right),
+                resources.getString(R.string.udfps_accessibility_touch_hints_up),
+        };
 
         // Scale the coordinates to native resolution.
         float scale = udfpsOverlayParams.getScaleFactor();
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt
similarity index 89%
rename from packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt
index 1ca57e7..422f02f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/Utils.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/Utils.kt
@@ -47,12 +47,12 @@
     const val CREDENTIAL_PATTERN = 2
     const val CREDENTIAL_PASSWORD = 3
 
-    /** Base set of layout flags for fingerprint overlay widgets.  */
+    /** Base set of layout flags for fingerprint overlay widgets. */
     const val FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS =
-        (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-            or WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-            or WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-            or WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
+        (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN or
+            WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL or
+            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or
+            WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
 
     @JvmStatic
     fun dpToPixels(context: Context, dp: Float): Float {
@@ -61,9 +61,8 @@
     }
 
     /**
-     * Note: Talkback 14.0 has new rate-limitation design to reduce frequency
-     * of TYPE_WINDOW_CONTENT_CHANGED events to once every 30 seconds.
-     * (context: b/281765653#comment18)
+     * Note: Talkback 14.0 has new rate-limitation design to reduce frequency of
+     * TYPE_WINDOW_CONTENT_CHANGED events to once every 30 seconds. (context: b/281765653#comment18)
      * Using {@link View#announceForAccessibility} instead as workaround when sending events
      * exceeding this frequency is required.
      */
@@ -74,8 +73,7 @@
         }
         val event = AccessibilityEvent.obtain()
         event.eventType = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED
-        event.contentChangeTypes =
-            AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE
+        event.contentChangeTypes = AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE
         view.sendAccessibilityEventUnchecked(event)
         view.notifySubtreeAccessibilityStateChanged(
             view,
@@ -119,8 +117,8 @@
     @JvmStatic
     fun isSystem(context: Context, clientPackage: String?): Boolean {
         val hasPermission =
-            (context.checkCallingOrSelfPermission(Manifest.permission.USE_BIOMETRIC_INTERNAL)
-                == PackageManager.PERMISSION_GRANTED)
+            (context.checkCallingOrSelfPermission(Manifest.permission.USE_BIOMETRIC_INTERNAL) ==
+                PackageManager.PERMISSION_GRANTED)
         return hasPermission && "android" == clientPackage
     }
 
@@ -134,5 +132,5 @@
 
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(CREDENTIAL_PIN, CREDENTIAL_PATTERN, CREDENTIAL_PASSWORD)
-    internal annotation class CredentialType
-}
\ No newline at end of file
+    annotation class CredentialType
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt
index 274f58a..db46ccf 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricModalities.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModalities.kt
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.systemui.biometrics.domain.model
+package com.android.systemui.biometrics.shared.model
 
 import android.hardware.biometrics.SensorProperties
 import android.hardware.face.FaceSensorPropertiesInternal
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricModality.kt
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/BiometricUserInfo.kt
diff --git a/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
new file mode 100644
index 0000000..6082fb9
--- /dev/null
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.biometrics.shared.model
+
+import android.hardware.fingerprint.FingerprintSensorProperties
+
+/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
+enum class FingerprintSensorType {
+    UNKNOWN,
+    REAR,
+    UDFPS_ULTRASONIC,
+    UDFPS_OPTICAL,
+    POWER_BUTTON,
+    HOME_BUTTON
+}
+
+/** Convert [this] to corresponding [FingerprintSensorType] */
+fun Int.toSensorType(): FingerprintSensorType =
+    when (this) {
+        FingerprintSensorProperties.TYPE_UNKNOWN -> FingerprintSensorType.UNKNOWN
+        FingerprintSensorProperties.TYPE_REAR -> FingerprintSensorType.REAR
+        FingerprintSensorProperties.TYPE_UDFPS_ULTRASONIC -> FingerprintSensorType.UDFPS_ULTRASONIC
+        FingerprintSensorProperties.TYPE_UDFPS_OPTICAL -> FingerprintSensorType.UDFPS_OPTICAL
+        FingerprintSensorProperties.TYPE_POWER_BUTTON -> FingerprintSensorType.POWER_BUTTON
+        FingerprintSensorProperties.TYPE_HOME_BUTTON -> FingerprintSensorType.HOME_BUTTON
+        else -> throw IllegalArgumentException("Invalid SensorType value: $this")
+    }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/LockoutMode.kt
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
similarity index 83%
rename from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
index 30e865e..476daac 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/SensorStrength.kt
@@ -28,8 +28,8 @@
 /** Convert [this] to corresponding [SensorStrength] */
 fun Int.toSensorStrength(): SensorStrength =
     when (this) {
-        0 -> SensorStrength.CONVENIENCE
-        1 -> SensorStrength.WEAK
-        2 -> SensorStrength.STRONG
+        SensorProperties.STRENGTH_CONVENIENCE -> SensorStrength.CONVENIENCE
+        SensorProperties.STRENGTH_WEAK -> SensorStrength.WEAK
+        SensorProperties.STRENGTH_STRONG -> SensorStrength.STRONG
         else -> throw IllegalArgumentException("Invalid SensorStrength value: $this")
     }
diff --git a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt
similarity index 96%
rename from packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt
rename to packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt
index b386e5e..a9b4fe8 100644
--- a/packages/SettingsLib/src/com/android/settingslib/udfps/UdfpsOverlayParams.kt
+++ b/packages/SystemUI/shared/biometrics/src/com/android/systemui/biometrics/shared/model/UdfpsOverlayParams.kt
@@ -1,4 +1,4 @@
-package com.android.settingslib.udfps
+package com.android.systemui.biometrics.shared.model
 
 import android.graphics.Rect
 import android.view.Surface
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
index 77f6d03..eb20669 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java
@@ -61,8 +61,6 @@
             InteractionJankMonitor.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS;
     public static final int CUJ_OPEN_SEARCH_RESULT =
             InteractionJankMonitor.CUJ_LAUNCHER_OPEN_SEARCH_RESULT;
-    public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR =
-            InteractionJankMonitor.CUJ_SHADE_EXPAND_FROM_STATUS_BAR;
 
     @IntDef({
             CUJ_APP_LAUNCH_FROM_RECENTS,
@@ -79,7 +77,6 @@
             CUJ_CLOSE_ALL_APPS_SWIPE,
             CUJ_CLOSE_ALL_APPS_TO_HOME,
             CUJ_OPEN_SEARCH_RESULT,
-            CUJ_SHADE_EXPAND_FROM_STATUS_BAR,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface CujType {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
index a72d813..98f082f 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputView.java
@@ -64,8 +64,10 @@
         return false;
     }
 
-    /** Change motion layout constraint set based on orientation */
-    protected void updateConstraints(int orientation) {
+    /** Updates the keyguard view's constraints (single or split constraints).
+     *  Split constraints are only used for small landscape screens.
+     *  Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+    protected void updateConstraints(boolean useSplitBouncer) {
         //Unless overridden, never update constrains (keeping default portrait constraints)
     }
 
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
index 42dbc48..8738d33 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
@@ -16,6 +16,8 @@
 
 package com.android.keyguard;
 
+import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
+
 import android.annotation.CallSuper;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -257,6 +259,8 @@
                         mFalsingCollector, mKeyguardViewController,
                         mFeatureFlags);
             } else if (keyguardInputView instanceof KeyguardPINView) {
+                ((KeyguardPINView) keyguardInputView).setIsLockScreenLandscapeEnabled(
+                        mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE));
                 return new KeyguardPinViewController((KeyguardPINView) keyguardInputView,
                         mKeyguardUpdateMonitor, securityMode, mLockPatternUtils,
                         keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker,
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
index d9b7bde..bb3e759 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
@@ -16,12 +16,15 @@
 
 package com.android.keyguard;
 
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_APPEAR;
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_DISAPPEAR;
+import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
 import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_HALF_OPENED;
 import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
 
 import android.animation.ValueAnimator;
+import android.annotation.Nullable;
 import android.content.Context;
 import android.content.res.Configuration;
 import android.util.AttributeSet;
@@ -30,6 +33,7 @@
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 
+import androidx.constraintlayout.motion.widget.MotionLayout;
 import androidx.constraintlayout.widget.ConstraintLayout;
 import androidx.constraintlayout.widget.ConstraintSet;
 
@@ -46,12 +50,15 @@
     ValueAnimator mAppearAnimator = ValueAnimator.ofFloat(0f, 1f);
     private final DisappearAnimationUtils mDisappearAnimationUtils;
     private final DisappearAnimationUtils mDisappearAnimationUtilsLocked;
-    private ConstraintLayout mContainer;
+    @Nullable private MotionLayout mContainerMotionLayout;
+    @Nullable private ConstraintLayout mContainerConstraintLayout;
     private int mDisappearYTranslation;
     private View[][] mViews;
     private int mYTrans;
     private int mYTransOffset;
     private View mBouncerMessageArea;
+    private boolean mAlreadyUsingSplitBouncer = false;
+    private boolean mIsLockScreenLandscapeEnabled = false;
     @DevicePostureInt private int mLastDevicePosture = DEVICE_POSTURE_UNKNOWN;
     public static final long ANIMATION_DURATION = 650;
 
@@ -76,6 +83,22 @@
         mYTransOffset = getResources().getDimensionPixelSize(R.dimen.pin_view_trans_y_entry_offset);
     }
 
+    /** Use motion layout (new bouncer implementation) if LOCKSCREEN_ENABLE_LANDSCAPE flag is
+     *  enabled, instead of constraint layout (old bouncer implementation) */
+    public void setIsLockScreenLandscapeEnabled(boolean isLockScreenLandscapeEnabled) {
+        mIsLockScreenLandscapeEnabled = isLockScreenLandscapeEnabled;
+        findContainerLayout();
+    }
+
+    private void findContainerLayout() {
+        if (mIsLockScreenLandscapeEnabled) {
+            mContainerMotionLayout = findViewById(R.id.pin_container);
+        } else {
+            mContainerConstraintLayout = findViewById(R.id.pin_container);
+        }
+    }
+
+
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         updateMargins();
@@ -84,6 +107,17 @@
     void onDevicePostureChanged(@DevicePostureInt int posture) {
         if (mLastDevicePosture != posture) {
             mLastDevicePosture = posture;
+
+            if (mIsLockScreenLandscapeEnabled) {
+                boolean useSplitBouncerAfterFold =
+                        mLastDevicePosture == DEVICE_POSTURE_CLOSED
+                        &&  getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE;
+
+                if (mAlreadyUsingSplitBouncer != useSplitBouncerAfterFold) {
+                    updateConstraints(useSplitBouncerAfterFold);
+                }
+            }
+
             updateMargins();
         }
     }
@@ -135,18 +169,40 @@
         float halfOpenPercentage =
                 mContext.getResources().getFloat(R.dimen.half_opened_bouncer_height_ratio);
 
-        ConstraintSet cs = new ConstraintSet();
-        cs.clone(mContainer);
-        cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
-                mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
-        cs.applyTo(mContainer);
+        if (mIsLockScreenLandscapeEnabled) {
+            ConstraintSet cs = mContainerMotionLayout.getConstraintSet(R.id.single_constraints);
+            cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
+                    mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
+            cs.applyTo(mContainerMotionLayout);
+        } else {
+            ConstraintSet cs = new ConstraintSet();
+            cs.clone(mContainerConstraintLayout);
+            cs.setGuidelinePercent(R.id.pin_pad_top_guideline,
+                    mLastDevicePosture == DEVICE_POSTURE_HALF_OPENED ? halfOpenPercentage : 0.0f);
+            cs.applyTo(mContainerConstraintLayout);
+        }
+    }
+
+    /** Updates the keyguard view's constraints (single or split constraints).
+     *  Split constraints are only used for small landscape screens.
+     *  Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+    @Override
+    protected void updateConstraints(boolean useSplitBouncer) {
+        mAlreadyUsingSplitBouncer = useSplitBouncer;
+        if (useSplitBouncer) {
+            mContainerMotionLayout.jumpToState(R.id.split_constraints);
+            mContainerMotionLayout.setMaxWidth(Integer.MAX_VALUE);
+        } else {
+            mContainerMotionLayout.jumpToState(R.id.single_constraints);
+            mContainerMotionLayout.setMaxWidth(getResources()
+                    .getDimensionPixelSize(R.dimen.keyguard_security_width));
+        }
     }
 
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
 
-        mContainer = findViewById(R.id.pin_container);
         mBouncerMessageArea = findViewById(R.id.bouncer_message_area);
         mViews = new View[][]{
                 new View[]{
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
index a2d8c50..e9dd08c 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
@@ -17,7 +17,7 @@
 package com.android.keyguard;
 
 import static android.app.StatusBarManager.SESSION_KEYGUARD;
-
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_BIOMETRIC;
 import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_EXTENDED_ACCESS;
 import static com.android.keyguard.KeyguardSecurityContainer.BOUNCER_DISMISS_NONE_SECURITY;
@@ -74,6 +74,7 @@
 import com.android.systemui.biometrics.SideFpsController;
 import com.android.systemui.biometrics.SideFpsUiRequestSource;
 import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor;
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
 import com.android.systemui.classifier.FalsingA11yDelegate;
 import com.android.systemui.classifier.FalsingCollector;
 import com.android.systemui.flags.FeatureFlags;
@@ -94,6 +95,8 @@
 import com.android.systemui.util.kotlin.JavaAdapter;
 import com.android.systemui.util.settings.GlobalSettings;
 
+import dagger.Lazy;
+
 import java.io.File;
 import java.util.Optional;
 
@@ -201,7 +204,6 @@
     };
 
     private KeyguardSecurityCallback mKeyguardSecurityCallback = new KeyguardSecurityCallback() {
-
         @Override
         public void onUserInput() {
             mBouncerMessageInteractor.onPrimaryBouncerUserInput();
@@ -297,21 +299,23 @@
          */
         @Override
         public void finish(int targetUserId) {
-            // If there's a pending runnable because the user interacted with a widget
-            // and we're leaving keyguard, then run it.
-            boolean deferKeyguardDone = false;
-            mWillRunDismissFromKeyguard = false;
-            if (mDismissAction != null) {
-                deferKeyguardDone = mDismissAction.onDismiss();
-                mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard();
-                mDismissAction = null;
-                mCancelAction = null;
-            }
-            if (mViewMediatorCallback != null) {
-                if (deferKeyguardDone) {
-                    mViewMediatorCallback.keyguardDonePending(targetUserId);
-                } else {
-                    mViewMediatorCallback.keyguardDone(targetUserId);
+            if (!mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+                // If there's a pending runnable because the user interacted with a widget
+                // and we're leaving keyguard, then run it.
+                boolean deferKeyguardDone = false;
+                mWillRunDismissFromKeyguard = false;
+                if (mDismissAction != null) {
+                    deferKeyguardDone = mDismissAction.onDismiss();
+                    mWillRunDismissFromKeyguard = mDismissAction.willRunAnimationOnKeyguard();
+                    mDismissAction = null;
+                    mCancelAction = null;
+                }
+                if (mViewMediatorCallback != null) {
+                    if (deferKeyguardDone) {
+                        mViewMediatorCallback.keyguardDonePending(targetUserId);
+                    } else {
+                        mViewMediatorCallback.keyguardDone(targetUserId);
+                    }
                 }
             }
 
@@ -326,7 +330,6 @@
         }
     };
 
-
     private final SwipeListener mSwipeListener = new SwipeListener() {
         @Override
         public void onSwipeUp() {
@@ -373,7 +376,8 @@
                 public void onOrientationChanged(int orientation) {
                     if (mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE)
                             && getResources().getBoolean(R.bool.update_bouncer_constraints)) {
-                        mSecurityViewFlipperController.updateConstraints(orientation);
+                        boolean useSplitBouncer = orientation == ORIENTATION_LANDSCAPE;
+                        mSecurityViewFlipperController.updateConstraints(useSplitBouncer);
                     }
                 }
             };
@@ -416,6 +420,7 @@
     private final Provider<AuthenticationInteractor> mAuthenticationInteractor;
     private final Provider<JavaAdapter> mJavaAdapter;
     private final DeviceProvisionedController mDeviceProvisionedController;
+    private final Lazy<PrimaryBouncerInteractor> mPrimaryBouncerInteractor;
     @Nullable private Job mSceneTransitionCollectionJob;
 
     @Inject
@@ -448,6 +453,7 @@
             DeviceProvisionedController deviceProvisionedController,
             FaceAuthAccessibilityDelegate faceAuthAccessibilityDelegate,
             KeyguardTransitionInteractor keyguardTransitionInteractor,
+            Lazy<PrimaryBouncerInteractor> primaryBouncerInteractor,
             Provider<AuthenticationInteractor> authenticationInteractor
     ) {
         super(view);
@@ -482,6 +488,7 @@
         mJavaAdapter = javaAdapter;
         mKeyguardTransitionInteractor = keyguardTransitionInteractor;
         mDeviceProvisionedController = deviceProvisionedController;
+        mPrimaryBouncerInteractor = primaryBouncerInteractor;
     }
 
     @Override
@@ -618,6 +625,9 @@
      * @param action callback to be invoked when keyguard disappear animation completes.
      */
     public void setOnDismissAction(ActivityStarter.OnDismissAction action, Runnable cancelAction) {
+        if (mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            return;
+        }
         if (mCancelAction != null) {
             mCancelAction.run();
         }
@@ -820,7 +830,6 @@
      */
     public boolean showNextSecurityScreenOrFinish(boolean authenticated, int targetUserId,
             boolean bypassSecondaryLockScreen, SecurityMode expectedSecurityMode) {
-
         if (DEBUG) Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
         if (expectedSecurityMode != SecurityMode.Invalid
                 && expectedSecurityMode != getCurrentSecurityMode()) {
@@ -829,8 +838,8 @@
             return false;
         }
 
+        boolean authenticatedWithPrimaryAuth = false;
         boolean finish = false;
-        boolean primaryAuth = false;
         int eventSubtype = -1;
         BouncerUiEvent uiEvent = BouncerUiEvent.UNKNOWN;
         if (mUpdateMonitor.getUserHasTrust(targetUserId)) {
@@ -855,7 +864,7 @@
                 case Pattern:
                 case Password:
                 case PIN:
-                    primaryAuth = true;
+                    authenticatedWithPrimaryAuth = true;
                     finish = true;
                     eventSubtype = BOUNCER_DISMISS_PASSWORD;
                     uiEvent = BouncerUiEvent.BOUNCER_DISMISS_PASSWORD;
@@ -901,6 +910,17 @@
         if (uiEvent != BouncerUiEvent.UNKNOWN) {
             mUiEventLogger.log(uiEvent, getSessionId());
         }
+
+        if (mFeatureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            if (authenticatedWithPrimaryAuth) {
+                mPrimaryBouncerInteractor.get()
+                        .notifyKeyguardAuthenticatedPrimaryAuth(targetUserId);
+            } else if (finish) {
+                mPrimaryBouncerInteractor.get().notifyUserRequestedBouncerWhenAlreadyAuthenticated(
+                        targetUserId);
+            }
+        }
+
         if (finish) {
             mKeyguardSecurityCallback.finish(targetUserId);
         }
@@ -1058,12 +1078,15 @@
      * one side).
      */
     private boolean canUseOneHandedBouncer() {
-        if (!(mCurrentSecurityMode == SecurityMode.Pattern
-                || mCurrentSecurityMode == SecurityMode.PIN)) {
-            return false;
+        switch(mCurrentSecurityMode) {
+            case PIN:
+            case Pattern:
+            case SimPin:
+            case SimPuk:
+                return getResources().getBoolean(R.bool.can_use_one_handed_bouncer);
+            default:
+                return false;
         }
-
-        return getResources().getBoolean(R.bool.can_use_one_handed_bouncer);
     }
 
     private boolean canDisplayUserSwitcher() {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
index 891eb14..74f9006 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipper.java
@@ -83,11 +83,13 @@
         return "";
     }
 
-    /** Updates the keyguard view's constraints based on orientation */
-    public void updateConstraints(int orientation) {
+    /** Updates the keyguard view's constraints (single or split constraints).
+     *  Split constraints are only used for small landscape screens.
+     *  Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+    public void updateConstraints(boolean useSplitBouncer) {
         KeyguardInputView securityView = getSecurityView();
         if (securityView != null) {
-            securityView.updateConstraints(orientation);
+            securityView.updateConstraints(useSplitBouncer);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
index 74f0beb..4cc90c2 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityViewFlipperController.java
@@ -16,6 +16,7 @@
 
 package com.android.keyguard;
 
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
 
 import android.util.Log;
@@ -136,12 +137,14 @@
                         if (onViewInflatedListener != null) {
                             onViewInflatedListener.onViewInflated(childController);
 
-                            // Portrait constrains are default
+                            // Single bouncer constrains are default
                             if (mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE)
                                     &&
                                     getResources().getBoolean(R.bool.update_bouncer_constraints)) {
-                                // updateConstraints based on orientation (only on small screens)
-                                updateConstraints(getResources().getConfiguration().orientation);
+                                boolean useSplitBouncer =
+                                        getResources().getConfiguration().orientation
+                                                == ORIENTATION_LANDSCAPE;
+                                updateConstraints(useSplitBouncer);
                             }
                         }
                     });
@@ -152,7 +155,7 @@
         // TODO (b/297863911, b/297864907) - implement motion layout for other bouncers
         switch (securityMode) {
             case Pattern: return R.layout.keyguard_pattern_view;
-            case PIN: return R.layout.keyguard_pin_view;
+            case PIN: return R.layout.keyguard_pin_motion_layout;
             case Password: return R.layout.keyguard_password_view;
             case SimPin: return R.layout.keyguard_sim_pin_view;
             case SimPuk: return R.layout.keyguard_sim_puk_view;
@@ -173,9 +176,11 @@
         }
     }
 
-    /** Updates the keyguard view's constraints based on orientation */
-    public void updateConstraints(int orientation) {
-        mView.updateConstraints(orientation);
+    /** Updates the keyguard view's constraints (single or split constraints).
+     *  Split constraints are only used for small landscape screens.
+     *  Only called when flag LANDSCAPE_ENABLE_LOCKSCREEN is enabled. */
+    public void updateConstraints(boolean useSplitBouncer) {
+        mView.updateConstraints(useSplitBouncer);
     }
 
     /** Makes the supplied child visible if it is contained win this view, */
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
index 886a1b5..1fc88ab 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java
@@ -141,10 +141,10 @@
         // GSM 02.17 version 5.0.1, Section 5.6 PIN Management
         if ((entry.length() < 4) || (entry.length() > 8)) {
             // otherwise, display a message to the user, and don't submit.
-            mMessageAreaController.setMessage(
-                    com.android.systemui.R.string.kg_invalid_sim_pin_hint);
             mView.resetPasswordText(true /* animate */, true /* announce */);
             getKeyguardSecurityCallback().userActivity();
+            mMessageAreaController.setMessage(
+                    com.android.systemui.R.string.kg_invalid_sim_pin_hint);
             return;
         }
 
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 0ba6c05..e4bbd3a 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -35,7 +35,6 @@
 import static android.os.BatteryManager.BATTERY_STATUS_UNKNOWN;
 import static android.os.BatteryManager.CHARGING_POLICY_DEFAULT;
 import static android.os.PowerManager.WAKE_REASON_UNKNOWN;
-
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT;
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW;
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT;
@@ -161,8 +160,6 @@
 import com.android.systemui.dagger.qualifiers.Main;
 import com.android.systemui.dump.DumpManager;
 import com.android.systemui.dump.DumpsysTableLogger;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
 import com.android.systemui.keyguard.domain.interactor.FaceAuthenticationListener;
 import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor;
 import com.android.systemui.keyguard.shared.constants.TrustAgentUiEvent;
@@ -417,7 +414,6 @@
     private final ActiveUnlockConfig mActiveUnlockConfig;
     private final IDreamManager mDreamManager;
     private final TelephonyManager mTelephonyManager;
-    private final FeatureFlags mFeatureFlags;
     @Nullable
     private final FingerprintManager mFpm;
     @Nullable
@@ -2365,7 +2361,6 @@
             FaceWakeUpTriggersConfig faceWakeUpTriggersConfig,
             DevicePostureController devicePostureController,
             Optional<FingerprintInteractiveToAuthProvider> interactiveToAuthProvider,
-            FeatureFlags featureFlags,
             TaskStackChangeListeners taskStackChangeListeners,
             IActivityTaskManager activityTaskManagerService,
             DisplayTracker displayTracker) {
@@ -2400,7 +2395,6 @@
         mPackageManager = packageManager;
         mFpm = fingerprintManager;
         mFaceManager = faceManager;
-        mFeatureFlags = featureFlags;
         mActiveUnlockConfig.setKeyguardUpdateMonitor(this);
         mFaceAcquiredInfoIgnoreList = Arrays.stream(
                 mContext.getResources().getIntArray(
@@ -2417,9 +2411,7 @@
         mTaskStackChangeListeners = taskStackChangeListeners;
         mActivityTaskManager = activityTaskManagerService;
         mDisplayTracker = displayTracker;
-        if (mFeatureFlags.isEnabled(Flags.STOP_FACE_AUTH_ON_DISPLAY_OFF)) {
-            mDisplayTracker.addDisplayChangeCallback(mDisplayCallback, mainExecutor);
-        }
+        mDisplayTracker.addDisplayChangeCallback(mDisplayCallback, mainExecutor);
 
         mHandler = new Handler(mainLooper) {
             @Override
@@ -4205,21 +4197,19 @@
         @Override
         public void onTaskStackChangedBackground() {
             try {
-                if (mFeatureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
-                    RootTaskInfo standardTask = mActivityTaskManager.getRootTaskInfo(
-                            WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
-                    final boolean previousState = mAllowFingerprintOnCurrentOccludingActivity;
-                    mAllowFingerprintOnCurrentOccludingActivity =
-                            standardTask.topActivity != null
-                                    && !TextUtils.isEmpty(standardTask.topActivity.getPackageName())
-                                    && mAllowFingerprintOnOccludingActivitiesFromPackage.contains(
-                                            standardTask.topActivity.getPackageName())
-                                    && standardTask.visible;
-                    if (mAllowFingerprintOnCurrentOccludingActivity != previousState) {
-                        mLogger.allowFingerprintOnCurrentOccludingActivityChanged(
-                                mAllowFingerprintOnCurrentOccludingActivity);
-                        updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE);
-                    }
+                RootTaskInfo standardTask = mActivityTaskManager.getRootTaskInfo(
+                        WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD);
+                final boolean previousState = mAllowFingerprintOnCurrentOccludingActivity;
+                mAllowFingerprintOnCurrentOccludingActivity =
+                        standardTask.topActivity != null
+                                && !TextUtils.isEmpty(standardTask.topActivity.getPackageName())
+                                && mAllowFingerprintOnOccludingActivitiesFromPackage.contains(
+                                        standardTask.topActivity.getPackageName())
+                                && standardTask.visible;
+                if (mAllowFingerprintOnCurrentOccludingActivity != previousState) {
+                    mLogger.allowFingerprintOnCurrentOccludingActivityChanged(
+                            mAllowFingerprintOnCurrentOccludingActivity);
+                    updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE);
                 }
 
                 RootTaskInfo assistantTask = mActivityTaskManager.getRootTaskInfo(
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
index 3990b10..c64ae01 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java
@@ -17,6 +17,7 @@
 package com.android.keyguard;
 
 import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
+import static com.android.systemui.statusbar.StatusBarState.SHADE;
 
 import android.util.Property;
 import android.view.View;
@@ -124,7 +125,16 @@
                     true /* animate */);
             log("keyguardFadingAway transition w/ Y Aniamtion");
         } else if (statusBarState == KEYGUARD) {
-            if (keyguardFadingAway) {
+            // Sometimes, device will be unlocked and then locked very quickly.
+            // keyguardFadingAway hasn't been set to false cause unlock animation hasn't finished
+            // So we should not animate keyguard fading away in this case (when oldState is SHADE)
+            if (oldStatusBarState != SHADE) {
+                log("statusBarState == KEYGUARD && oldStatusBarState != SHADE");
+            } else {
+                log("statusBarState == KEYGUARD && oldStatusBarState == SHADE");
+            }
+
+            if (keyguardFadingAway && oldStatusBarState != SHADE) {
                 mKeyguardViewVisibilityAnimating = true;
                 AnimationProperties animProps = new AnimationProperties()
                         .setDelay(0)
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconView.java b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
index 1d37809..c522881 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconView.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
@@ -134,8 +134,6 @@
         mLockIcon.setPadding(mLockIconPadding, mLockIconPadding, mLockIconPadding,
                 mLockIconPadding);
 
-        // mSensorProps coordinates assume portrait mode which is OK b/c the keyguard is always in
-        // portrait.
         mSensorRect.set(mLockIconCenter.x - mRadius,
                 mLockIconCenter.y - mRadius,
                 mLockIconCenter.x + mRadius,
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index ab9b647..214b122 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -45,6 +45,7 @@
 import android.view.MotionEvent;
 import android.view.VelocityTracker;
 import android.view.View;
+import android.view.WindowInsets;
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.AccessibilityNodeInfo;
@@ -54,12 +55,12 @@
 import androidx.annotation.VisibleForTesting;
 import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
 
-import com.android.settingslib.udfps.UdfpsOverlayParams;
 import com.android.systemui.Dumpable;
 import com.android.systemui.R;
 import com.android.systemui.biometrics.AuthController;
 import com.android.systemui.biometrics.AuthRippleController;
 import com.android.systemui.biometrics.UdfpsController;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
 import com.android.systemui.dagger.SysUISingleton;
 import com.android.systemui.dagger.qualifiers.Main;
@@ -423,7 +424,13 @@
     private void updateConfiguration() {
         WindowManager windowManager = mContext.getSystemService(WindowManager.class);
         Rect bounds = windowManager.getCurrentWindowMetrics().getBounds();
+        WindowInsets insets = windowManager.getCurrentWindowMetrics().getWindowInsets();
         mWidthPixels = bounds.right;
+        if (mFeatureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)) {
+            // Assumed to be initially neglected as there are no left or right insets in portrait
+            // However, on landscape, these insets need to included when calculating the midpoint
+            mWidthPixels -= insets.getSystemWindowInsetLeft() + insets.getSystemWindowInsetRight();
+        }
         mHeightPixels = bounds.bottom;
         mBottomPaddingPx = mResources.getDimensionPixelSize(R.dimen.lock_icon_margin_bottom);
         mDefaultPaddingPx = mResources.getDimensionPixelSize(R.dimen.lock_icon_padding);
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
index 03ad132..7a8161e 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/SystemActions.java
@@ -17,7 +17,6 @@
 package com.android.systemui.accessibility;
 
 import static android.view.WindowManager.ScreenshotSource.SCREENSHOT_ACCESSIBILITY_ACTIONS;
-
 import static com.android.internal.accessibility.common.ShortcutConstants.CHOOSER_PACKAGE_NAME;
 
 import android.accessibilityservice.AccessibilityService;
@@ -57,8 +56,8 @@
 import com.android.systemui.shade.ShadeViewController;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
 import com.android.systemui.statusbar.phone.StatusBarWindowCallback;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
 import com.android.systemui.util.Assert;
 
 import dagger.Lazy;
@@ -186,8 +185,8 @@
     private final DisplayTracker mDisplayTracker;
     private Locale mLocale;
     private final AccessibilityManager mA11yManager;
-    private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
     private final NotificationShadeWindowController mNotificationShadeController;
+    private final KeyguardStateController mKeyguardStateController;
     private final ShadeController mShadeController;
     private final Lazy<ShadeViewController> mShadeViewController;
     private final StatusBarWindowCallback mNotificationShadeCallback;
@@ -197,13 +196,14 @@
     public SystemActions(Context context,
             UserTracker userTracker,
             NotificationShadeWindowController notificationShadeController,
+            KeyguardStateController keyguardStateController,
             ShadeController shadeController,
             Lazy<ShadeViewController> shadeViewController,
-            Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
             Optional<Recents> recentsOptional,
             DisplayTracker displayTracker) {
         mContext = context;
         mUserTracker = userTracker;
+        mKeyguardStateController = keyguardStateController;
         mShadeController = shadeController;
         mShadeViewController = shadeViewController;
         mRecentsOptional = recentsOptional;
@@ -219,7 +219,6 @@
                 (keyguardShowing, keyguardOccluded, keyguardGoingAway, bouncerShowing, mDozing,
                         panelExpanded, isDreaming) ->
                         registerOrUnregisterDismissNotificationShadeAction();
-        mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
     }
 
     @Override
@@ -307,8 +306,8 @@
         mA11yManager.registerSystemAction(actionBack, SYSTEM_ACTION_ID_BACK);
         mA11yManager.registerSystemAction(actionHome, SYSTEM_ACTION_ID_HOME);
         mA11yManager.registerSystemAction(actionRecents, SYSTEM_ACTION_ID_RECENTS);
-        if (mCentralSurfacesOptionalLazy.get().isPresent()) {
-            // These two actions require the CentralSurfaces instance.
+        if (mShadeController.isShadeEnabled()) {
+            // These two actions require the shade to be enabled.
             mA11yManager.registerSystemAction(actionNotifications, SYSTEM_ACTION_ID_NOTIFICATIONS);
             mA11yManager.registerSystemAction(actionQuickSettings, SYSTEM_ACTION_ID_QUICK_SETTINGS);
         }
@@ -329,13 +328,8 @@
     private void registerOrUnregisterDismissNotificationShadeAction() {
         Assert.isMainThread();
 
-        // Saving state in instance variable since this callback is called quite often to avoid
-        // binder calls
-        final Optional<CentralSurfaces> centralSurfacesOptional =
-                mCentralSurfacesOptionalLazy.get();
-        if (centralSurfacesOptional.isPresent()
-                && mShadeViewController.get().isPanelExpanded()
-                && !centralSurfacesOptional.get().isKeyguardShowing()) {
+        if (mShadeViewController.get().isPanelExpanded()
+                && !mKeyguardStateController.isShowing()) {
             if (!mDismissNotificationShadeActionRegistered) {
                 mA11yManager.registerSystemAction(
                         createRemoteAction(
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
index f1cebba..773241e 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
@@ -26,6 +26,7 @@
 
 import android.animation.ObjectAnimator;
 import android.animation.PropertyValuesHolder;
+import android.annotation.MainThread;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.UiContext;
@@ -719,6 +720,18 @@
     }
 
     /**
+     * Sets the window frame size with given width and height in pixels without changing the
+     * window center.
+     *
+     * @param width the window frame width in pixels
+     * @param height the window frame height in pixels.
+     */
+    @MainThread
+    private void setMagnificationFrameSize(int width, int height) {
+        setWindowSize(width + 2 * mMirrorSurfaceMargin, height + 2 * mMirrorSurfaceMargin);
+    }
+
+    /**
      * Sets the window size with given width and height in pixels without changing the
      * window center. The width or the height will be clamped in the range
      * [{@link #mMinWindowSize}, screen width or height].
@@ -1496,19 +1509,50 @@
                     AccessibilityAction.ACTION_CLICK.getId(), getClickAccessibilityActionLabel());
             info.addAction(clickAction);
             info.setClickable(true);
+
             info.addAction(
                     new AccessibilityAction(R.id.accessibility_action_zoom_in,
                             mContext.getString(R.string.accessibility_control_zoom_in)));
             info.addAction(new AccessibilityAction(R.id.accessibility_action_zoom_out,
                     mContext.getString(R.string.accessibility_control_zoom_out)));
-            info.addAction(new AccessibilityAction(R.id.accessibility_action_move_up,
-                    mContext.getString(R.string.accessibility_control_move_up)));
-            info.addAction(new AccessibilityAction(R.id.accessibility_action_move_down,
-                    mContext.getString(R.string.accessibility_control_move_down)));
-            info.addAction(new AccessibilityAction(R.id.accessibility_action_move_left,
-                    mContext.getString(R.string.accessibility_control_move_left)));
-            info.addAction(new AccessibilityAction(R.id.accessibility_action_move_right,
-                    mContext.getString(R.string.accessibility_control_move_right)));
+
+            if (!mEditSizeEnable) {
+                info.addAction(new AccessibilityAction(R.id.accessibility_action_move_up,
+                        mContext.getString(R.string.accessibility_control_move_up)));
+                info.addAction(new AccessibilityAction(R.id.accessibility_action_move_down,
+                        mContext.getString(R.string.accessibility_control_move_down)));
+                info.addAction(new AccessibilityAction(R.id.accessibility_action_move_left,
+                        mContext.getString(R.string.accessibility_control_move_left)));
+                info.addAction(new AccessibilityAction(R.id.accessibility_action_move_right,
+                        mContext.getString(R.string.accessibility_control_move_right)));
+            } else {
+                if ((mMagnificationFrame.width() + 2 * mMirrorSurfaceMargin)
+                        < mWindowBounds.width()) {
+                    info.addAction(new AccessibilityAction(
+                            R.id.accessibility_action_increase_window_width,
+                            mContext.getString(
+                                    R.string.accessibility_control_increase_window_width)));
+                }
+                if ((mMagnificationFrame.height() + 2 * mMirrorSurfaceMargin)
+                        < mWindowBounds.height()) {
+                    info.addAction(new AccessibilityAction(
+                            R.id.accessibility_action_increase_window_height,
+                            mContext.getString(
+                                    R.string.accessibility_control_increase_window_height)));
+                }
+                if ((mMagnificationFrame.width() + 2 * mMirrorSurfaceMargin) > mMinWindowSize) {
+                    info.addAction(new AccessibilityAction(
+                            R.id.accessibility_action_decrease_window_width,
+                            mContext.getString(
+                                    R.string.accessibility_control_decrease_window_width)));
+                }
+                if ((mMagnificationFrame.height() + 2 * mMirrorSurfaceMargin) > mMinWindowSize) {
+                    info.addAction(new AccessibilityAction(
+                            R.id.accessibility_action_decrease_window_height,
+                            mContext.getString(
+                                    R.string.accessibility_control_decrease_window_height)));
+                }
+            }
 
             info.setContentDescription(mContext.getString(R.string.magnification_window_title));
             info.setStateDescription(formatStateDescription(getScale()));
@@ -1523,6 +1567,11 @@
         }
 
         private boolean performA11yAction(int action) {
+            final float changeWindowSizeAmount = mContext.getResources().getFraction(
+                    R.fraction.magnification_resize_window_size_amount,
+                    /* base= */ 1,
+                    /* pbase= */ 1);
+
             if (action == AccessibilityAction.ACTION_CLICK.getId()) {
                 if (mEditSizeEnable) {
                     // When edit mode is enabled, click the magnifier to exit edit mode.
@@ -1544,9 +1593,26 @@
                 move(-mSourceBounds.width(), 0);
             } else if (action == R.id.accessibility_action_move_right) {
                 move(mSourceBounds.width(), 0);
+            } else if (action == R.id.accessibility_action_increase_window_width) {
+                int newFrameWidth =
+                        (int) (mMagnificationFrame.width() * (1 + changeWindowSizeAmount));
+                setMagnificationFrameSize(newFrameWidth, mMagnificationFrame.height());
+            } else if (action == R.id.accessibility_action_increase_window_height) {
+                int newFrameHeight =
+                        (int) (mMagnificationFrame.height() * (1 + changeWindowSizeAmount));
+                setMagnificationFrameSize(mMagnificationFrame.width(), newFrameHeight);
+            } else if (action == R.id.accessibility_action_decrease_window_width) {
+                int newFrameWidth =
+                        (int) (mMagnificationFrame.width() * (1 - changeWindowSizeAmount));
+                setMagnificationFrameSize(newFrameWidth, mMagnificationFrame.height());
+            } else if (action == R.id.accessibility_action_decrease_window_height) {
+                int newFrameHeight =
+                        (int) (mMagnificationFrame.height() * (1 - changeWindowSizeAmount));
+                setMagnificationFrameSize(mMagnificationFrame.width(), newFrameHeight);
             } else {
                 return false;
             }
+
             mWindowMagnifierCallback.onAccessibilityActionPerformed(mDisplayId);
             return true;
         }
@@ -1557,4 +1623,5 @@
                     mDisplayId, scale, /* updatePersistence= */ true);
         }
     }
+
 }
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
index 8d1fc5d..b2433d4 100644
--- a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
@@ -109,6 +109,9 @@
      */
     val authenticationMethod: Flow<AuthenticationMethodModel>
 
+    /** The minimal length of a pattern. */
+    val minPatternLength: Int
+
     /**
      * Returns the currently-configured authentication method. This determines how the
      * authentication challenge needs to be completed in order to unlock an otherwise locked device.
@@ -227,6 +230,8 @@
                 }
             }
 
+    override val minPatternLength: Int = LockPatternUtils.MIN_LOCK_PATTERN_SIZE
+
     override suspend fun getAuthenticationMethod(): AuthenticationMethodModel {
         return withContext(backgroundDispatcher) {
             blockingAuthenticationMethodInternal(userRepository.selectedUserId)
diff --git a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
index ecd7bae..57a4224 100644
--- a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt
@@ -185,6 +185,9 @@
     /** Whether the pattern should be visible for the currently-selected user. */
     val isPatternVisible: StateFlow<Boolean> = repository.isPatternVisible
 
+    /** The minimal length of a pattern. */
+    val minPatternLength: Int = repository.minPatternLength
+
     private var throttlingCountdownJob: Job? = null
 
     init {
diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
index 87ea411..6ca1c3d 100644
--- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
@@ -356,11 +356,13 @@
                 if (mPercentageStyleId != 0) { // Only set if specified as attribute
                     mBatteryPercentView.setTextAppearance(mPercentageStyleId);
                 }
+                float fontHeight = mBatteryPercentView.getPaint().getFontMetricsInt(null);
+                mBatteryPercentView.setLineHeight(TypedValue.COMPLEX_UNIT_PX, fontHeight);
                 if (mTextColor != 0) mBatteryPercentView.setTextColor(mTextColor);
                 updatePercentText();
                 addView(mBatteryPercentView, new LayoutParams(
                         LayoutParams.WRAP_CONTENT,
-                        LayoutParams.WRAP_CONTENT));
+                        (int) Math.ceil(fontHeight)));
             }
         } else {
             if (showing) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
index 0c7d56f..ea8f5d3 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceIconController.kt
@@ -20,14 +20,7 @@
 import android.util.Log
 import com.airbnb.lottie.LottieAnimationView
 import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING_ANIMATING_IN
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_IDLE
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
 
 private const val TAG = "AuthBiometricFaceIconController"
 
@@ -40,8 +33,7 @@
     // false = dark to light, true = light to dark
     private var lastPulseLightToDark = false
 
-    @BiometricState
-    private var state = 0
+    private var state: BiometricState = BiometricState.STATE_IDLE
 
     init {
         val size = context.resources.getDimensionPixelSize(R.dimen.biometric_dialog_face_icon_size)
@@ -66,54 +58,54 @@
     }
 
     override fun handleAnimationEnd(drawable: Drawable) {
-        if (state == STATE_AUTHENTICATING || state == STATE_HELP) {
+        if (state == BiometricState.STATE_AUTHENTICATING || state == BiometricState.STATE_HELP) {
             pulseInNextDirection()
         }
     }
 
-    override fun updateIcon(@BiometricState oldState: Int, @BiometricState newState: Int) {
-        val lastStateIsErrorIcon = (oldState == STATE_ERROR || oldState == STATE_HELP)
-        if (newState == STATE_AUTHENTICATING_ANIMATING_IN) {
+    override fun updateIcon(oldState: BiometricState, newState: BiometricState) {
+        val lastStateIsErrorIcon = (oldState == BiometricState.STATE_ERROR || oldState == BiometricState.STATE_HELP)
+        if (newState == BiometricState.STATE_AUTHENTICATING_ANIMATING_IN) {
             showStaticDrawable(R.drawable.face_dialog_pulse_dark_to_light)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_authenticating
             )
-        } else if (newState == STATE_AUTHENTICATING) {
+        } else if (newState == BiometricState.STATE_AUTHENTICATING) {
             startPulsing()
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_authenticating
             )
-        } else if (oldState == STATE_PENDING_CONFIRMATION && newState == STATE_AUTHENTICATED) {
+        } else if (oldState == BiometricState.STATE_PENDING_CONFIRMATION && newState == BiometricState.STATE_AUTHENTICATED) {
             animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_confirmed
             )
-        } else if (lastStateIsErrorIcon && newState == STATE_IDLE) {
+        } else if (lastStateIsErrorIcon && newState == BiometricState.STATE_IDLE) {
             animateIconOnce(R.drawable.face_dialog_error_to_idle)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_idle
             )
-        } else if (lastStateIsErrorIcon && newState == STATE_AUTHENTICATED) {
+        } else if (lastStateIsErrorIcon && newState == BiometricState.STATE_AUTHENTICATED) {
             animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_authenticated
             )
-        } else if (newState == STATE_ERROR && oldState != STATE_ERROR) {
+        } else if (newState == BiometricState.STATE_ERROR && oldState != BiometricState.STATE_ERROR) {
             animateIconOnce(R.drawable.face_dialog_dark_to_error)
             iconView.contentDescription = context.getString(
                     R.string.keyguard_face_failed
             )
-        } else if (oldState == STATE_AUTHENTICATING && newState == STATE_AUTHENTICATED) {
+        } else if (oldState == BiometricState.STATE_AUTHENTICATING && newState == BiometricState.STATE_AUTHENTICATED) {
             animateIconOnce(R.drawable.face_dialog_dark_to_checkmark)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_authenticated
             )
-        } else if (newState == STATE_PENDING_CONFIRMATION) {
+        } else if (newState == BiometricState.STATE_PENDING_CONFIRMATION) {
             animateIconOnce(R.drawable.face_dialog_wink_from_dark)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_authenticated
             )
-        } else if (newState == STATE_IDLE) {
+        } else if (newState == BiometricState.STATE_IDLE) {
             showStaticDrawable(R.drawable.face_dialog_idle_static)
             iconView.contentDescription = context.getString(
                     R.string.biometric_dialog_face_icon_description_idle
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt
deleted file mode 100644
index be89d10..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceView.kt
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.content.Context
-import android.hardware.biometrics.BiometricAuthenticator.Modality
-import android.util.AttributeSet
-
-/** Face only view for BiometricPrompt. */
-class AuthBiometricFaceView(
-    context: Context,
-    attrs: AttributeSet? = null
-) : AuthBiometricView(context, attrs) {
-
-    override fun getDelayAfterAuthenticatedDurationMs() = HIDE_DELAY_MS
-
-    override fun getStateForAfterError() = STATE_IDLE
-
-    override fun handleResetAfterError() = resetErrorView()
-
-    override fun handleResetAfterHelp() = resetErrorView()
-
-    override fun supportsSmallDialog() = true
-
-    override fun supportsManualRetry() = true
-
-    override fun supportsRequireConfirmation() = true
-
-    override fun createIconController(): AuthIconController =
-        AuthBiometricFaceIconController(mContext, mIconView)
-
-    override fun updateState(@BiometricState newState: Int) {
-        if (newState == STATE_AUTHENTICATING_ANIMATING_IN ||
-            newState == STATE_AUTHENTICATING && size == AuthDialog.SIZE_MEDIUM) {
-            resetErrorView()
-        }
-
-        // Do this last since the state variable gets updated.
-        super.updateState(newState)
-    }
-
-    override fun onAuthenticationFailed(
-        @Modality modality: Int,
-        failureReason: String?
-    ) {
-        if (size == AuthDialog.SIZE_MEDIUM) {
-            if (supportsManualRetry()) {
-                mTryAgainButton.visibility = VISIBLE
-                mConfirmButton.visibility = GONE
-            }
-        }
-
-        // Do this last since we want to know if the button is being animated (in the case of
-        // small -> medium dialog)
-        super.onAuthenticationFailed(modality, failureReason)
-    }
-
-    private fun resetErrorView() {
-        mIndicatorView.setTextColor(mTextColorHint)
-        mIndicatorView.visibility = INVISIBLE
-    }
-
-    companion object {
-        /** Delay before dismissing after being authenticated/confirmed. */
-        const val HIDE_DELAY_MS = 500
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
index 95610ae..fb22c6b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceIconController.kt
@@ -20,11 +20,11 @@
 import android.content.Context
 import com.airbnb.lottie.LottieAnimationView
 import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATED
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_ERROR
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_HELP
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
 
 /** Face/Fingerprint combined icon animator for BiometricPrompt. */
 open class AuthBiometricFingerprintAndFaceIconController(
@@ -36,8 +36,8 @@
     override val actsAsConfirmButton: Boolean = true
 
     override fun shouldAnimateIconViewForTransition(
-        @BiometricState oldState: Int,
-        @BiometricState newState: Int
+            oldState: BiometricState,
+            newState: BiometricState
     ): Boolean = when (newState) {
         STATE_PENDING_CONFIRMATION -> true
         else -> super.shouldAnimateIconViewForTransition(oldState, newState)
@@ -45,8 +45,8 @@
 
     @RawRes
     override fun getAnimationForTransition(
-        @BiometricState oldState: Int,
-        @BiometricState newState: Int
+        oldState: BiometricState,
+        newState: BiometricState
     ): Int? = when (newState) {
         STATE_AUTHENTICATED -> {
            if (oldState == STATE_PENDING_CONFIRMATION) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt
deleted file mode 100644
index 7ce74db..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceView.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.content.Context
-import android.hardware.biometrics.BiometricAuthenticator.Modality
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE
-import android.hardware.biometrics.BiometricConstants
-import android.hardware.face.FaceManager
-import android.util.AttributeSet
-import com.android.systemui.R
-
-/** Face/Fingerprint combined view for BiometricPrompt. */
-class AuthBiometricFingerprintAndFaceView(
-    context: Context,
-    attrs: AttributeSet?
-) : AuthBiometricFingerprintView(context, attrs) {
-    var isFaceClass3 = false
-
-    constructor (context: Context) : this(context, null)
-
-    override fun getConfirmationPrompt() = R.string.biometric_dialog_tap_confirm_with_face
-
-    override fun forceRequireConfirmation(@Modality modality: Int) = modality == TYPE_FACE
-
-    override fun ignoreUnsuccessfulEventsFrom(@Modality modality: Int, unsuccessfulReason: String) =
-        modality == TYPE_FACE && !(isFaceClass3 && isLockoutErrorString(unsuccessfulReason))
-
-    override fun createIconController(): AuthIconController =
-        AuthBiometricFingerprintAndFaceIconController(mContext, mIconView, mIconViewOverlay)
-
-    override fun isCoex() = true
-
-    private fun isLockoutErrorString(unsuccessfulReason: String) =
-        unsuccessfulReason == FaceManager.getErrorString(
-            mContext,
-            BiometricConstants.BIOMETRIC_ERROR_LOCKOUT,
-            0 /*vendorCode */
-        ) || unsuccessfulReason == FaceManager.getErrorString(
-            mContext,
-            BiometricConstants.BIOMETRIC_ERROR_LOCKOUT_PERMANENT,
-            0 /*vendorCode */
-        )
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
index d82f458..683541b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt
@@ -27,14 +27,15 @@
 import com.airbnb.lottie.LottieAnimationView
 import com.android.settingslib.widget.LottieColorUtils
 import com.android.systemui.R
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATED
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING
-import com.android.systemui.biometrics.AuthBiometricView.STATE_AUTHENTICATING_ANIMATING_IN
-import com.android.systemui.biometrics.AuthBiometricView.STATE_ERROR
-import com.android.systemui.biometrics.AuthBiometricView.STATE_HELP
-import com.android.systemui.biometrics.AuthBiometricView.STATE_IDLE
-import com.android.systemui.biometrics.AuthBiometricView.STATE_PENDING_CONFIRMATION
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATED
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATING
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_AUTHENTICATING_ANIMATING_IN
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_ERROR
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_HELP
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_IDLE
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
+
 
 /** Fingerprint only icon animator for BiometricPrompt.  */
 open class AuthBiometricFingerprintIconController(
@@ -76,7 +77,7 @@
         }
     }
 
-    private fun updateIconSideFps(@BiometricState lastState: Int, @BiometricState newState: Int) {
+    private fun updateIconSideFps(lastState: BiometricState, newState: BiometricState) {
         val displayInfo = DisplayInfo()
         context.display?.getDisplayInfo(displayInfo)
         val rotation = getRotationFromDefault(displayInfo.rotation)
@@ -106,7 +107,7 @@
         LottieColorUtils.applyDynamicColors(context, iconViewOverlay)
     }
 
-    private fun updateIconNormal(@BiometricState lastState: Int, @BiometricState newState: Int) {
+    private fun updateIconNormal(lastState: BiometricState, newState: BiometricState) {
         val icon = getAnimationForTransition(lastState, newState) ?: return
 
         if (!(lastState == STATE_AUTHENTICATING_ANIMATING_IN && newState == STATE_AUTHENTICATING)) {
@@ -125,7 +126,7 @@
         LottieColorUtils.applyDynamicColors(context, iconView)
     }
 
-    override fun updateIcon(@BiometricState lastState: Int, @BiometricState newState: Int) {
+    override fun updateIcon(lastState: BiometricState, newState: BiometricState) {
         if (isSideFps) {
             updateIconSideFps(lastState, newState)
         } else {
@@ -135,7 +136,7 @@
     }
 
     @VisibleForTesting
-    fun getIconContentDescription(@BiometricState newState: Int): CharSequence? {
+    fun getIconContentDescription(newState: BiometricState): CharSequence? {
         val id = when (newState) {
             STATE_IDLE,
             STATE_AUTHENTICATING_ANIMATING_IN,
@@ -160,8 +161,8 @@
     }
 
     protected open fun shouldAnimateIconViewForTransition(
-            @BiometricState oldState: Int,
-            @BiometricState newState: Int
+            oldState: BiometricState,
+            newState: BiometricState
     ) = when (newState) {
         STATE_HELP,
         STATE_ERROR -> true
@@ -172,8 +173,8 @@
     }
 
     private fun shouldAnimateSfpsIconViewForTransition(
-            @BiometricState oldState: Int,
-            @BiometricState newState: Int
+            oldState: BiometricState,
+            newState: BiometricState
     ) = when (newState) {
         STATE_HELP,
         STATE_ERROR -> true
@@ -185,8 +186,8 @@
     }
 
     protected open fun shouldAnimateIconViewOverlayForTransition(
-            @BiometricState oldState: Int,
-            @BiometricState newState: Int
+            oldState: BiometricState,
+            newState: BiometricState
     ) = when (newState) {
         STATE_HELP,
         STATE_ERROR -> true
@@ -198,8 +199,8 @@
 
     @RawRes
     protected open fun getAnimationForTransition(
-            @BiometricState oldState: Int,
-            @BiometricState newState: Int
+            oldState: BiometricState,
+            newState: BiometricState
     ): Int? {
         val id = when (newState) {
             STATE_HELP,
@@ -231,8 +232,8 @@
 
     @RawRes
     private fun getSideFpsOverlayAnimationForTransition(
-            @BiometricState oldState: Int,
-            @BiometricState newState: Int,
+            oldState: BiometricState,
+            newState: BiometricState,
             rotation: Int
     ): Int? = when (newState) {
         STATE_HELP,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt
deleted file mode 100644
index f2e4701..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.kt
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.content.Context
-import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
-import android.util.AttributeSet
-import android.util.Log
-import android.widget.FrameLayout
-import android.widget.TextView
-import com.android.systemui.R
-import com.android.systemui.biometrics.AuthController.ScaleFactorProvider
-
-private const val TAG = "AuthBiometricFingerprintView"
-
-/** Fingerprint only view for BiometricPrompt.  */
-open class AuthBiometricFingerprintView(
-    context: Context,
-    attrs: AttributeSet? = null
-) : AuthBiometricView(context, attrs) {
-    /** If this view is for a SFPS sensor.  */
-    var isSfps = false
-        private set
-
-    /** If this view is for a UDFPS sensor.  */
-    var isUdfps = false
-        private set
-
-    private var udfpsAdapter: UdfpsDialogMeasureAdapter? = null
-    private var scaleFactorProvider: ScaleFactorProvider? = null
-
-    /** Set the [sensorProps] of this sensor so the view can be customized prior to layout. */
-    fun setSensorProperties(sensorProps: FingerprintSensorPropertiesInternal) {
-        isSfps = sensorProps.isAnySidefpsType
-        isUdfps = sensorProps.isAnyUdfpsType
-        udfpsAdapter = if (isUdfps) UdfpsDialogMeasureAdapter(this, sensorProps) else null
-    }
-
-    fun setScaleFactorProvider(scaleProvider: ScaleFactorProvider?) {
-        scaleFactorProvider = scaleProvider
-    }
-
-    override fun onMeasureInternal(width: Int, height: Int): AuthDialog.LayoutParams {
-        val layoutParams = super.onMeasureInternal(width, height)
-        val scale = scaleFactorProvider?.provide() ?: 1.0f
-        return udfpsAdapter?.onMeasureInternal(width, height, layoutParams,
-            scale) ?: layoutParams
-    }
-
-    override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
-        super.onLayout(changed, left, top, right, bottom)
-
-        val adapter = udfpsAdapter
-        if (adapter != null) {
-            // Move the UDFPS icon and indicator text if necessary. This probably only needs to happen
-            // for devices where the UDFPS sensor is too low.
-            // TODO(b/201510778): Update this logic to support cases where the sensor or text overlap
-            //  the button bar area.
-            val bottomSpacerHeight = adapter.bottomSpacerHeight
-            Log.w(TAG, "bottomSpacerHeight: $bottomSpacerHeight")
-            if (bottomSpacerHeight < 0) {
-                val iconFrame = findViewById<FrameLayout>(R.id.biometric_icon_frame)!!
-                iconFrame.translationY = -bottomSpacerHeight.toFloat()
-                val indicator = findViewById<TextView>(R.id.indicator)!!
-                indicator.translationY = -bottomSpacerHeight.toFloat()
-            }
-        }
-    }
-
-    override fun getDelayAfterAuthenticatedDurationMs() = 500
-
-    override fun getStateForAfterError() = STATE_AUTHENTICATING
-
-    override fun handleResetAfterError() = showTouchSensorString()
-
-    override fun handleResetAfterHelp() = showTouchSensorString()
-
-    override fun supportsSmallDialog() = false
-
-    override fun createIconController(): AuthIconController =
-        AuthBiometricFingerprintIconController(mContext, mIconView, mIconViewOverlay)
-
-    fun updateOverrideIconLayoutParamsSize() {
-        udfpsAdapter?.let {
-            val sensorDiameter = it.getSensorDiameter(scaleFactorProvider?.provide() ?: 1.0f)
-            (mIconController as? AuthBiometricFingerprintIconController)?.iconLayoutParamSize =
-                    Pair(sensorDiameter, sensorDiameter)
-        }
-    }
-
-    override fun onAttachedToWindow() {
-        super.onAttachedToWindow()
-        showTouchSensorString()
-    }
-
-    private fun showTouchSensorString() {
-        mIndicatorView.setText(R.string.fingerprint_dialog_touch_sensor)
-        mIndicatorView.setTextColor(mTextColorHint)
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
deleted file mode 100644
index ed4b91c..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
+++ /dev/null
@@ -1,984 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics;
-
-import static android.hardware.biometrics.BiometricAuthenticator.TYPE_NONE;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ValueAnimator;
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.StringRes;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.graphics.Insets;
-import android.hardware.biometrics.BiometricAuthenticator.Modality;
-import android.hardware.biometrics.BiometricPrompt;
-import android.hardware.biometrics.PromptInfo;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.text.TextUtils;
-import android.text.method.ScrollingMovementMethod;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.accessibility.AccessibilityManager;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.widget.LockPatternUtils;
-import com.android.systemui.R;
-
-import com.airbnb.lottie.LottieAnimationView;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Contains the Biometric views (title, subtitle, icon, buttons, etc.) and its controllers.
- */
-public abstract class AuthBiometricView extends LinearLayout implements AuthBiometricViewAdapter {
-
-    private static final String TAG = "AuthBiometricView";
-
-    /**
-     * Authentication hardware idle.
-     */
-    public static final int STATE_IDLE = 0;
-    /**
-     * UI animating in, authentication hardware active.
-     */
-    public static final int STATE_AUTHENTICATING_ANIMATING_IN = 1;
-    /**
-     * UI animated in, authentication hardware active.
-     */
-    public static final int STATE_AUTHENTICATING = 2;
-    /**
-     * UI animated in, authentication hardware active.
-     */
-    public static final int STATE_HELP = 3;
-    /**
-     * Hard error, e.g. ERROR_TIMEOUT. Authentication hardware idle.
-     */
-    public static final int STATE_ERROR = 4;
-    /**
-     * Authenticated, waiting for user confirmation. Authentication hardware idle.
-     */
-    public static final int STATE_PENDING_CONFIRMATION = 5;
-    /**
-     * Authenticated, dialog animating away soon.
-     */
-    public static final int STATE_AUTHENTICATED = 6;
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({STATE_IDLE, STATE_AUTHENTICATING_ANIMATING_IN, STATE_AUTHENTICATING, STATE_HELP,
-            STATE_ERROR, STATE_PENDING_CONFIRMATION, STATE_AUTHENTICATED})
-    @interface BiometricState {}
-
-    /**
-     * Callback to the parent when a user action has occurred.
-     */
-    public interface Callback {
-        int ACTION_AUTHENTICATED = 1;
-        int ACTION_USER_CANCELED = 2;
-        int ACTION_BUTTON_NEGATIVE = 3;
-        int ACTION_BUTTON_TRY_AGAIN = 4;
-        int ACTION_ERROR = 5;
-        int ACTION_USE_DEVICE_CREDENTIAL = 6;
-        int ACTION_START_DELAYED_FINGERPRINT_SENSOR = 7;
-        int ACTION_AUTHENTICATED_AND_CONFIRMED = 8;
-
-        /**
-         * When an action has occurred. The caller will only invoke this when the callback should
-         * be propagated. e.g. the caller will handle any necessary delay.
-         * @param action
-         */
-        void onAction(int action);
-    }
-
-    private final Handler mHandler;
-    private final AccessibilityManager mAccessibilityManager;
-    private final LockPatternUtils mLockPatternUtils;
-    protected final int mTextColorError;
-    protected final int mTextColorHint;
-
-    private AuthPanelController mPanelController;
-
-    private PromptInfo mPromptInfo;
-    private boolean mRequireConfirmation;
-    private int mUserId;
-    private int mEffectiveUserId;
-    private @AuthDialog.DialogSize int mSize = AuthDialog.SIZE_UNKNOWN;
-
-    private TextView mTitleView;
-    private TextView mSubtitleView;
-    private TextView mDescriptionView;
-    private View mIconHolderView;
-    protected LottieAnimationView mIconViewOverlay;
-    protected LottieAnimationView mIconView;
-    protected TextView mIndicatorView;
-
-    @VisibleForTesting @NonNull AuthIconController mIconController;
-    @VisibleForTesting int mAnimationDurationShort = AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS;
-    @VisibleForTesting int mAnimationDurationLong = AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS;
-    @VisibleForTesting int mAnimationDurationHideDialog = BiometricPrompt.HIDE_DIALOG_DELAY;
-
-    // Negative button position, exclusively for the app-specified behavior
-    @VisibleForTesting Button mNegativeButton;
-    // Negative button position, exclusively for cancelling auth after passive auth success
-    @VisibleForTesting Button mCancelButton;
-    // Negative button position, shown if device credentials are allowed
-    @VisibleForTesting Button mUseCredentialButton;
-
-    // Positive button position,
-    @VisibleForTesting Button mConfirmButton;
-    @VisibleForTesting Button mTryAgainButton;
-
-    // Measurements when biometric view is showing text, buttons, etc.
-    @Nullable @VisibleForTesting AuthDialog.LayoutParams mLayoutParams;
-
-    private Callback mCallback;
-    @BiometricState private int mState;
-
-    private float mIconOriginalY;
-
-    protected boolean mDialogSizeAnimating;
-    protected Bundle mSavedState;
-
-    private final Runnable mResetErrorRunnable;
-    private final Runnable mResetHelpRunnable;
-
-    private Animator.AnimatorListener mJankListener;
-
-    private final boolean mUseCustomBpSize;
-    private final int mCustomBpWidth;
-    private final int mCustomBpHeight;
-
-    private final OnClickListener mBackgroundClickListener = (view) -> {
-        if (mState == STATE_AUTHENTICATED) {
-            Log.w(TAG, "Ignoring background click after authenticated");
-            return;
-        } else if (mSize == AuthDialog.SIZE_SMALL) {
-            Log.w(TAG, "Ignoring background click during small dialog");
-            return;
-        } else if (mSize == AuthDialog.SIZE_LARGE) {
-            Log.w(TAG, "Ignoring background click during large dialog");
-            return;
-        }
-        mCallback.onAction(Callback.ACTION_USER_CANCELED);
-    };
-
-    public AuthBiometricView(Context context) {
-        this(context, null);
-    }
-
-    public AuthBiometricView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mHandler = new Handler(Looper.getMainLooper());
-        mTextColorError = getResources().getColor(
-                R.color.biometric_dialog_error, context.getTheme());
-        mTextColorHint = getResources().getColor(
-                R.color.biometric_dialog_gray, context.getTheme());
-
-        mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
-        mLockPatternUtils = new LockPatternUtils(context);
-
-        mResetErrorRunnable = () -> {
-            updateState(getStateForAfterError());
-            handleResetAfterError();
-            Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-        };
-
-        mResetHelpRunnable = () -> {
-            updateState(STATE_AUTHENTICATING);
-            handleResetAfterHelp();
-            Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-        };
-
-        mUseCustomBpSize = getResources().getBoolean(R.bool.use_custom_bp_size);
-        mCustomBpWidth = getResources().getDimensionPixelSize(R.dimen.biometric_dialog_width);
-        mCustomBpHeight = getResources().getDimensionPixelSize(R.dimen.biometric_dialog_height);
-    }
-
-    /** Delay after authentication is confirmed, before the dialog should be animated away. */
-    protected int getDelayAfterAuthenticatedDurationMs() {
-        return 0;
-    }
-
-    /** State that the dialog/icon should be in after showing a help message. */
-    protected int getStateForAfterError() {
-        return STATE_IDLE;
-    }
-
-    /** Invoked when the error message is being cleared. */
-    protected void handleResetAfterError() {}
-
-    /** Invoked when the help message is being cleared. */
-    protected void handleResetAfterHelp() {}
-
-    /** True if the dialog supports {@link AuthDialog.DialogSize#SIZE_SMALL}. */
-    protected boolean supportsSmallDialog() {
-        return false;
-    }
-
-    /** The string to show when the user must tap to confirm via the button or icon. */
-    @StringRes
-    protected int getConfirmationPrompt() {
-        return R.string.biometric_dialog_tap_confirm;
-    }
-
-    /** True if require confirmation will be honored when set via the API. */
-    protected boolean supportsRequireConfirmation() {
-        return false;
-    }
-
-    /** True if confirmation will be required even if it was not supported/requested. */
-    protected boolean forceRequireConfirmation(@Modality int modality) {
-        return false;
-    }
-
-    /** Ignore all events from this (secondary) modality except successful authentication. */
-    protected boolean ignoreUnsuccessfulEventsFrom(@Modality int modality,
-            String unsuccessfulReason) {
-        return false;
-    }
-
-    /** Create the controller for managing the icons transitions during the prompt.*/
-    @NonNull
-    protected abstract AuthIconController createIconController();
-
-    @Override
-    public AuthIconController getLegacyIconController() {
-        return mIconController;
-    }
-
-    @Override
-    public void cancelAnimation() {
-        animate().cancel();
-    }
-
-    @Override
-    public View asView() {
-        return this;
-    }
-
-    @Override
-    public boolean isCoex() {
-        return false;
-    }
-
-    void setPanelController(AuthPanelController panelController) {
-        mPanelController = panelController;
-    }
-    void setPromptInfo(PromptInfo promptInfo) {
-        mPromptInfo = promptInfo;
-    }
-
-    void setCallback(Callback callback) {
-        mCallback = callback;
-    }
-
-    void setBackgroundView(View backgroundView) {
-        backgroundView.setOnClickListener(mBackgroundClickListener);
-    }
-
-    void setUserId(int userId) {
-        mUserId = userId;
-    }
-
-    void setEffectiveUserId(int effectiveUserId) {
-        mEffectiveUserId = effectiveUserId;
-    }
-
-    void setRequireConfirmation(boolean requireConfirmation) {
-        mRequireConfirmation = requireConfirmation && supportsRequireConfirmation();
-    }
-
-    void setJankListener(Animator.AnimatorListener jankListener) {
-        mJankListener = jankListener;
-    }
-
-    private void updatePaddings(int size) {
-        final Insets navBarInsets = Utils.getNavbarInsets(mContext);
-        if (size != AuthDialog.SIZE_LARGE) {
-            if (mPanelController.getPosition() == AuthPanelController.POSITION_LEFT) {
-                setPadding(navBarInsets.left, 0, 0, 0);
-            } else if (mPanelController.getPosition() == AuthPanelController.POSITION_RIGHT) {
-                setPadding(0, 0, navBarInsets.right, 0);
-            } else {
-                setPadding(0, 0, 0, navBarInsets.bottom);
-            }
-        } else {
-            setPadding(0, 0, 0, 0);
-        }
-    }
-
-    @VisibleForTesting
-    final void updateSize(@AuthDialog.DialogSize int newSize) {
-        Log.v(TAG, "Current size: " + mSize + " New size: " + newSize);
-        updatePaddings(newSize);
-        if (newSize == AuthDialog.SIZE_SMALL) {
-            mTitleView.setVisibility(View.GONE);
-            mSubtitleView.setVisibility(View.GONE);
-            mDescriptionView.setVisibility(View.GONE);
-            mIndicatorView.setVisibility(View.GONE);
-            mNegativeButton.setVisibility(View.GONE);
-            mUseCredentialButton.setVisibility(View.GONE);
-
-            final float iconPadding = getResources()
-                    .getDimension(R.dimen.biometric_dialog_icon_padding);
-            mIconHolderView.setY(getHeight() - mIconHolderView.getHeight() - iconPadding);
-
-            // Subtract the vertical padding from the new height since it's only used to create
-            // extra space between the other elements, and not part of the actual icon.
-            final int newHeight = mIconHolderView.getHeight() + 2 * (int) iconPadding
-                    - mIconHolderView.getPaddingTop() - mIconHolderView.getPaddingBottom();
-            mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth, newHeight,
-                    0 /* animateDurationMs */);
-
-            mSize = newSize;
-        } else if (mSize == AuthDialog.SIZE_SMALL && newSize == AuthDialog.SIZE_MEDIUM) {
-            if (mDialogSizeAnimating) {
-                return;
-            }
-            mDialogSizeAnimating = true;
-
-            // Animate the icon back to original position
-            final ValueAnimator iconAnimator =
-                    ValueAnimator.ofFloat(mIconHolderView.getY(), mIconOriginalY);
-            iconAnimator.addUpdateListener((animation) -> {
-                mIconHolderView.setY((float) animation.getAnimatedValue());
-            });
-
-            // Animate the text
-            final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(0, 1);
-            opacityAnimator.addUpdateListener((animation) -> {
-                final float opacity = (float) animation.getAnimatedValue();
-                mTitleView.setAlpha(opacity);
-                mIndicatorView.setAlpha(opacity);
-                mNegativeButton.setAlpha(opacity);
-                mCancelButton.setAlpha(opacity);
-                mTryAgainButton.setAlpha(opacity);
-
-                if (!TextUtils.isEmpty(mSubtitleView.getText())) {
-                    mSubtitleView.setAlpha(opacity);
-                }
-                if (!TextUtils.isEmpty(mDescriptionView.getText())) {
-                    mDescriptionView.setAlpha(opacity);
-                }
-            });
-
-            // Choreograph together
-            final AnimatorSet as = new AnimatorSet();
-            as.setDuration(mAnimationDurationShort);
-            as.addListener(new AnimatorListenerAdapter() {
-                @Override
-                public void onAnimationStart(Animator animation) {
-                    super.onAnimationStart(animation);
-                    mTitleView.setVisibility(View.VISIBLE);
-                    mIndicatorView.setVisibility(View.VISIBLE);
-
-                    if (isDeviceCredentialAllowed()) {
-                        mUseCredentialButton.setVisibility(View.VISIBLE);
-                    } else {
-                        mNegativeButton.setVisibility(View.VISIBLE);
-                    }
-                    if (supportsManualRetry()) {
-                        mTryAgainButton.setVisibility(View.VISIBLE);
-                    }
-
-                    if (!TextUtils.isEmpty(mSubtitleView.getText())) {
-                        mSubtitleView.setVisibility(View.VISIBLE);
-                    }
-                    if (!TextUtils.isEmpty(mDescriptionView.getText())) {
-                        mDescriptionView.setVisibility(View.VISIBLE);
-                    }
-                }
-                @Override
-                public void onAnimationEnd(Animator animation) {
-                    super.onAnimationEnd(animation);
-                    mSize = newSize;
-                    mDialogSizeAnimating = false;
-                    Utils.notifyAccessibilityContentChanged(mAccessibilityManager,
-                            AuthBiometricView.this);
-                }
-            });
-
-            if (mJankListener != null) {
-                as.addListener(mJankListener);
-            }
-            as.play(iconAnimator).with(opacityAnimator);
-            as.start();
-            // Animate the panel
-            mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth,
-                    mLayoutParams.mMediumHeight,
-                    AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS);
-        } else if (newSize == AuthDialog.SIZE_MEDIUM) {
-            mPanelController.updateForContentDimensions(mLayoutParams.mMediumWidth,
-                    mLayoutParams.mMediumHeight,
-                    0 /* animateDurationMs */);
-            mSize = newSize;
-        } else if (newSize == AuthDialog.SIZE_LARGE) {
-            final float translationY = getResources().getDimension(
-                            R.dimen.biometric_dialog_medium_to_large_translation_offset);
-            final AuthBiometricView biometricView = this;
-
-            // Translate at full duration
-            final ValueAnimator translationAnimator = ValueAnimator.ofFloat(
-                    biometricView.getY(), biometricView.getY() - translationY);
-            translationAnimator.setDuration(mAnimationDurationLong);
-            translationAnimator.addUpdateListener((animation) -> {
-                final float translation = (float) animation.getAnimatedValue();
-                biometricView.setTranslationY(translation);
-            });
-            translationAnimator.addListener(new AnimatorListenerAdapter() {
-                @Override
-                public void onAnimationEnd(Animator animation) {
-                    super.onAnimationEnd(animation);
-                    if (biometricView.getParent() instanceof ViewGroup) {
-                        ((ViewGroup) biometricView.getParent()).removeView(biometricView);
-                    }
-                    mSize = newSize;
-                }
-            });
-
-            // Opacity to 0 in half duration
-            final ValueAnimator opacityAnimator = ValueAnimator.ofFloat(1, 0);
-            opacityAnimator.setDuration(mAnimationDurationLong / 2);
-            opacityAnimator.addUpdateListener((animation) -> {
-                final float opacity = (float) animation.getAnimatedValue();
-                biometricView.setAlpha(opacity);
-            });
-
-            mPanelController.setUseFullScreen(true);
-            mPanelController.updateForContentDimensions(
-                    mPanelController.getContainerWidth(),
-                    mPanelController.getContainerHeight(),
-                    mAnimationDurationLong);
-
-            // Start the animations together
-            AnimatorSet as = new AnimatorSet();
-            List<Animator> animators = new ArrayList<>();
-            animators.add(translationAnimator);
-            animators.add(opacityAnimator);
-
-            if (mJankListener != null) {
-                as.addListener(mJankListener);
-            }
-            as.playTogether(animators);
-            as.setDuration(mAnimationDurationLong * 2 / 3);
-            as.start();
-        } else {
-            Log.e(TAG, "Unknown transition from: " + mSize + " to: " + newSize);
-        }
-        Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-    }
-
-    protected boolean supportsManualRetry() {
-        return false;
-    }
-
-    /**
-     * Updates mIconView animation on updates to fold state, device rotation, or rear display mode
-     * @param animation new asset to use for iconw
-     */
-    public void updateIconViewAnimation(int animation) {
-        mIconView.setAnimation(animation);
-    }
-
-    public void updateState(@BiometricState int newState) {
-        Log.d(TAG, "newState: " + newState);
-
-        mIconController.updateState(mState, newState);
-
-        switch (newState) {
-            case STATE_AUTHENTICATING_ANIMATING_IN:
-            case STATE_AUTHENTICATING:
-                removePendingAnimations();
-                if (mRequireConfirmation) {
-                    mConfirmButton.setEnabled(false);
-                    mConfirmButton.setVisibility(View.VISIBLE);
-                }
-                break;
-
-            case STATE_AUTHENTICATED:
-                removePendingAnimations();
-                if (mSize != AuthDialog.SIZE_SMALL) {
-                    mConfirmButton.setVisibility(View.GONE);
-                    mNegativeButton.setVisibility(View.GONE);
-                    mUseCredentialButton.setVisibility(View.GONE);
-                    mCancelButton.setVisibility(View.GONE);
-                    mIndicatorView.setVisibility(View.INVISIBLE);
-                }
-                announceForAccessibility(getResources()
-                        .getString(R.string.biometric_dialog_authenticated));
-                if (mState == STATE_PENDING_CONFIRMATION) {
-                    mHandler.postDelayed(() -> mCallback.onAction(
-                            Callback.ACTION_AUTHENTICATED_AND_CONFIRMED),
-                            getDelayAfterAuthenticatedDurationMs());
-                } else {
-                    mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_AUTHENTICATED),
-                            getDelayAfterAuthenticatedDurationMs());
-                }
-                break;
-
-            case STATE_PENDING_CONFIRMATION:
-                removePendingAnimations();
-                mNegativeButton.setVisibility(View.GONE);
-                mCancelButton.setVisibility(View.VISIBLE);
-                mUseCredentialButton.setVisibility(View.GONE);
-                // forced confirmations (multi-sensor) use the icon view as the confirm button
-                mConfirmButton.setEnabled(mRequireConfirmation);
-                mConfirmButton.setVisibility(mRequireConfirmation ? View.VISIBLE : View.GONE);
-                mIndicatorView.setTextColor(mTextColorHint);
-                mIndicatorView.setText(getConfirmationPrompt());
-                mIndicatorView.setVisibility(View.VISIBLE);
-                break;
-
-            case STATE_ERROR:
-                if (mSize == AuthDialog.SIZE_SMALL) {
-                    updateSize(AuthDialog.SIZE_MEDIUM);
-                }
-                break;
-
-            default:
-                Log.w(TAG, "Unhandled state: " + newState);
-                break;
-        }
-
-        Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-        mState = newState;
-    }
-
-    public void onOrientationChanged() {
-        // Update padding and AuthPanel outline by calling updateSize when the orientation changed.
-        updateSize(mSize);
-    }
-
-    public void onDialogAnimatedIn(boolean fingerprintWasStarted) {
-        updateState(STATE_AUTHENTICATING);
-    }
-
-    public void onAuthenticationSucceeded(@Modality int modality) {
-        removePendingAnimations();
-        if (mRequireConfirmation || forceRequireConfirmation(modality)) {
-            updateState(STATE_PENDING_CONFIRMATION);
-        } else {
-            updateState(STATE_AUTHENTICATED);
-        }
-    }
-
-    /**
-     * Notify the view that auth has failed.
-     *
-     * @param modality sensor modality that failed
-     * @param failureReason message
-     */
-    public void onAuthenticationFailed(
-            @Modality int modality, @Nullable String failureReason) {
-        if (ignoreUnsuccessfulEventsFrom(modality, failureReason)) {
-            return;
-        }
-
-        showTemporaryMessage(failureReason, mResetErrorRunnable);
-        updateState(STATE_ERROR);
-    }
-
-    /**
-     * Notify the view that an error occurred.
-     *
-     * @param modality sensor modality that failed
-     * @param error message
-     */
-    public void onError(@Modality int modality, String error) {
-        if (ignoreUnsuccessfulEventsFrom(modality, error)) {
-            return;
-        }
-
-        showTemporaryMessage(error, mResetErrorRunnable);
-        updateState(STATE_ERROR);
-
-        mHandler.postDelayed(() -> mCallback.onAction(Callback.ACTION_ERROR),
-                mAnimationDurationHideDialog);
-    }
-
-    /**
-     * Show a help message to the user.
-     *
-     * @param modality sensor modality
-     * @param help message
-     */
-    public void onHelp(@Modality int modality, String help) {
-        if (ignoreUnsuccessfulEventsFrom(modality, help)) {
-            return;
-        }
-        if (mSize != AuthDialog.SIZE_MEDIUM) {
-            Log.w(TAG, "Help received in size: " + mSize);
-            return;
-        }
-        if (TextUtils.isEmpty(help)) {
-            Log.w(TAG, "Ignoring blank help message");
-            return;
-        }
-
-        showTemporaryMessage(help, mResetHelpRunnable);
-        updateState(STATE_HELP);
-    }
-
-    public void onSaveState(@NonNull Bundle outState) {
-        outState.putInt(AuthDialog.KEY_BIOMETRIC_CONFIRM_VISIBILITY,
-                mConfirmButton.getVisibility());
-        outState.putInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY,
-                mTryAgainButton.getVisibility());
-        outState.putInt(AuthDialog.KEY_BIOMETRIC_STATE, mState);
-        outState.putString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING,
-                mIndicatorView.getText() != null ? mIndicatorView.getText().toString() : "");
-        outState.putBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING,
-                mHandler.hasCallbacks(mResetErrorRunnable));
-        outState.putBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_HELP_SHOWING,
-                mHandler.hasCallbacks(mResetHelpRunnable));
-        outState.putInt(AuthDialog.KEY_BIOMETRIC_DIALOG_SIZE, mSize);
-    }
-
-    /**
-     * Invoked after inflation but before being attached to window.
-     * @param savedState
-     */
-    public void restoreState(@Nullable Bundle savedState) {
-        mSavedState = savedState;
-    }
-    private void setTextOrHide(TextView view, CharSequence charSequence) {
-        if (TextUtils.isEmpty(charSequence)) {
-            view.setVisibility(View.GONE);
-        } else {
-            view.setText(charSequence);
-        }
-
-        Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-    }
-
-    // Remove all pending icon and text animations
-    private void removePendingAnimations() {
-        mHandler.removeCallbacks(mResetHelpRunnable);
-        mHandler.removeCallbacks(mResetErrorRunnable);
-    }
-
-    private void showTemporaryMessage(String message, Runnable resetMessageRunnable) {
-        removePendingAnimations();
-        mIndicatorView.setText(message);
-        mIndicatorView.setTextColor(mTextColorError);
-        mIndicatorView.setVisibility(View.VISIBLE);
-        // select to enable marquee unless a screen reader is enabled
-        mIndicatorView.setSelected(!mAccessibilityManager.isEnabled()
-                || !mAccessibilityManager.isTouchExplorationEnabled());
-        mHandler.postDelayed(resetMessageRunnable, mAnimationDurationHideDialog);
-
-        Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-    }
-
-    @Override
-    protected void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        if (mSavedState != null) {
-            updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
-        }
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mTitleView = findViewById(R.id.title);
-        mSubtitleView = findViewById(R.id.subtitle);
-        mDescriptionView = findViewById(R.id.description);
-        mIconViewOverlay = findViewById(R.id.biometric_icon_overlay);
-        mIconView = findViewById(R.id.biometric_icon);
-        mIconHolderView = findViewById(R.id.biometric_icon_frame);
-        mIndicatorView = findViewById(R.id.indicator);
-
-        // Negative-side (left) buttons
-        mNegativeButton = findViewById(R.id.button_negative);
-        mCancelButton = findViewById(R.id.button_cancel);
-        mUseCredentialButton = findViewById(R.id.button_use_credential);
-
-        // Positive-side (right) buttons
-        mConfirmButton = findViewById(R.id.button_confirm);
-        mTryAgainButton = findViewById(R.id.button_try_again);
-
-        mNegativeButton.setOnClickListener((view) -> {
-            mCallback.onAction(Callback.ACTION_BUTTON_NEGATIVE);
-        });
-
-        mCancelButton.setOnClickListener((view) -> {
-            mCallback.onAction(Callback.ACTION_USER_CANCELED);
-        });
-
-        mUseCredentialButton.setOnClickListener((view) -> {
-            startTransitionToCredentialUI(false /* isError */);
-        });
-
-        mConfirmButton.setOnClickListener((view) -> {
-            updateState(STATE_AUTHENTICATED);
-        });
-
-        mTryAgainButton.setOnClickListener((view) -> {
-            updateState(STATE_AUTHENTICATING);
-            mCallback.onAction(Callback.ACTION_BUTTON_TRY_AGAIN);
-            mTryAgainButton.setVisibility(View.GONE);
-            Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this);
-        });
-
-        mIconController = createIconController();
-        if (mIconController.getActsAsConfirmButton()) {
-            mIconViewOverlay.setOnClickListener((view)->{
-                if (mState == STATE_PENDING_CONFIRMATION) {
-                    updateState(STATE_AUTHENTICATED);
-                }
-            });
-            mIconView.setOnClickListener((view) -> {
-                if (mState == STATE_PENDING_CONFIRMATION) {
-                    updateState(STATE_AUTHENTICATED);
-                }
-            });
-        }
-    }
-
-    /**
-     * Kicks off the animation process and invokes the callback.
-     *
-     * @param isError if this was triggered due to an error and not a user action (unused,
-     *                previously for haptics).
-     */
-    @Override
-    public void startTransitionToCredentialUI(boolean isError) {
-        updateSize(AuthDialog.SIZE_LARGE);
-        mCallback.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL);
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-
-        mTitleView.setText(mPromptInfo.getTitle());
-
-        // setSelected could make marquee work
-        mTitleView.setSelected(true);
-        mSubtitleView.setSelected(true);
-        // make description view become scrollable
-        mDescriptionView.setMovementMethod(new ScrollingMovementMethod());
-
-        if (isDeviceCredentialAllowed()) {
-            final CharSequence credentialButtonText;
-            @Utils.CredentialType final int credentialType =
-                    Utils.getCredentialType(mLockPatternUtils, mEffectiveUserId);
-            switch (credentialType) {
-                case Utils.CREDENTIAL_PIN:
-                    credentialButtonText =
-                            getResources().getString(R.string.biometric_dialog_use_pin);
-                    break;
-                case Utils.CREDENTIAL_PATTERN:
-                    credentialButtonText =
-                            getResources().getString(R.string.biometric_dialog_use_pattern);
-                    break;
-                case Utils.CREDENTIAL_PASSWORD:
-                default:
-                    credentialButtonText =
-                            getResources().getString(R.string.biometric_dialog_use_password);
-                    break;
-            }
-
-            mNegativeButton.setVisibility(View.GONE);
-
-            mUseCredentialButton.setText(credentialButtonText);
-            mUseCredentialButton.setVisibility(View.VISIBLE);
-        } else {
-            mNegativeButton.setText(mPromptInfo.getNegativeButtonText());
-        }
-
-        setTextOrHide(mSubtitleView, mPromptInfo.getSubtitle());
-        setTextOrHide(mDescriptionView, mPromptInfo.getDescription());
-
-        if (mSavedState == null) {
-            updateState(STATE_AUTHENTICATING_ANIMATING_IN);
-        } else {
-            // Restore as much state as possible first
-            updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
-
-            // Restore positive button(s) state
-            mConfirmButton.setVisibility(
-                    mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_CONFIRM_VISIBILITY));
-            if (mConfirmButton.getVisibility() == View.GONE) {
-                setRequireConfirmation(false);
-            }
-            mTryAgainButton.setVisibility(
-                    mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY));
-
-        }
-    }
-
-    @Override
-    protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-
-        mIconController.setDeactivated(true);
-
-        // Empty the handler, otherwise things like ACTION_AUTHENTICATED may be duplicated once
-        // the new dialog is restored.
-        mHandler.removeCallbacksAndMessages(null /* all */);
-    }
-
-    /**
-     * Contains all of the testable logic that should be invoked when {@link #onMeasure(int, int)}
-     * is invoked. In addition, this allows subclasses to implement custom measuring logic while
-     * allowing the base class to have common code to apply the custom measurements.
-     *
-     * @param width Width to constrain the measurements to.
-     * @param height Height to constrain the measurements to.
-     * @return See {@link AuthDialog.LayoutParams}
-     */
-    @NonNull
-    AuthDialog.LayoutParams onMeasureInternal(int width, int height) {
-        int totalHeight = 0;
-        final int numChildren = getChildCount();
-        for (int i = 0; i < numChildren; i++) {
-            final View child = getChildAt(i);
-
-            if (child.getId() == R.id.space_above_icon
-                    || child.getId() == R.id.space_below_icon
-                    || child.getId() == R.id.button_bar) {
-                child.measure(
-                        MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
-                        MeasureSpec.makeMeasureSpec(child.getLayoutParams().height,
-                                MeasureSpec.EXACTLY));
-            } else if (child.getId() == R.id.biometric_icon_frame) {
-                final View iconView = findViewById(R.id.biometric_icon);
-                child.measure(
-                        MeasureSpec.makeMeasureSpec(iconView.getLayoutParams().width,
-                                MeasureSpec.EXACTLY),
-                        MeasureSpec.makeMeasureSpec(iconView.getLayoutParams().height,
-                                MeasureSpec.EXACTLY));
-            } else if (child.getId() == R.id.biometric_icon) {
-                child.measure(
-                        MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST),
-                        MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
-            } else {
-                child.measure(
-                        MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
-                        MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST));
-            }
-
-            if (child.getVisibility() != View.GONE) {
-                totalHeight += child.getMeasuredHeight();
-            }
-        }
-
-        return new AuthDialog.LayoutParams(width, totalHeight);
-    }
-
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        int width = MeasureSpec.getSize(widthMeasureSpec);
-        int height = MeasureSpec.getSize(heightMeasureSpec);
-
-        if (mUseCustomBpSize) {
-            width = mCustomBpWidth;
-            height = mCustomBpHeight;
-        } else {
-            width = Math.min(width, height);
-        }
-
-        mLayoutParams = onMeasureInternal(width, height);
-
-        final Insets navBarInsets = Utils.getNavbarInsets(mContext);
-        final int navBarHeight = navBarInsets.bottom;
-        final int navBarWidth;
-        if (mPanelController.getPosition() == AuthPanelController.POSITION_LEFT) {
-            navBarWidth = navBarInsets.left;
-        } else if (mPanelController.getPosition() == AuthPanelController.POSITION_RIGHT) {
-            navBarWidth = navBarInsets.right;
-        } else {
-            navBarWidth = 0;
-        }
-
-        // The actual auth dialog w/h should include navigation bar size.
-        if (navBarWidth != 0 || navBarHeight != 0) {
-            mLayoutParams = new AuthDialog.LayoutParams(
-                    mLayoutParams.mMediumWidth + navBarWidth,
-                    mLayoutParams.mMediumHeight + navBarInsets.bottom);
-        }
-
-        setMeasuredDimension(mLayoutParams.mMediumWidth, mLayoutParams.mMediumHeight);
-    }
-
-    @Override
-    public void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        super.onLayout(changed, left, top, right, bottom);
-
-        // Start with initial size only once. Subsequent layout changes don't matter since we
-        // only care about the initial icon position.
-        if (mIconOriginalY == 0) {
-            mIconOriginalY = mIconHolderView.getY();
-            if (mSavedState == null) {
-                updateSize(!mRequireConfirmation && supportsSmallDialog() ? AuthDialog.SIZE_SMALL
-                        : AuthDialog.SIZE_MEDIUM);
-            } else {
-                updateSize(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_DIALOG_SIZE));
-
-                // Restore indicator text state only after size has been restored
-                final String indicatorText =
-                        mSavedState.getString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING);
-                if (mSavedState.getBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_HELP_SHOWING)) {
-                    onHelp(TYPE_NONE, indicatorText);
-                } else if (mSavedState.getBoolean(
-                        AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING)) {
-                    onAuthenticationFailed(TYPE_NONE, indicatorText);
-                }
-            }
-        }
-    }
-
-    private boolean isDeviceCredentialAllowed() {
-        return Utils.isDeviceCredentialAllowed(mPromptInfo);
-    }
-
-    public LottieAnimationView getIconView() {
-        return mIconView;
-    }
-
-    @AuthDialog.DialogSize int getSize() {
-        return mSize;
-    }
-
-    /** If authentication has successfully occurred and the view is done. */
-    boolean isAuthenticated() {
-        return mState == STATE_AUTHENTICATED;
-    }
-
-    /** If authentication is currently in progress. */
-    boolean isAuthenticating() {
-        return mState == STATE_AUTHENTICATING;
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt
deleted file mode 100644
index 68db564..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricViewAdapter.kt
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator
-import android.os.Bundle
-import android.view.View
-
-/** TODO(b/251476085): Temporary interface while legacy biometric prompt is around. */
-@Deprecated("temporary adapter while migrating biometric prompt - do not expand")
-interface AuthBiometricViewAdapter {
-    val legacyIconController: AuthIconController?
-
-    fun onDialogAnimatedIn(fingerprintWasStarted: Boolean)
-
-    fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int)
-
-    fun onAuthenticationFailed(
-        @BiometricAuthenticator.Modality modality: Int,
-        failureReason: String
-    )
-
-    fun onError(@BiometricAuthenticator.Modality modality: Int, error: String)
-
-    fun onHelp(@BiometricAuthenticator.Modality modality: Int, help: String)
-
-    fun startTransitionToCredentialUI(isError: Boolean)
-
-    fun requestLayout()
-
-    fun onSaveState(bundle: Bundle?)
-
-    fun restoreState(bundle: Bundle?)
-
-    fun onOrientationChanged()
-
-    fun cancelAnimation()
-
-    fun isCoex(): Boolean
-
-    fun asView(): View
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
index 7464c88..c7d7fe3 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java
@@ -17,9 +17,7 @@
 package com.android.systemui.biometrics;
 
 import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
-import static android.hardware.biometrics.SensorProperties.STRENGTH_STRONG;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-
 import static com.android.internal.jank.InteractionJankMonitor.CUJ_BIOMETRIC_PROMPT_TRANSITION;
 
 import android.animation.Animator;
@@ -35,7 +33,6 @@
 import android.hardware.face.FaceSensorPropertiesInternal;
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
 import android.os.Binder;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
@@ -70,15 +67,16 @@
 import com.android.systemui.biometrics.AuthController.ScaleFactorProvider;
 import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor;
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor;
-import com.android.systemui.biometrics.domain.model.BiometricModalities;
+import com.android.systemui.biometrics.shared.model.BiometricModalities;
 import com.android.systemui.biometrics.ui.BiometricPromptLayout;
 import com.android.systemui.biometrics.ui.CredentialView;
 import com.android.systemui.biometrics.ui.binder.BiometricViewBinder;
+import com.android.systemui.biometrics.ui.binder.BiometricViewSizeBinder;
+import com.android.systemui.biometrics.ui.binder.Spaghetti;
 import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
 import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
 import com.android.systemui.dagger.qualifiers.Background;
 import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
 import com.android.systemui.keyguard.WakefulnessLifecycle;
 import com.android.systemui.statusbar.VibratorHelper;
 import com.android.systemui.util.concurrency.DelayableExecutor;
@@ -96,7 +94,10 @@
 
 /**
  * Top level container/controller for the BiometricPrompt UI.
+ *
+ * @deprecated TODO(b/287311775): remove and merge view/layouts into new prompt.
  */
+@Deprecated
 public class AuthContainerView extends LinearLayout
         implements AuthDialog, WakefulnessLifecycle.Observer, CredentialView.Host {
 
@@ -104,6 +105,7 @@
 
     private static final int ANIMATION_DURATION_SHOW_MS = 250;
     private static final int ANIMATION_DURATION_AWAY_MS = 350;
+    private static final int ANIMATE_CREDENTIAL_START_DELAY_MS = 300;
 
     private static final int STATE_UNKNOWN = 0;
     private static final int STATE_ANIMATING_IN = 1;
@@ -138,16 +140,16 @@
     private final InteractionJankMonitor mInteractionJankMonitor;
     private final CoroutineScope mApplicationCoroutineScope;
 
-    // TODO: these should be migrated out once ready
+    // TODO(b/287311775): these should be migrated out once ready
     private final Provider<PromptCredentialInteractor> mPromptCredentialInteractor;
     private final @NonNull Provider<PromptSelectorInteractor> mPromptSelectorInteractorProvider;
-    // TODO(b/251476085): these should be migrated out of the view
+    // TODO(b/287311775): these should be migrated out of the view
     private final Provider<CredentialViewModel> mCredentialViewModelProvider;
     private final PromptViewModel mPromptViewModel;
 
     @VisibleForTesting final BiometricCallback mBiometricCallback;
 
-    @Nullable private AuthBiometricViewAdapter mBiometricView;
+    @Nullable private Spaghetti mBiometricView;
     @Nullable private View mCredentialView;
     private final AuthPanelController mPanelController;
     private final FrameLayout mFrameLayout;
@@ -166,7 +168,7 @@
     // HAT received from LockSettingsService when credential is verified.
     @Nullable private byte[] mCredentialAttestation;
 
-    // TODO(b/251476085): remove when legacy prompt is replaced
+    // TODO(b/287311775): remove when legacy prompt is replaced
     @Deprecated
     static class Config {
         Context mContext;
@@ -184,42 +186,50 @@
     }
 
     @VisibleForTesting
-    final class BiometricCallback implements AuthBiometricView.Callback {
+    final class BiometricCallback implements Spaghetti.Callback {
         @Override
-        public void onAction(int action) {
-            switch (action) {
-                case AuthBiometricView.Callback.ACTION_AUTHENTICATED:
-                    animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED);
-                    break;
-                case AuthBiometricView.Callback.ACTION_USER_CANCELED:
-                    sendEarlyUserCanceled();
-                    animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
-                    break;
-                case AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE:
-                    animateAway(AuthDialogCallback.DISMISSED_BUTTON_NEGATIVE);
-                    break;
-                case AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN:
-                    mFailedModalities.clear();
-                    mConfig.mCallback.onTryAgainPressed(getRequestId());
-                    break;
-                case AuthBiometricView.Callback.ACTION_ERROR:
-                    animateAway(AuthDialogCallback.DISMISSED_ERROR);
-                    break;
-                case AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL:
-                    mConfig.mCallback.onDeviceCredentialPressed(getRequestId());
-                    mHandler.postDelayed(() -> {
-                        addCredentialView(false /* animatePanel */, true /* animateContents */);
-                    }, mConfig.mSkipAnimation ? 0 : AuthDialog.ANIMATE_CREDENTIAL_START_DELAY_MS);
-                    break;
-                case AuthBiometricView.Callback.ACTION_START_DELAYED_FINGERPRINT_SENSOR:
-                    mConfig.mCallback.onStartFingerprintNow(getRequestId());
-                    break;
-                case AuthBiometricView.Callback.ACTION_AUTHENTICATED_AND_CONFIRMED:
-                    animateAway(AuthDialogCallback.DISMISSED_BUTTON_POSITIVE);
-                    break;
-                default:
-                    Log.e(TAG, "Unhandled action: " + action);
-            }
+        public void onAuthenticated() {
+            animateAway(AuthDialogCallback.DISMISSED_BIOMETRIC_AUTHENTICATED);
+        }
+
+        @Override
+        public void onUserCanceled() {
+            sendEarlyUserCanceled();
+            animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
+        }
+
+        @Override
+        public void onButtonNegative() {
+            animateAway(AuthDialogCallback.DISMISSED_BUTTON_NEGATIVE);
+        }
+
+        @Override
+        public void onButtonTryAgain() {
+            mFailedModalities.clear();
+            mConfig.mCallback.onTryAgainPressed(getRequestId());
+        }
+
+        @Override
+        public void onError() {
+            animateAway(AuthDialogCallback.DISMISSED_ERROR);
+        }
+
+        @Override
+        public void onUseDeviceCredential() {
+            mConfig.mCallback.onDeviceCredentialPressed(getRequestId());
+            mHandler.postDelayed(() -> {
+                addCredentialView(false /* animatePanel */, true /* animateContents */);
+            }, mConfig.mSkipAnimation ? 0 : ANIMATE_CREDENTIAL_START_DELAY_MS);
+        }
+
+        @Override
+        public void onStartDelayedFingerprintSensor() {
+            mConfig.mCallback.onStartFingerprintNow(getRequestId());
+        }
+
+        @Override
+        public void onAuthenticatedAndConfirmed() {
+            animateAway(AuthDialogCallback.DISMISSED_BUTTON_POSITIVE);
         }
     }
 
@@ -355,14 +365,10 @@
         mCredentialViewModelProvider = credentialViewModelProvider;
         mPromptViewModel = promptViewModel;
 
-        if (featureFlags.isEnabled(Flags.BIOMETRIC_BP_STRONG)) {
-            showPrompt(config, layoutInflater, promptViewModel,
-                    Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds),
-                    Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds),
-                    vibratorHelper, featureFlags);
-        } else {
-            showLegacyPrompt(config, layoutInflater, fpProps, faceProps);
-        }
+        showPrompt(config, layoutInflater, promptViewModel,
+                Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds),
+                Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds),
+                vibratorHelper, featureFlags);
 
         // TODO: De-dupe the logic with AuthCredentialPasswordView
         setOnKeyListener((v, keyCode, event) -> {
@@ -398,7 +404,8 @@
                     R.layout.biometric_prompt_layout, null, false);
             mBiometricView = BiometricViewBinder.bind(view, viewModel, mPanelController,
                     // TODO(b/201510778): This uses the wrong timeout in some cases
-                    getJankListener(view, TRANSIT, AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS),
+                    getJankListener(view, TRANSIT,
+                            BiometricViewSizeBinder.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS),
                     mBackgroundView, mBiometricCallback, mApplicationCoroutineScope,
                     vibratorHelper, featureFlags);
 
@@ -412,60 +419,6 @@
         }
     }
 
-    // TODO(b/251476085): remove entirely
-    private void showLegacyPrompt(@NonNull Config config, @NonNull LayoutInflater layoutInflater,
-            @Nullable List<FingerprintSensorPropertiesInternal> fpProps,
-            @Nullable List<FaceSensorPropertiesInternal> faceProps
-    ) {
-        // Inflate biometric view only if necessary.
-        if (Utils.isBiometricAllowed(mConfig.mPromptInfo)) {
-            final FingerprintSensorPropertiesInternal fpProperties =
-                    Utils.findFirstSensorProperties(fpProps, mConfig.mSensorIds);
-            final FaceSensorPropertiesInternal faceProperties =
-                    Utils.findFirstSensorProperties(faceProps, mConfig.mSensorIds);
-
-            if (fpProperties != null && faceProperties != null) {
-                final AuthBiometricFingerprintAndFaceView fingerprintAndFaceView =
-                        (AuthBiometricFingerprintAndFaceView) layoutInflater.inflate(
-                                R.layout.auth_biometric_fingerprint_and_face_view, null, false);
-                fingerprintAndFaceView.setSensorProperties(fpProperties);
-                fingerprintAndFaceView.setScaleFactorProvider(config.mScaleProvider);
-                fingerprintAndFaceView.updateOverrideIconLayoutParamsSize();
-                fingerprintAndFaceView.setFaceClass3(
-                        faceProperties.sensorStrength == STRENGTH_STRONG);
-                mBiometricView = fingerprintAndFaceView;
-            } else if (fpProperties != null) {
-                final AuthBiometricFingerprintView fpView =
-                        (AuthBiometricFingerprintView) layoutInflater.inflate(
-                                R.layout.auth_biometric_fingerprint_view, null, false);
-                fpView.setSensorProperties(fpProperties);
-                fpView.setScaleFactorProvider(config.mScaleProvider);
-                fpView.updateOverrideIconLayoutParamsSize();
-                mBiometricView = fpView;
-            } else if (faceProperties != null) {
-                mBiometricView = (AuthBiometricFaceView) layoutInflater.inflate(
-                        R.layout.auth_biometric_face_view, null, false);
-            } else {
-                Log.e(TAG, "No sensors found!");
-            }
-        }
-
-        // init view before showing
-        if (mBiometricView != null) {
-            final AuthBiometricView view = (AuthBiometricView) mBiometricView;
-            view.setRequireConfirmation(mConfig.mRequireConfirmation);
-            view.setPanelController(mPanelController);
-            view.setPromptInfo(mConfig.mPromptInfo);
-            view.setCallback(mBiometricCallback);
-            view.setBackgroundView(mBackgroundView);
-            view.setUserId(mConfig.mUserId);
-            view.setEffectiveUserId(mEffectiveUserId);
-            // TODO(b/201510778): This uses the wrong timeout in some cases (remove w/ above)
-            view.setJankListener(getJankListener(view, TRANSIT,
-                    AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS));
-        }
-    }
-
     private void onBackInvoked() {
         sendEarlyUserCanceled();
         animateAway(AuthDialogCallback.DISMISSED_USER_CANCELED);
@@ -533,9 +486,6 @@
     @Override
     public void onOrientationChanged() {
         maybeUpdatePositionForUdfps(true /* invalidate */);
-        if (mBiometricView != null) {
-            mBiometricView.onOrientationChanged();
-        }
     }
 
     @Override
@@ -621,10 +571,6 @@
     }
 
     private static boolean shouldUpdatePositionForUdfps(@NonNull View view) {
-        // TODO(b/251476085): legacy view (delete when removed)
-        if (view instanceof AuthBiometricFingerprintView) {
-            return ((AuthBiometricFingerprintView) view).isUdfps();
-        }
         if (view instanceof BiometricPromptLayout) {
             // this will force the prompt to align itself on the edge of the screen
             // instead of centering (temporary workaround to prevent small implicit view
@@ -672,7 +618,6 @@
 
         if (invalidate) {
             mPanelView.invalidateOutline();
-            mBiometricView.requestLayout();
         }
 
         return true;
@@ -702,11 +647,7 @@
     }
 
     @Override
-    public void show(WindowManager wm, @Nullable Bundle savedState) {
-        if (mBiometricView != null) {
-            mBiometricView.restoreState(savedState);
-        }
-
+    public void show(WindowManager wm) {
         wm.addView(this, getLayoutParams(mWindowToken, mConfig.mPromptInfo.getTitle()));
     }
 
@@ -781,7 +722,7 @@
             if (mFailedModalities.contains(TYPE_FACE)) {
                 Log.d(TAG, "retrying failed modalities (pointer down)");
                 mFailedModalities.remove(TYPE_FACE);
-                mBiometricCallback.onAction(AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN);
+                mBiometricCallback.onButtonTryAgain();
             }
         } else {
             Log.e(TAG, "onPointerDown(): mBiometricView is null");
@@ -789,21 +730,6 @@
     }
 
     @Override
-    public void onSaveState(@NonNull Bundle outState) {
-        outState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY,
-                mContainerState == STATE_ANIMATING_OUT);
-        // In the case where biometric and credential are both allowed, we can assume that
-        // biometric isn't showing if credential is showing since biometric is shown first.
-        outState.putBoolean(AuthDialog.KEY_BIOMETRIC_SHOWING,
-                mBiometricView != null && mCredentialView == null);
-        outState.putBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING, mCredentialView != null);
-
-        if (mBiometricView != null) {
-            mBiometricView.onSaveState(outState);
-        }
-    }
-
-    @Override
     public String getOpPackageName() {
         return mConfig.mOpPackageName;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
index d5289a4..b752c3b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java
@@ -50,7 +50,6 @@
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
 import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback;
 import android.hardware.fingerprint.IUdfpsRefreshRateRequestCallback;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.RemoteException;
 import android.os.UserManager;
@@ -67,12 +66,11 @@
 import com.android.internal.jank.InteractionJankMonitor;
 import com.android.internal.os.SomeArgs;
 import com.android.internal.widget.LockPatternUtils;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
 import com.android.systemui.CoreStartable;
 import com.android.systemui.biometrics.domain.interactor.LogContextInteractor;
 import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor;
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
 import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
 import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
 import com.android.systemui.dagger.SysUISingleton;
@@ -88,8 +86,6 @@
 import com.android.systemui.util.concurrency.DelayableExecutor;
 import com.android.systemui.util.concurrency.Execution;
 
-import kotlin.Unit;
-
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -103,6 +99,8 @@
 import javax.inject.Inject;
 import javax.inject.Provider;
 
+import kotlin.Unit;
+
 import kotlinx.coroutines.CoroutineScope;
 
 /**
@@ -967,7 +965,7 @@
             skipAnimation = true;
         }
 
-        showDialog(args, skipAnimation, null /* savedState */, mPromptViewModelProvider.get());
+        showDialog(args, skipAnimation, mPromptViewModelProvider.get());
     }
 
     /**
@@ -1199,7 +1197,7 @@
         return mFpEnrolledForUser.getOrDefault(userId, false);
     }
 
-    private void showDialog(SomeArgs args, boolean skipAnimation, Bundle savedState,
+    private void showDialog(SomeArgs args, boolean skipAnimation,
             @Nullable PromptViewModel viewModel) {
         mCurrentDialogArgs = args;
 
@@ -1239,7 +1237,6 @@
 
         if (DEBUG) {
             Log.d(TAG, "userId: " + userId
-                    + " savedState: " + savedState
                     + " mCurrentDialog: " + mCurrentDialog
                     + " newDialog: " + newDialog);
         }
@@ -1261,7 +1258,7 @@
         if (!promptInfo.isAllowBackgroundAuthentication() && !isOwnerInForeground()) {
             cancelIfOwnerIsNotInForeground();
         } else {
-            mCurrentDialog.show(mWindowManager, savedState);
+            mCurrentDialog.show(mWindowManager);
         }
     }
 
@@ -1283,29 +1280,12 @@
     public void onConfigurationChanged(Configuration newConfig) {
         updateSensorLocations();
 
-        // Save the state of the current dialog (buttons showing, etc)
+        // TODO(b/287311775): consider removing this to retain the UI cleanly vs re-creating
         if (mCurrentDialog != null) {
             final PromptViewModel viewModel = mCurrentDialog.getViewModel();
-            final Bundle savedState = new Bundle();
-            mCurrentDialog.onSaveState(savedState);
             mCurrentDialog.dismissWithoutCallback(false /* animate */);
             mCurrentDialog = null;
-
-            // Only show the dialog if necessary. If it was animating out, the dialog is supposed
-            // to send its pending callback immediately.
-            if (!savedState.getBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false)) {
-                final boolean credentialShowing =
-                        savedState.getBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING);
-                if (credentialShowing) {
-                    // There may be a cleaner way to do this, rather than altering the current
-                    // authentication's parameters. This gets the job done and should be clear
-                    // enough for now.
-                    PromptInfo promptInfo = (PromptInfo) mCurrentDialogArgs.arg1;
-                    promptInfo.setAuthenticators(Authenticators.DEVICE_CREDENTIAL);
-                }
-
-                showDialog(mCurrentDialogArgs, true /* skipAnimation */, savedState, viewModel);
-            }
+            showDialog(mCurrentDialogArgs, true /* skipAnimation */, viewModel);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
index 3cfc6f2..3fd488c 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthDialog.java
@@ -16,59 +16,20 @@
 
 package com.android.systemui.biometrics;
 
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.hardware.biometrics.BiometricAuthenticator.Modality;
-import android.os.Bundle;
 import android.view.WindowManager;
 
 import com.android.systemui.Dumpable;
 import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
 /**
  * Interface for the biometric dialog UI.
  *
- * TODO(b/251476085): remove along with legacy controller once flag is removed
+ * TODO(b/287311775): remove along with legacy controller once flag is removed
  */
 @Deprecated
 public interface AuthDialog extends Dumpable {
 
-    String KEY_CONTAINER_GOING_AWAY = "container_going_away";
-    String KEY_BIOMETRIC_SHOWING = "biometric_showing";
-    String KEY_CREDENTIAL_SHOWING = "credential_showing";
-
-    String KEY_BIOMETRIC_CONFIRM_VISIBILITY = "confirm_visibility";
-    String KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY = "try_agian_visibility";
-    String KEY_BIOMETRIC_STATE = "state";
-    String KEY_BIOMETRIC_INDICATOR_STRING = "indicator_string"; // error / help / hint
-    String KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING = "error_is_temporary";
-    String KEY_BIOMETRIC_INDICATOR_HELP_SHOWING = "hint_is_temporary";
-    String KEY_BIOMETRIC_DIALOG_SIZE = "size";
-
-    String KEY_BIOMETRIC_SENSOR_TYPE = "sensor_type";
-    String KEY_BIOMETRIC_SENSOR_PROPS = "sensor_props";
-
-    int SIZE_UNKNOWN = 0;
-    /**
-     * Minimal UI, showing only biometric icon.
-     */
-    int SIZE_SMALL = 1;
-    /**
-     * Normal-sized biometric UI, showing title, icon, buttons, etc.
-     */
-    int SIZE_MEDIUM = 2;
-    /**
-     * Full-screen credential UI.
-     */
-    int SIZE_LARGE = 3;
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({SIZE_UNKNOWN, SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE})
-    @interface DialogSize {}
-
     /**
      * Parameters used when laying out {@link AuthBiometricView}, its subclasses, and
      * {@link AuthPanelController}.
@@ -84,27 +45,10 @@
     }
 
     /**
-     * Animation duration, from small to medium dialog, including back panel, icon translation, etc
-     */
-    int ANIMATE_SMALL_TO_MEDIUM_DURATION_MS = 150;
-    /**
-     * Animation duration from medium to large dialog, including biometric fade out, back panel, etc
-     */
-    int ANIMATE_MEDIUM_TO_LARGE_DURATION_MS = 450;
-    /**
-     * Delay before notifying {@link AuthCredentialView} to start animating in.
-     */
-    int ANIMATE_CREDENTIAL_START_DELAY_MS = ANIMATE_MEDIUM_TO_LARGE_DURATION_MS * 2 / 3;
-    /**
-     * Animation duration when sliding in credential UI
-     */
-    int ANIMATE_CREDENTIAL_INITIAL_DURATION_MS = 150;
-
-    /**
      * Show the dialog.
      * @param wm
      */
-    void show(WindowManager wm, @Nullable Bundle savedState);
+    void show(WindowManager wm);
 
     /**
      * Dismiss the dialog without sending a callback.
@@ -146,12 +90,6 @@
     void onPointerDown();
 
     /**
-     * Save the current state.
-     * @param outState
-     */
-    void onSaveState(@NonNull Bundle outState);
-
-    /**
      * Get the client's package name
      */
     String getOpPackageName();
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
index f56bb88..958213a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthIconController.kt
@@ -24,7 +24,7 @@
 import android.util.Log
 import com.airbnb.lottie.LottieAnimationView
 import com.airbnb.lottie.LottieCompositionFactory
-import com.android.systemui.biometrics.AuthBiometricView.BiometricState
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
 
 private const val TAG = "AuthIconController"
 
@@ -76,7 +76,7 @@
     }
 
     /** Update the icon to reflect the [newState]. */
-    fun updateState(@BiometricState lastState: Int, @BiometricState newState: Int) {
+    fun updateState(lastState: BiometricState, newState: BiometricState) {
         if (deactivated) {
             Log.w(TAG, "Ignoring updateState when deactivated: $newState")
         } else {
@@ -85,7 +85,7 @@
     }
 
     /** Call during [updateState] if the controller is not [deactivated]. */
-    abstract fun updateIcon(@BiometricState lastState: Int, @BiometricState newState: Int)
+    abstract fun updateIcon(lastState: BiometricState, newState: BiometricState)
 
     /** Called during [onAnimationEnd] if the controller is not [deactivated]. */
     open fun handleAnimationEnd(drawable: Drawable) {}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
index ea9fe5f..141983b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
@@ -25,14 +25,14 @@
 import android.hardware.biometrics.BiometricSourceType
 import android.util.DisplayMetrics
 import androidx.annotation.VisibleForTesting
+import com.android.app.animation.Interpolators
 import com.android.keyguard.KeyguardUpdateMonitor
 import com.android.keyguard.KeyguardUpdateMonitorCallback
 import com.android.keyguard.logging.KeyguardLogger
 import com.android.settingslib.Utils
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.CoreStartable
 import com.android.systemui.R
-import com.android.app.animation.Interpolators
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.flags.FeatureFlags
 import com.android.systemui.flags.Flags
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
index 94b5fb2..66fb8ca 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationViewController.kt
@@ -18,14 +18,22 @@
 import android.animation.ValueAnimator
 import android.graphics.PointF
 import android.graphics.RectF
-import com.android.systemui.Dumpable
+import androidx.annotation.VisibleForTesting
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.repeatOnLifecycle
 import com.android.app.animation.Interpolators
+import com.android.systemui.Dumpable
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
+import com.android.systemui.lifecycle.repeatWhenAttached
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionListener
-import com.android.systemui.shade.ShadeExpansionStateManager
+import com.android.systemui.statusbar.StatusBarState.SHADE
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
 import com.android.systemui.util.ViewController
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.launch
 import java.io.PrintWriter
 
 /**
@@ -41,7 +49,7 @@
 abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
     view: T,
     protected val statusBarStateController: StatusBarStateController,
-    protected val shadeExpansionStateManager: ShadeExpansionStateManager,
+    protected val primaryBouncerInteractor: PrimaryBouncerInteractor,
     protected val dialogManager: SystemUIDialogManager,
     private val dumpManager: DumpManager
 ) : ViewController<T>(view), Dumpable {
@@ -54,14 +62,6 @@
     private var dialogAlphaAnimator: ValueAnimator? = null
     private val dialogListener = SystemUIDialogManager.Listener { runDialogAlphaAnimator() }
 
-    private val shadeExpansionListener = ShadeExpansionListener { event ->
-        // Notification shade can be expanded but not visible (fraction: 0.0), for example
-        // when a heads-up notification (HUN) is showing.
-        notificationShadeVisible = event.expanded && event.fraction > 0f
-        view.onExpansionChanged(event.fraction)
-        updatePauseAuth()
-    }
-
     /** If the notification shade is visible. */
     var notificationShadeVisible: Boolean = false
 
@@ -88,6 +88,30 @@
         view.updateAlpha()
     }
 
+    init {
+        view.repeatWhenAttached {
+            // repeatOnLifecycle CREATED (as opposed to STARTED) because the Bouncer expansion
+            // can make the view not visible; and we still want to listen for events
+            // that may make the view visible again.
+            repeatOnLifecycle(Lifecycle.State.CREATED) {
+                listenForBouncerExpansion(this)
+            }
+        }
+    }
+
+    @VisibleForTesting
+    open suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
+        return scope.launch {
+            primaryBouncerInteractor.bouncerExpansion.map { 1f - it }.collect { expansion: Float ->
+                if (statusBarStateController.state != SHADE) {
+                    notificationShadeVisible = expansion > 0f
+                    view.onExpansionChanged(expansion)
+                    updatePauseAuth()
+                }
+            }
+        }
+    }
+
     fun runDialogAlphaAnimator() {
         val hideAffordance = dialogManager.shouldHideAffordance()
         dialogAlphaAnimator?.cancel()
@@ -108,15 +132,11 @@
     }
 
     override fun onViewAttached() {
-        val currentState =
-            shadeExpansionStateManager.addExpansionListener(shadeExpansionListener)
-        shadeExpansionListener.onPanelExpansionChanged(currentState)
         dialogManager.registerListener(dialogListener)
         dumpManager.registerDumpable(dumpTag, this)
     }
 
     override fun onViewDetached() {
-        shadeExpansionStateManager.removeExpansionListener(shadeExpansionListener)
         dialogManager.unregisterListener(dialogListener)
         dumpManager.unregisterDumpable(dumpTag)
     }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
index 802eea3..03749a9 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsBpViewController.kt
@@ -15,9 +15,9 @@
  */
 package com.android.systemui.biometrics
 
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
 
 /**
@@ -26,13 +26,13 @@
 class UdfpsBpViewController(
     view: UdfpsBpView,
     statusBarStateController: StatusBarStateController,
-    shadeExpansionStateManager: ShadeExpansionStateManager,
+    primaryBouncerInteractor: PrimaryBouncerInteractor,
     systemUIDialogManager: SystemUIDialogManager,
     dumpManager: DumpManager
 ) : UdfpsAnimationViewController<UdfpsBpView>(
     view,
     statusBarStateController,
-    shadeExpansionStateManager,
+    primaryBouncerInteractor,
     systemUIDialogManager,
     dumpManager
 ) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
index a368703..0264356 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
@@ -60,6 +60,7 @@
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.annotation.OptIn;
 
 import com.android.internal.R;
 import com.android.internal.annotations.VisibleForTesting;
@@ -67,11 +68,10 @@
 import com.android.internal.util.LatencyTracker;
 import com.android.keyguard.FaceAuthApiRequestReason;
 import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
 import com.android.systemui.Dumpable;
 import com.android.systemui.animation.ActivityLaunchAnimator;
 import com.android.systemui.biometrics.dagger.BiometricsBackground;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
 import com.android.systemui.biometrics.udfps.InteractionEvent;
 import com.android.systemui.biometrics.udfps.NormalizedTouchData;
 import com.android.systemui.biometrics.udfps.SinglePointerTouchProcessor;
@@ -92,7 +92,6 @@
 import com.android.systemui.log.SessionTracker;
 import com.android.systemui.plugins.FalsingManager;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.shade.ShadeExpansionStateManager;
 import com.android.systemui.shared.system.SysUiStatsLog;
 import com.android.systemui.statusbar.LockscreenShadeTransitionController;
 import com.android.systemui.statusbar.VibratorHelper;
@@ -118,6 +117,8 @@
 import javax.inject.Inject;
 import javax.inject.Provider;
 
+import kotlinx.coroutines.ExperimentalCoroutinesApi;
+
 /**
  * Shows and hides the under-display fingerprint sensor (UDFPS) overlay, handles UDFPS touch events,
  * and toggles the UDFPS display mode.
@@ -149,7 +150,6 @@
     private final WindowManager mWindowManager;
     private final DelayableExecutor mFgExecutor;
     @NonNull private final Executor mBiometricExecutor;
-    @NonNull private final ShadeExpansionStateManager mShadeExpansionStateManager;
     @NonNull private final StatusBarStateController mStatusBarStateController;
     @NonNull private final KeyguardStateController mKeyguardStateController;
     @NonNull private final StatusBarKeyguardViewManager mKeyguardViewManager;
@@ -256,31 +256,53 @@
 
     @Override
     public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
+        final int touchConfigId = mContext.getResources().getInteger(
+                com.android.internal.R.integer.config_selected_udfps_touch_detection);
         pw.println("mSensorProps=(" + mSensorProps + ")");
         pw.println("Using new touch detection framework: " + mFeatureFlags.isEnabled(
                 Flags.UDFPS_NEW_TOUCH_DETECTION));
-        pw.println("Using ellipse touch detection: " + mFeatureFlags.isEnabled(
-                Flags.UDFPS_ELLIPSE_DETECTION));
+        pw.println("touchConfigId: " + touchConfigId);
     }
 
     public class UdfpsOverlayController extends IUdfpsOverlayController.Stub {
+        @OptIn(markerClass = ExperimentalCoroutinesApi.class)
         @Override
         public void showUdfpsOverlay(long requestId, int sensorId, int reason,
                 @NonNull IUdfpsOverlayControllerCallback callback) {
             mFgExecutor.execute(() -> UdfpsController.this.showUdfpsOverlay(
-                    new UdfpsControllerOverlay(mContext, mFingerprintManager, mInflater,
-                            mWindowManager, mAccessibilityManager, mStatusBarStateController,
-                            mShadeExpansionStateManager, mKeyguardViewManager,
-                            mKeyguardUpdateMonitor, mDialogManager, mDumpManager,
-                            mLockscreenShadeTransitionController, mConfigurationController,
-                            mKeyguardStateController,
-                            mUnlockedScreenOffAnimationController,
-                            mUdfpsDisplayMode, mSecureSettings, requestId, reason, callback,
-                            (view, event, fromUdfpsView) -> onTouch(requestId, event,
-                                    fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags,
-                            mPrimaryBouncerInteractor, mAlternateBouncerInteractor, mUdfpsUtils,
-                            mUdfpsKeyguardAccessibilityDelegate,
-                            mUdfpsKeyguardViewModels)));
+                    new UdfpsControllerOverlay(
+                        mContext,
+                        mFingerprintManager,
+                        mInflater,
+                        mWindowManager,
+                        mAccessibilityManager,
+                        mStatusBarStateController,
+                        mKeyguardViewManager,
+                        mKeyguardUpdateMonitor,
+                        mDialogManager,
+                        mDumpManager,
+                        mLockscreenShadeTransitionController,
+                        mConfigurationController,
+                        mKeyguardStateController,
+                        mUnlockedScreenOffAnimationController,
+                        mUdfpsDisplayMode,
+                        mSecureSettings,
+                        requestId,
+                        reason,
+                        callback,
+                        (view, event, fromUdfpsView) -> onTouch(
+                            requestId,
+                            event,
+                            fromUdfpsView
+                        ),
+                        mActivityLaunchAnimator,
+                        mFeatureFlags,
+                        mPrimaryBouncerInteractor,
+                        mAlternateBouncerInteractor,
+                        mUdfpsUtils,
+                        mUdfpsKeyguardAccessibilityDelegate,
+                        mUdfpsKeyguardViewModels
+                    )));
         }
 
         @Override
@@ -814,7 +836,6 @@
             @NonNull WindowManager windowManager,
             @NonNull StatusBarStateController statusBarStateController,
             @Main DelayableExecutor fgExecutor,
-            @NonNull ShadeExpansionStateManager shadeExpansionStateManager,
             @NonNull StatusBarKeyguardViewManager statusBarKeyguardViewManager,
             @NonNull DumpManager dumpManager,
             @NonNull KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -859,7 +880,6 @@
         mFingerprintManager = checkNotNull(fingerprintManager);
         mWindowManager = windowManager;
         mFgExecutor = fgExecutor;
-        mShadeExpansionStateManager = shadeExpansionStateManager;
         mStatusBarStateController = statusBarStateController;
         mKeyguardStateController = keyguardStateController;
         mKeyguardViewManager = statusBarKeyguardViewManager;
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
index d6ef94d..941df687 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
@@ -46,10 +46,9 @@
 import androidx.annotation.LayoutRes
 import androidx.annotation.VisibleForTesting
 import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
-import com.android.settingslib.udfps.UdfpsUtils
 import com.android.systemui.R
 import com.android.systemui.animation.ActivityLaunchAnimator
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.biometrics.ui.controller.UdfpsKeyguardViewController
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
@@ -60,7 +59,6 @@
 import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
 import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.LockscreenShadeTransitionController
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
@@ -90,7 +88,6 @@
         private val windowManager: WindowManager,
         private val accessibilityManager: AccessibilityManager,
         private val statusBarStateController: StatusBarStateController,
-        private val shadeExpansionStateManager: ShadeExpansionStateManager,
         private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager,
         private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
         private val dialogManager: SystemUIDialogManager,
@@ -245,7 +242,7 @@
                         updateAccessibilityViewLocation(sensorBounds)
                     },
                     statusBarStateController,
-                    shadeExpansionStateManager,
+                    primaryBouncerInteractor,
                     dialogManager,
                     dumpManager
                 )
@@ -256,7 +253,7 @@
                     UdfpsKeyguardViewController(
                         view.addUdfpsView(R.layout.udfps_keyguard_view),
                         statusBarStateController,
-                        shadeExpansionStateManager,
+                        primaryBouncerInteractor,
                         dialogManager,
                         dumpManager,
                         alternateBouncerInteractor,
@@ -268,7 +265,6 @@
                             updateSensorLocation(sensorBounds)
                         },
                         statusBarStateController,
-                        shadeExpansionStateManager,
                         statusBarKeyguardViewManager,
                         keyguardUpdateMonitor,
                         dumpManager,
@@ -291,7 +287,7 @@
                 UdfpsBpViewController(
                     view.addUdfpsView(R.layout.udfps_bp_view),
                     statusBarStateController,
-                    shadeExpansionStateManager,
+                    primaryBouncerInteractor,
                     dialogManager,
                     dumpManager
                 )
@@ -301,7 +297,7 @@
                 UdfpsFpmEmptyViewController(
                     view.addUdfpsView(R.layout.udfps_fpm_empty_view),
                     statusBarStateController,
-                    shadeExpansionStateManager,
+                    primaryBouncerInteractor,
                     dialogManager,
                     dumpManager
                 )
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
index d122d64..88002e7 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt
@@ -15,9 +15,9 @@
  */
 package com.android.systemui.biometrics
 
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
 
 /**
@@ -28,13 +28,13 @@
 class UdfpsFpmEmptyViewController(
     view: UdfpsFpmEmptyView,
     statusBarStateController: StatusBarStateController,
-    shadeExpansionStateManager: ShadeExpansionStateManager,
+    primaryBouncerInteractor: PrimaryBouncerInteractor,
     systemUIDialogManager: SystemUIDialogManager,
     dumpManager: DumpManager
 ) : UdfpsAnimationViewController<UdfpsFpmEmptyView>(
     view,
     statusBarStateController,
-    shadeExpansionStateManager,
+    primaryBouncerInteractor,
     systemUIDialogManager,
     dumpManager
 ) {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
index e3fd3ce1..84a746c 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt
@@ -37,8 +37,6 @@
 import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
 import com.android.systemui.lifecycle.repeatWhenAttached
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionListener
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.LockscreenShadeTransitionController
 import com.android.systemui.statusbar.StatusBarState
 import com.android.systemui.statusbar.notification.stack.StackStateAnimator
@@ -55,11 +53,9 @@
 import kotlinx.coroutines.launch
 
 /** Class that coordinates non-HBM animations during keyguard authentication. */
-open class UdfpsKeyguardViewControllerLegacy
-constructor(
+open class UdfpsKeyguardViewControllerLegacy(
     private val view: UdfpsKeyguardViewLegacy,
     statusBarStateController: StatusBarStateController,
-    shadeExpansionStateManager: ShadeExpansionStateManager,
     private val keyguardViewManager: StatusBarKeyguardViewManager,
     private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
     dumpManager: DumpManager,
@@ -71,14 +67,14 @@
     private val udfpsController: UdfpsController,
     private val activityLaunchAnimator: ActivityLaunchAnimator,
     featureFlags: FeatureFlags,
-    private val primaryBouncerInteractor: PrimaryBouncerInteractor,
+    primaryBouncerInteractor: PrimaryBouncerInteractor,
     private val alternateBouncerInteractor: AlternateBouncerInteractor,
     private val udfpsKeyguardAccessibilityDelegate: UdfpsKeyguardAccessibilityDelegate,
 ) :
     UdfpsAnimationViewController<UdfpsKeyguardViewLegacy>(
         view,
         statusBarStateController,
-        shadeExpansionStateManager,
+        primaryBouncerInteractor,
         systemUIDialogManager,
         dumpManager,
     ),
@@ -159,17 +155,6 @@
             }
         }
 
-    private val shadeExpansionListener = ShadeExpansionListener { (fraction) ->
-        panelExpansionFraction =
-            if (keyguardViewManager.isPrimaryBouncerInTransit) {
-                aboutToShowBouncerProgress(fraction)
-            } else {
-                fraction
-            }
-        updateAlpha()
-        updatePauseAuth()
-    }
-
     private val keyguardStateControllerCallback: KeyguardStateController.Callback =
         object : KeyguardStateController.Callback {
             override fun onUnlockedChanged() {
@@ -262,10 +247,17 @@
     }
 
     @VisibleForTesting
-    suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
+    override suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
         return scope.launch {
             primaryBouncerInteractor.bouncerExpansion.collect { bouncerExpansion: Float ->
                 inputBouncerExpansion = bouncerExpansion
+
+                panelExpansionFraction =
+                    if (keyguardViewManager.isPrimaryBouncerInTransit) {
+                        aboutToShowBouncerProgress(1f - bouncerExpansion)
+                    } else {
+                        1f - bouncerExpansion
+                    }
                 updateAlpha()
                 updatePauseAuth()
             }
@@ -295,8 +287,6 @@
         qsExpansion = keyguardViewManager.qsExpansion
         keyguardViewManager.addCallback(statusBarKeyguardViewManagerCallback)
         configurationController.addCallback(configurationListener)
-        val currentState = shadeExpansionStateManager.addExpansionListener(shadeExpansionListener)
-        shadeExpansionListener.onPanelExpansionChanged(currentState)
         updateScaleFactor()
         view.updatePadding()
         updateAlpha()
@@ -321,7 +311,6 @@
         keyguardViewManager.removeOccludingAppBiometricUI(occludingAppBiometricUI)
         keyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false)
         configurationController.removeCallback(configurationListener)
-        shadeExpansionStateManager.removeExpansionListener(shadeExpansionListener)
         if (lockScreenShadeTransitionController.mUdfpsKeyguardViewControllerLegacy === this) {
             lockScreenShadeTransitionController.mUdfpsKeyguardViewControllerLegacy = null
         }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
index 06dee7a..54e6215 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
@@ -26,8 +26,8 @@
 import android.util.Log
 import android.view.MotionEvent
 import android.widget.FrameLayout
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.R
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.doze.DozeReceiver
 
 private const val TAG = "UdfpsView"
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
index 53dc0e3..f2d4f89 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/BiometricsModule.kt
@@ -16,7 +16,10 @@
 
 package com.android.systemui.biometrics.dagger
 
-import com.android.settingslib.udfps.UdfpsUtils
+import com.android.systemui.biometrics.UdfpsUtils
+import android.content.res.Resources
+import com.android.internal.R
+import com.android.systemui.biometrics.EllipseOverlapDetectorParams
 import com.android.systemui.biometrics.data.repository.FacePropertyRepository
 import com.android.systemui.biometrics.data.repository.FacePropertyRepositoryImpl
 import com.android.systemui.biometrics.data.repository.FaceSettingsRepository
@@ -25,18 +28,21 @@
 import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepositoryImpl
 import com.android.systemui.biometrics.data.repository.PromptRepository
 import com.android.systemui.biometrics.data.repository.PromptRepositoryImpl
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepositoryImpl
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.data.repository.DisplayStateRepositoryImpl
 import com.android.systemui.biometrics.domain.interactor.CredentialInteractor
 import com.android.systemui.biometrics.domain.interactor.CredentialInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.LogContextInteractor
 import com.android.systemui.biometrics.domain.interactor.LogContextInteractorImpl
-import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractor
-import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
+import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractor
+import com.android.systemui.biometrics.domain.interactor.SideFpsOverlayInteractorImpl
+import com.android.systemui.biometrics.udfps.BoundingBoxOverlapDetector
+import com.android.systemui.biometrics.udfps.EllipseOverlapDetector
+import com.android.systemui.biometrics.udfps.OverlapDetector
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.util.concurrency.ThreadFactory
 import dagger.Binds
@@ -63,16 +69,19 @@
 
     @Binds
     @SysUISingleton
-    fun fingerprintRepository(impl: FingerprintPropertyRepositoryImpl):
-            FingerprintPropertyRepository
-    @Binds
-    @SysUISingleton
-    fun rearDisplayStateRepository(impl: RearDisplayStateRepositoryImpl): RearDisplayStateRepository
+    fun fingerprintRepository(
+        impl: FingerprintPropertyRepositoryImpl
+    ): FingerprintPropertyRepository
 
     @Binds
     @SysUISingleton
-    fun providesPromptSelectorInteractor(impl: PromptSelectorInteractorImpl):
-            PromptSelectorInteractor
+    fun displayStateRepository(impl: DisplayStateRepositoryImpl): DisplayStateRepository
+
+    @Binds
+    @SysUISingleton
+    fun providesPromptSelectorInteractor(
+        impl: PromptSelectorInteractorImpl
+    ): PromptSelectorInteractor
 
     @Binds
     @SysUISingleton
@@ -88,8 +97,9 @@
 
     @Binds
     @SysUISingleton
-    fun providesSideFpsOverlayInteractor(impl: SideFpsOverlayInteractorImpl):
-            SideFpsOverlayInteractor
+    fun providesSideFpsOverlayInteractor(
+        impl: SideFpsOverlayInteractorImpl
+    ): SideFpsOverlayInteractor
 
     companion object {
         /** Background [Executor] for HAL related operations. */
@@ -102,6 +112,30 @@
 
         @Provides
         fun providesUdfpsUtils(): UdfpsUtils = UdfpsUtils()
+
+        @Provides
+        @SysUISingleton
+        fun providesOverlapDetector(): OverlapDetector {
+            val selectedOption =
+                Resources.getSystem().getInteger(R.integer.config_selected_udfps_touch_detection)
+            val values =
+                Resources.getSystem()
+                    .getStringArray(R.array.config_udfps_touch_detection_options)[selectedOption]
+                    .split(",")
+                    .map { it.toFloat() }
+
+            return if (values[0] == 1f) {
+                EllipseOverlapDetector(
+                    EllipseOverlapDetectorParams(
+                        minOverlap = values[3],
+                        targetSize = values[2],
+                        stepSize = values[4].toInt()
+                    )
+                )
+            } else {
+                BoundingBoxOverlapDetector(values[2])
+            }
+        }
     }
 }
 
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt b/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt
deleted file mode 100644
index f7f9103..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/dagger/UdfpsModule.kt
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics.dagger
-
-import android.content.res.Resources
-import com.android.internal.R
-import com.android.systemui.biometrics.EllipseOverlapDetectorParams
-import com.android.systemui.biometrics.udfps.BoundingBoxOverlapDetector
-import com.android.systemui.biometrics.udfps.EllipseOverlapDetector
-import com.android.systemui.biometrics.udfps.OverlapDetector
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
-import dagger.Module
-import dagger.Provides
-
-/** Dagger module for all things UDFPS. TODO(b/260558624): Move to BiometricsModule. */
-@Module
-interface UdfpsModule {
-    companion object {
-
-        @Provides
-        @SysUISingleton
-        fun providesOverlapDetector(featureFlags: FeatureFlags): OverlapDetector {
-            if (featureFlags.isEnabled(Flags.UDFPS_ELLIPSE_DETECTION)) {
-                val selectedOption =
-                    Resources.getSystem()
-                        .getInteger(R.integer.config_selected_udfps_touch_detection)
-                val values =
-                    Resources.getSystem()
-                        .getStringArray(R.array.config_udfps_touch_detection_options)[
-                            selectedOption]
-                        .split(",")
-                        .map { it.toFloat() }
-
-                return if (values[0] == 1f) {
-                    EllipseOverlapDetector(
-                        EllipseOverlapDetectorParams(
-                            minOverlap = values[3],
-                            targetSize = values[2],
-                            stepSize = values[4].toInt()
-                        )
-                    )
-                } else {
-                    BoundingBoxOverlapDetector(values[2])
-                }
-            } else {
-                return BoundingBoxOverlapDetector(1f)
-            }
-        }
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
new file mode 100644
index 0000000..7a9efcf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.biometrics.data.repository
+
+import android.content.Context
+import android.hardware.devicestate.DeviceStateManager
+import android.hardware.display.DisplayManager
+import android.hardware.display.DisplayManager.DisplayListener
+import android.hardware.display.DisplayManager.EVENT_FLAG_DISPLAY_CHANGED
+import android.os.Handler
+import android.view.DisplayInfo
+import com.android.internal.util.ArrayUtils
+import com.android.systemui.biometrics.shared.model.DisplayRotation
+import com.android.systemui.biometrics.shared.model.toDisplayRotation
+import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
+import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.qualifiers.Main
+import java.util.concurrent.Executor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.stateIn
+
+/** Repository for the current state of the display */
+interface DisplayStateRepository {
+    /** Provides the current rear display state. */
+    val isInRearDisplayMode: StateFlow<Boolean>
+
+    /** Provides the current display rotation */
+    val currentRotation: StateFlow<DisplayRotation>
+}
+
+@SysUISingleton
+class DisplayStateRepositoryImpl
+@Inject
+constructor(
+    @Application applicationScope: CoroutineScope,
+    @Application val context: Context,
+    deviceStateManager: DeviceStateManager,
+    displayManager: DisplayManager,
+    @Main handler: Handler,
+    @Main mainExecutor: Executor
+) : DisplayStateRepository {
+    override val isInRearDisplayMode: StateFlow<Boolean> =
+        conflatedCallbackFlow {
+                val sendRearDisplayStateUpdate = { state: Boolean ->
+                    trySendWithFailureLogging(
+                        state,
+                        TAG,
+                        "Error sending rear display state update to $state"
+                    )
+                }
+
+                val callback =
+                    DeviceStateManager.DeviceStateCallback { state ->
+                        val isInRearDisplayMode =
+                            ArrayUtils.contains(
+                                context.resources.getIntArray(
+                                    com.android.internal.R.array.config_rearDisplayDeviceStates
+                                ),
+                                state
+                            )
+                        sendRearDisplayStateUpdate(isInRearDisplayMode)
+                    }
+
+                sendRearDisplayStateUpdate(false)
+                deviceStateManager.registerCallback(mainExecutor, callback)
+                awaitClose { deviceStateManager.unregisterCallback(callback) }
+            }
+            .stateIn(
+                applicationScope,
+                started = SharingStarted.Eagerly,
+                initialValue = false,
+            )
+
+    private fun getDisplayRotation(): DisplayRotation {
+        val cachedDisplayInfo = DisplayInfo()
+        context.display?.getDisplayInfo(cachedDisplayInfo)
+        return cachedDisplayInfo.rotation.toDisplayRotation()
+    }
+
+    override val currentRotation: StateFlow<DisplayRotation> =
+        conflatedCallbackFlow {
+                val callback =
+                    object : DisplayListener {
+                        override fun onDisplayRemoved(displayId: Int) {}
+
+                        override fun onDisplayAdded(displayId: Int) {}
+
+                        override fun onDisplayChanged(displayId: Int) {
+                            val rotation = getDisplayRotation()
+                            trySendWithFailureLogging(
+                                rotation,
+                                TAG,
+                                "Error sending display rotation to $rotation"
+                            )
+                        }
+                    }
+                displayManager.registerDisplayListener(
+                    callback,
+                    handler,
+                    EVENT_FLAG_DISPLAY_CHANGED
+                )
+                awaitClose { displayManager.unregisterDisplayListener(callback) }
+            }
+            .stateIn(
+                applicationScope,
+                started = SharingStarted.Eagerly,
+                initialValue = getDisplayRotation(),
+            )
+
+    companion object {
+        const val TAG = "DisplayStateRepositoryImpl"
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt
index daff5fe..aa33100 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/FingerprintPropertyRepository.kt
@@ -16,13 +16,19 @@
 
 package com.android.systemui.biometrics.data.repository
 
+import android.Manifest.permission.USE_BIOMETRIC_INTERNAL
+import android.annotation.RequiresPermission
+import android.hardware.biometrics.ComponentInfoInternal
 import android.hardware.biometrics.SensorLocationInternal
+import android.hardware.biometrics.SensorProperties
 import android.hardware.fingerprint.FingerprintManager
+import android.hardware.fingerprint.FingerprintSensorProperties
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
 import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback
 import com.android.systemui.biometrics.shared.model.FingerprintSensorType
 import com.android.systemui.biometrics.shared.model.SensorStrength
 import com.android.systemui.biometrics.shared.model.toSensorStrength
+import com.android.systemui.biometrics.shared.model.toSensorType
 import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
 import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
 import com.android.systemui.dagger.SysUISingleton
@@ -31,11 +37,10 @@
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.channels.awaitClose
 import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.SharingStarted
 import kotlinx.coroutines.flow.StateFlow
-import kotlinx.coroutines.flow.asStateFlow
-import kotlinx.coroutines.flow.shareIn
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.stateIn
 
 /**
  * A repository for the global state of FingerprintProperty.
@@ -44,22 +49,17 @@
  */
 interface FingerprintPropertyRepository {
 
-    /**
-     * If the repository is initialized or not. Other properties are defaults until this is true.
-     */
-    val isInitialized: Flow<Boolean>
-
     /** The id of fingerprint sensor. */
-    val sensorId: StateFlow<Int>
+    val sensorId: Flow<Int>
 
     /** The security strength of sensor (convenience, weak, strong). */
-    val strength: StateFlow<SensorStrength>
+    val strength: Flow<SensorStrength>
 
     /** The types of fingerprint sensor (rear, ultrasonic, optical, etc.). */
-    val sensorType: StateFlow<FingerprintSensorType>
+    val sensorType: Flow<FingerprintSensorType>
 
     /** The sensor location relative to each physical display. */
-    val sensorLocations: StateFlow<Map<String, SensorLocationInternal>>
+    val sensorLocations: Flow<Map<String, SensorLocationInternal>>
 }
 
 @SysUISingleton
@@ -70,64 +70,64 @@
     private val fingerprintManager: FingerprintManager?,
 ) : FingerprintPropertyRepository {
 
-    override val isInitialized: Flow<Boolean> =
+    @RequiresPermission(USE_BIOMETRIC_INTERNAL)
+    private val props: StateFlow<FingerprintSensorPropertiesInternal> =
         conflatedCallbackFlow {
                 val callback =
                     object : IFingerprintAuthenticatorsRegisteredCallback.Stub() {
                         override fun onAllAuthenticatorsRegistered(
                             sensors: List<FingerprintSensorPropertiesInternal>
                         ) {
-                            if (sensors.isNotEmpty()) {
-                                setProperties(sensors[0])
-                                trySendWithFailureLogging(true, TAG, "initialize properties")
+                            if (sensors.isEmpty()) {
+                                trySendWithFailureLogging(
+                                    DEFAULT_PROPS,
+                                    TAG,
+                                    "no registered sensors, use default props"
+                                )
+                            } else {
+                                trySendWithFailureLogging(
+                                    sensors[0],
+                                    TAG,
+                                    "update properties on authenticators registered"
+                                )
                             }
                         }
                     }
                 fingerprintManager?.addAuthenticatorsRegisteredCallback(callback)
-                trySendWithFailureLogging(false, TAG, "initial value defaulting to false")
                 awaitClose {}
             }
-            .shareIn(scope = applicationScope, started = SharingStarted.Eagerly, replay = 1)
+            .stateIn(
+                applicationScope,
+                started = SharingStarted.Eagerly,
+                initialValue = DEFAULT_PROPS,
+            )
 
-    private val _sensorId: MutableStateFlow<Int> = MutableStateFlow(-1)
-    override val sensorId: StateFlow<Int> = _sensorId.asStateFlow()
+    override val sensorId: Flow<Int> = props.map { it.sensorId }
 
-    private val _strength: MutableStateFlow<SensorStrength> =
-        MutableStateFlow(SensorStrength.CONVENIENCE)
-    override val strength = _strength.asStateFlow()
+    override val strength: Flow<SensorStrength> = props.map { it.sensorStrength.toSensorStrength() }
 
-    private val _sensorType: MutableStateFlow<FingerprintSensorType> =
-        MutableStateFlow(FingerprintSensorType.UNKNOWN)
-    override val sensorType = _sensorType.asStateFlow()
+    override val sensorType: Flow<FingerprintSensorType> =
+        props.map { it.sensorType.toSensorType() }
 
-    private val _sensorLocations: MutableStateFlow<Map<String, SensorLocationInternal>> =
-        MutableStateFlow(mapOf("" to SensorLocationInternal.DEFAULT))
-    override val sensorLocations: StateFlow<Map<String, SensorLocationInternal>> =
-        _sensorLocations.asStateFlow()
-
-    private fun setProperties(prop: FingerprintSensorPropertiesInternal) {
-        _sensorId.value = prop.sensorId
-        _strength.value = prop.sensorStrength.toSensorStrength()
-        _sensorType.value = sensorTypeIntToObject(prop.sensorType)
-        _sensorLocations.value =
-            prop.allLocations.associateBy { sensorLocationInternal ->
+    override val sensorLocations: Flow<Map<String, SensorLocationInternal>> =
+        props.map {
+            it.allLocations.associateBy { sensorLocationInternal ->
                 sensorLocationInternal.displayId
             }
-    }
+        }
 
     companion object {
         private const val TAG = "FingerprintPropertyRepositoryImpl"
-    }
-}
-
-private fun sensorTypeIntToObject(value: Int): FingerprintSensorType {
-    return when (value) {
-        0 -> FingerprintSensorType.UNKNOWN
-        1 -> FingerprintSensorType.REAR
-        2 -> FingerprintSensorType.UDFPS_ULTRASONIC
-        3 -> FingerprintSensorType.UDFPS_OPTICAL
-        4 -> FingerprintSensorType.POWER_BUTTON
-        5 -> FingerprintSensorType.HOME_BUTTON
-        else -> throw IllegalArgumentException("Invalid SensorType value: $value")
+        private val DEFAULT_PROPS =
+            FingerprintSensorPropertiesInternal(
+                -1 /* sensorId */,
+                SensorProperties.STRENGTH_CONVENIENCE,
+                0 /* maxEnrollmentsPerUser */,
+                listOf<ComponentInfoInternal>(),
+                FingerprintSensorProperties.TYPE_UNKNOWN,
+                false /* halControlsIllumination */,
+                true /* resetLockoutRequiresHardwareAuthToken */,
+                listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT)
+            )
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt
deleted file mode 100644
index d17d961..0000000
--- a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepository.kt
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics.data.repository
-
-import android.content.Context
-import android.hardware.devicestate.DeviceStateManager
-import com.android.internal.util.ArrayUtils
-import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
-import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.dagger.qualifiers.Main
-import java.util.concurrent.Executor
-import javax.inject.Inject
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.channels.awaitClose
-import kotlinx.coroutines.flow.SharingStarted
-import kotlinx.coroutines.flow.StateFlow
-import kotlinx.coroutines.flow.stateIn
-
-/** Provide current rear display state. */
-interface RearDisplayStateRepository {
-    /** Provides the current rear display state. */
-    val isInRearDisplayMode: StateFlow<Boolean>
-}
-
-@SysUISingleton
-class RearDisplayStateRepositoryImpl
-@Inject
-constructor(
-    @Application applicationScope: CoroutineScope,
-    @Application context: Context,
-    deviceStateManager: DeviceStateManager,
-    @Main mainExecutor: Executor
-) : RearDisplayStateRepository {
-    override val isInRearDisplayMode: StateFlow<Boolean> =
-        conflatedCallbackFlow {
-                val sendRearDisplayStateUpdate = { state: Boolean ->
-                    trySendWithFailureLogging(
-                        state,
-                        TAG,
-                        "Error sending rear display state update to $state"
-                    )
-                }
-
-                val callback =
-                    DeviceStateManager.DeviceStateCallback { state ->
-                        val isInRearDisplayMode =
-                            ArrayUtils.contains(
-                                context.resources.getIntArray(
-                                    com.android.internal.R.array.config_rearDisplayDeviceStates
-                                ),
-                                state
-                            )
-                        sendRearDisplayStateUpdate(isInRearDisplayMode)
-                    }
-
-                sendRearDisplayStateUpdate(false)
-                deviceStateManager.registerCallback(mainExecutor, callback)
-                awaitClose { deviceStateManager.unregisterCallback(callback) }
-            }
-            .stateIn(
-                applicationScope,
-                started = SharingStarted.Eagerly,
-                initialValue = false,
-            )
-
-    companion object {
-        const val TAG = "RearDisplayStateRepositoryImpl"
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
index 26b6f2a..f36a3ec 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractor.kt
@@ -18,13 +18,17 @@
 
 import android.content.Context
 import android.content.res.Configuration
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
+import android.view.Display
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.shared.model.DisplayRotation
 import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
 import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
 import com.android.systemui.dagger.qualifiers.Application
 import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.display.data.repository.DisplayRepository
 import com.android.systemui.unfold.compat.ScreenSizeFoldProvider
 import com.android.systemui.unfold.updates.FoldProvider
+import com.android.systemui.util.kotlin.sample
 import java.util.concurrent.Executor
 import javax.inject.Inject
 import kotlinx.coroutines.CoroutineScope
@@ -32,10 +36,14 @@
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.SharingStarted
 import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.flow.stateIn
 
 /** Aggregates display state information. */
 interface DisplayStateInteractor {
+    /** Whether the default display is currently off. */
+    val isDefaultDisplayOff: Flow<Boolean>
 
     /** Whether the device is currently in rear display mode. */
     val isInRearDisplayMode: StateFlow<Boolean>
@@ -43,6 +51,9 @@
     /** Whether the device is currently folded. */
     val isFolded: Flow<Boolean>
 
+    /** Current rotation of the display */
+    val currentRotation: StateFlow<DisplayRotation>
+
     /** Called on configuration changes, used to keep the display state in sync */
     fun onConfigurationChanged(newConfig: Configuration)
 }
@@ -54,7 +65,8 @@
     @Application applicationScope: CoroutineScope,
     @Application context: Context,
     @Main mainExecutor: Executor,
-    rearDisplayStateRepository: RearDisplayStateRepository,
+    displayStateRepository: DisplayStateRepository,
+    displayRepository: DisplayRepository,
 ) : DisplayStateInteractor {
     private var screenSizeFoldProvider: ScreenSizeFoldProvider = ScreenSizeFoldProvider(context)
 
@@ -90,12 +102,26 @@
             )
 
     override val isInRearDisplayMode: StateFlow<Boolean> =
-        rearDisplayStateRepository.isInRearDisplayMode
+        displayStateRepository.isInRearDisplayMode
+
+    override val currentRotation: StateFlow<DisplayRotation> =
+        displayStateRepository.currentRotation
 
     override fun onConfigurationChanged(newConfig: Configuration) {
         screenSizeFoldProvider.onConfigurationChange(newConfig)
     }
 
+    private val defaultDisplay =
+        displayRepository.displays.map { displays ->
+            displays.firstOrNull { it.displayId == Display.DEFAULT_DISPLAY }
+        }
+
+    override val isDefaultDisplayOff =
+        displayRepository.displayChangeEvent
+            .filter { it == Display.DEFAULT_DISPLAY }
+            .sample(defaultDisplay)
+            .map { it?.state == Display.STATE_OFF }
+
     companion object {
         private const val TAG = "DisplayStateInteractor"
     }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
index 5badcaf..65a2c0a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractor.kt
@@ -23,16 +23,15 @@
 import com.android.systemui.biometrics.Utils.isDeviceCredentialAllowed
 import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepository
 import com.android.systemui.biometrics.data.repository.PromptRepository
-import com.android.systemui.biometrics.domain.model.BiometricModalities
 import com.android.systemui.biometrics.domain.model.BiometricOperationInfo
 import com.android.systemui.biometrics.domain.model.BiometricPromptRequest
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricUserInfo
 import com.android.systemui.biometrics.shared.model.FingerprintSensorType
 import com.android.systemui.biometrics.shared.model.PromptKind
 import com.android.systemui.dagger.SysUISingleton
 import javax.inject.Inject
 import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.combine
 import kotlinx.coroutines.flow.distinctUntilChanged
 import kotlinx.coroutines.flow.map
@@ -69,7 +68,7 @@
     val isConfirmationRequired: Flow<Boolean>
 
     /** Fingerprint sensor type */
-    val sensorType: StateFlow<FingerprintSensorType>
+    val sensorType: Flow<FingerprintSensorType>
 
     /** Use biometrics for authentication. */
     fun useBiometricsForAuthentication(
@@ -95,7 +94,7 @@
 class PromptSelectorInteractorImpl
 @Inject
 constructor(
-    private val fingerprintPropertyRepository: FingerprintPropertyRepository,
+    fingerprintPropertyRepository: FingerprintPropertyRepository,
     private val promptRepository: PromptRepository,
     lockPatternUtils: LockPatternUtils,
 ) : PromptSelectorInteractor {
@@ -147,8 +146,7 @@
             }
         }
 
-    override val sensorType: StateFlow<FingerprintSensorType> =
-        fingerprintPropertyRepository.sensorType
+    override val sensorType: Flow<FingerprintSensorType> = fingerprintPropertyRepository.sensorType
 
     override fun useBiometricsForAuthentication(
         promptInfo: PromptInfo,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractor.kt
index aa85e5f3..75ae061 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractor.kt
@@ -17,32 +17,43 @@
 package com.android.systemui.biometrics.domain.interactor
 
 import android.hardware.biometrics.SensorLocationInternal
-import android.util.Log
 import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepository
 import com.android.systemui.dagger.SysUISingleton
 import javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.asStateFlow
+import kotlinx.coroutines.flow.combine
 
 /** Business logic for SideFps overlay offsets. */
 interface SideFpsOverlayInteractor {
 
-    /** Get the corresponding offsets based on different displayId. */
-    fun getOverlayOffsets(displayId: String): SensorLocationInternal
+    /** The displayId of the current display. */
+    val displayId: Flow<String>
+
+    /** Overlay offsets corresponding to given displayId. */
+    val overlayOffsets: Flow<SensorLocationInternal>
+
+    /** Called on display changes, used to keep the display state in sync */
+    fun onDisplayChanged(displayId: String)
 }
 
 @SysUISingleton
 class SideFpsOverlayInteractorImpl
 @Inject
-constructor(private val fingerprintPropertyRepository: FingerprintPropertyRepository) :
+constructor(fingerprintPropertyRepository: FingerprintPropertyRepository) :
     SideFpsOverlayInteractor {
 
-    override fun getOverlayOffsets(displayId: String): SensorLocationInternal {
-        val offsets = fingerprintPropertyRepository.sensorLocations.value
-        return if (offsets.containsKey(displayId)) {
-            offsets[displayId]!!
-        } else {
-            Log.w(TAG, "No location specified for display: $displayId")
-            offsets[""]!!
+    private val _displayId: MutableStateFlow<String> = MutableStateFlow("")
+    override val displayId: Flow<String> = _displayId.asStateFlow()
+
+    override val overlayOffsets: Flow<SensorLocationInternal> =
+        combine(displayId, fingerprintPropertyRepository.sensorLocations) { displayId, offsets ->
+            offsets[displayId] ?: SensorLocationInternal.DEFAULT
         }
+
+    override fun onDisplayChanged(displayId: String) {
+        _displayId.value = displayId
     }
 
     companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
index 9a0792e..2a1047a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractor.kt
@@ -18,8 +18,8 @@
 
 import android.view.MotionEvent
 import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.biometrics.AuthController
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
 import com.android.systemui.common.coroutine.ConflatedCallbackFlow
 import com.android.systemui.dagger.SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt b/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
index a3ee220..8fbb250 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequest.kt
@@ -1,6 +1,7 @@
 package com.android.systemui.biometrics.domain.model
 
 import android.hardware.biometrics.PromptInfo
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricUserInfo
 
 /**
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt
new file mode 100644
index 0000000..10a3e91
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/DisplayRotation.kt
@@ -0,0 +1,21 @@
+package com.android.systemui.biometrics.shared.model
+
+import android.view.Surface
+
+/** Shadows [Surface.Rotation] for kotlin use within SysUI. */
+enum class DisplayRotation {
+    ROTATION_0,
+    ROTATION_90,
+    ROTATION_180,
+    ROTATION_270,
+}
+
+/** Converts [Surface.Rotation] to corresponding [DisplayRotation] */
+fun Int.toDisplayRotation(): DisplayRotation =
+    when (this) {
+        Surface.ROTATION_0 -> DisplayRotation.ROTATION_0
+        Surface.ROTATION_90 -> DisplayRotation.ROTATION_90
+        Surface.ROTATION_180 -> DisplayRotation.ROTATION_180
+        Surface.ROTATION_270 -> DisplayRotation.ROTATION_270
+        else -> throw IllegalArgumentException("Invalid DisplayRotation value: $this")
+    }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
index 416fc64..a97e2dc 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/PromptKind.kt
@@ -17,7 +17,6 @@
 package com.android.systemui.biometrics.shared.model
 
 import com.android.systemui.biometrics.Utils
-import com.android.systemui.biometrics.domain.model.BiometricModalities
 
 // TODO(b/251476085): this should eventually replace Utils.CredentialType
 /** Credential options for biometric prompt. Shadows [Utils.CredentialType]. */
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
index eeb0f4c..83b3380 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessor.kt
@@ -21,7 +21,7 @@
 import android.view.MotionEvent
 import android.view.MotionEvent.INVALID_POINTER_ID
 import android.view.Surface
-import com.android.settingslib.udfps.UdfpsOverlayParams
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.biometrics.udfps.TouchProcessorResult.Failure
 import com.android.systemui.biometrics.udfps.TouchProcessorResult.ProcessedTouch
 import com.android.systemui.dagger.SysUISingleton
@@ -41,7 +41,6 @@
         previousPointerOnSensorId: Int,
         overlayParams: UdfpsOverlayParams,
     ): TouchProcessorResult {
-
         fun preprocess(): PreprocessedTouch {
             val touchData = List(event.pointerCount) { event.normalize(it, overlayParams) }
             val pointersOnSensor =
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
index 4bf0ef6..78e1dc0 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/udfps/TouchProcessor.kt
@@ -17,7 +17,7 @@
 package com.android.systemui.biometrics.udfps
 
 import android.view.MotionEvent
-import com.android.settingslib.udfps.UdfpsOverlayParams
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 
 /**
  * Determines whether a finger entered or left the area of the under-display fingerprint sensor
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
index b1439fd..02847c2 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
@@ -23,7 +23,6 @@
 import android.hardware.biometrics.BiometricConstants
 import android.hardware.biometrics.BiometricPrompt
 import android.hardware.face.FaceManager
-import android.os.Bundle
 import android.text.method.ScrollingMovementMethod
 import android.util.Log
 import android.view.HapticFeedbackConstants
@@ -43,12 +42,9 @@
 import com.android.systemui.biometrics.AuthBiometricFaceIconController
 import com.android.systemui.biometrics.AuthBiometricFingerprintAndFaceIconController
 import com.android.systemui.biometrics.AuthBiometricFingerprintIconController
-import com.android.systemui.biometrics.AuthBiometricView
-import com.android.systemui.biometrics.AuthBiometricView.Callback
-import com.android.systemui.biometrics.AuthBiometricViewAdapter
 import com.android.systemui.biometrics.AuthIconController
 import com.android.systemui.biometrics.AuthPanelController
-import com.android.systemui.biometrics.domain.model.BiometricModalities
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricModality
 import com.android.systemui.biometrics.shared.model.PromptKind
 import com.android.systemui.biometrics.shared.model.asBiometricModality
@@ -63,7 +59,6 @@
 import com.android.systemui.statusbar.VibratorHelper
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.delay
-import kotlinx.coroutines.flow.collect
 import kotlinx.coroutines.flow.combine
 import kotlinx.coroutines.flow.first
 import kotlinx.coroutines.flow.map
@@ -83,11 +78,11 @@
         panelViewController: AuthPanelController,
         jankListener: BiometricJankListener,
         backgroundView: View,
-        legacyCallback: Callback,
+        legacyCallback: Spaghetti.Callback,
         applicationScope: CoroutineScope,
         vibratorHelper: VibratorHelper,
         featureFlags: FeatureFlags,
-    ): AuthBiometricViewAdapter {
+    ): Spaghetti {
         val accessibilityManager = view.context.getSystemService(AccessibilityManager::class.java)!!
 
         val textColorError =
@@ -141,24 +136,20 @@
             subtitleView.text = viewModel.subtitle.first()
 
             // set button listeners
-            negativeButton.setOnClickListener {
-                legacyCallback.onAction(Callback.ACTION_BUTTON_NEGATIVE)
-            }
-            cancelButton.setOnClickListener {
-                legacyCallback.onAction(Callback.ACTION_USER_CANCELED)
-            }
+            negativeButton.setOnClickListener { legacyCallback.onButtonNegative() }
+            cancelButton.setOnClickListener { legacyCallback.onUserCanceled() }
             credentialFallbackButton.setOnClickListener {
                 viewModel.onSwitchToCredential()
-                legacyCallback.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL)
+                legacyCallback.onUseDeviceCredential()
             }
             confirmationButton.setOnClickListener { viewModel.confirmAuthenticated() }
             retryButton.setOnClickListener {
                 viewModel.showAuthenticating(isRetry = true)
-                legacyCallback.onAction(Callback.ACTION_BUTTON_TRY_AGAIN)
+                legacyCallback.onButtonTryAgain()
             }
 
             // TODO(b/251476085): migrate legacy icon controllers and remove
-            var legacyState: Int = viewModel.legacyState.value
+            var legacyState = viewModel.legacyState.value
             val iconController =
                 modalities.asIconController(
                     view.context,
@@ -219,7 +210,7 @@
                         oldMode == FingerprintStartMode.Pending &&
                             newMode == FingerprintStartMode.Delayed
                     ) {
-                        legacyCallback.onAction(Callback.ACTION_START_DELAYED_FINGERPRINT_SENSOR)
+                        legacyCallback.onStartDelayedFingerprintSensor()
                     }
 
                     if (newMode.isStarted) {
@@ -246,7 +237,7 @@
                         .collect { dismissOnClick ->
                             backgroundView.setOnClickListener {
                                 if (dismissOnClick) {
-                                    legacyCallback.onAction(Callback.ACTION_USER_CANCELED)
+                                    legacyCallback.onUserCanceled()
                                 } else {
                                     Log.w(TAG, "Ignoring background click")
                                 }
@@ -261,6 +252,18 @@
                     }
                 }
 
+                // set padding
+                launch {
+                    viewModel.promptPadding.collect { promptPadding ->
+                        view.setPadding(
+                            promptPadding.left,
+                            promptPadding.top,
+                            promptPadding.right,
+                            promptPadding.bottom
+                        )
+                    }
+                }
+
                 // configure & hide/disable buttons
                 launch {
                     viewModel.credentialKind
@@ -360,13 +363,11 @@
 
                             launch {
                                 delay(authState.delay)
-                                legacyCallback.onAction(
-                                    if (authState.isAuthenticatedAndExplicitlyConfirmed) {
-                                        Callback.ACTION_AUTHENTICATED_AND_CONFIRMED
-                                    } else {
-                                        Callback.ACTION_AUTHENTICATED
-                                    }
-                                )
+                                if (authState.isAuthenticatedAndExplicitlyConfirmed) {
+                                    legacyCallback.onAuthenticatedAndConfirmed()
+                                } else {
+                                    legacyCallback.onAuthenticated()
+                                }
                             }
                         }
                     }
@@ -428,21 +429,50 @@
  * the view model (which will be retained) via the application scope.
  *
  * Do not reference the [view] for anything other than [asView].
- *
- * TODO(b/251476085): remove after replacing AuthContainerView
  */
-private class Spaghetti(
+@Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+class Spaghetti(
     private val view: View,
     private val viewModel: PromptViewModel,
     private val applicationContext: Context,
     private val applicationScope: CoroutineScope,
-) : AuthBiometricViewAdapter {
+) {
+
+    @Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+    interface Callback {
+        fun onAuthenticated()
+        fun onUserCanceled()
+        fun onButtonNegative()
+        fun onButtonTryAgain()
+        fun onError()
+        fun onUseDeviceCredential()
+        fun onStartDelayedFingerprintSensor()
+        fun onAuthenticatedAndConfirmed()
+    }
+
+    @Deprecated("TODO(b/251476085): remove after replacing AuthContainerView")
+    enum class BiometricState {
+        /** Authentication hardware idle. */
+        STATE_IDLE,
+        /** UI animating in, authentication hardware active. */
+        STATE_AUTHENTICATING_ANIMATING_IN,
+        /** UI animated in, authentication hardware active. */
+        STATE_AUTHENTICATING,
+        /** UI animated in, authentication hardware active. */
+        STATE_HELP,
+        /** Hard error, e.g. ERROR_TIMEOUT. Authentication hardware idle. */
+        STATE_ERROR,
+        /** Authenticated, waiting for user confirmation. Authentication hardware idle. */
+        STATE_PENDING_CONFIRMATION,
+        /** Authenticated, dialog animating away soon. */
+        STATE_AUTHENTICATED,
+    }
 
     private var lifecycleScope: CoroutineScope? = null
     private var modalities: BiometricModalities = BiometricModalities()
     private var legacyCallback: Callback? = null
 
-    override var legacyIconController: AuthIconController? = null
+    var legacyIconController: AuthIconController? = null
         private set
 
     // hacky way to suppress lockout errors
@@ -478,7 +508,7 @@
         )
     }
 
-    override fun onDialogAnimatedIn(fingerprintWasStarted: Boolean) {
+    fun onDialogAnimatedIn(fingerprintWasStarted: Boolean) {
         if (fingerprintWasStarted) {
             viewModel.ensureFingerprintHasStarted(isDelayed = false)
             viewModel.showAuthenticating(modalities.asDefaultHelpMessage(applicationContext))
@@ -487,7 +517,7 @@
         }
     }
 
-    override fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int) {
+    fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int) {
         applicationScope.launch {
             val authenticatedModality = modality.asBiometricModality()
             val msgId = getHelpForSuccessfulAuthentication(authenticatedModality)
@@ -511,7 +541,7 @@
             else -> null
         }
 
-    override fun onAuthenticationFailed(
+    fun onAuthenticationFailed(
         @BiometricAuthenticator.Modality modality: Int,
         failureReason: String,
     ) {
@@ -533,7 +563,7 @@
         }
     }
 
-    override fun onError(modality: Int, error: String) {
+    fun onError(modality: Int, error: String) {
         val errorModality = modality.asBiometricModality()
         if (ignoreUnsuccessfulEventsFrom(errorModality, error)) {
             return
@@ -546,11 +576,11 @@
                 authenticateAfterError = modalities.hasFingerprint,
             )
             delay(BiometricPrompt.HIDE_DIALOG_DELAY.toLong())
-            legacyCallback?.onAction(Callback.ACTION_ERROR)
+            legacyCallback?.onError()
         }
     }
 
-    override fun onHelp(modality: Int, help: String) {
+    fun onHelp(modality: Int, help: String) {
         if (ignoreUnsuccessfulEventsFrom(modality.asBiometricModality(), "")) {
             return
         }
@@ -574,36 +604,20 @@
             else -> false
         }
 
-    override fun startTransitionToCredentialUI(isError: Boolean) {
+    fun startTransitionToCredentialUI(isError: Boolean) {
         applicationScope.launch {
             viewModel.onSwitchToCredential()
-            legacyCallback?.onAction(Callback.ACTION_USE_DEVICE_CREDENTIAL)
+            legacyCallback?.onUseDeviceCredential()
         }
     }
 
-    override fun requestLayout() {
-        // nothing, for legacy view...
-    }
-
-    override fun restoreState(bundle: Bundle?) {
-        // nothing, for legacy view...
-    }
-
-    override fun onSaveState(bundle: Bundle?) {
-        // nothing, for legacy view...
-    }
-
-    override fun onOrientationChanged() {
-        // nothing, for legacy view...
-    }
-
-    override fun cancelAnimation() {
+    fun cancelAnimation() {
         view.animate()?.cancel()
     }
 
-    override fun isCoex() = modalities.hasFaceAndFingerprint
+    fun isCoex() = modalities.hasFaceAndFingerprint
 
-    override fun asView() = view
+    fun asView() = view
 }
 
 private fun BiometricModalities.asDefaultHelpMessage(context: Context): String =
@@ -638,7 +652,7 @@
     iconViewOverlay: LottieAnimationView,
 ) : AuthBiometricFingerprintAndFaceIconController(context, iconView, iconViewOverlay) {
 
-    private var state: Int? = null
+    private var state: Spaghetti.BiometricState? = null
     private val faceController = AuthBiometricFaceIconController(context, iconView)
 
     var faceMode: Boolean = true
@@ -649,11 +663,14 @@
                 faceController.deactivated = !value
                 iconView.setImageIcon(null)
                 iconViewOverlay.setImageIcon(null)
-                state?.let { updateIcon(AuthBiometricView.STATE_IDLE, it) }
+                state?.let { updateIcon(Spaghetti.BiometricState.STATE_IDLE, it) }
             }
         }
 
-    override fun updateIcon(lastState: Int, newState: Int) {
+    override fun updateIcon(
+        lastState: Spaghetti.BiometricState,
+        newState: Spaghetti.BiometricState,
+    ) {
         if (deactivated) {
             return
         }
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
index 370b36b..b9af031 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewSizeBinder.kt
@@ -31,7 +31,6 @@
 import androidx.core.view.isGone
 import androidx.lifecycle.lifecycleScope
 import com.android.systemui.R
-import com.android.systemui.biometrics.AuthDialog
 import com.android.systemui.biometrics.AuthPanelController
 import com.android.systemui.biometrics.Utils
 import com.android.systemui.biometrics.ui.BiometricPromptLayout
@@ -47,6 +46,10 @@
 /** Helper for [BiometricViewBinder] to handle resize transitions. */
 object BiometricViewSizeBinder {
 
+    private const val ANIMATE_SMALL_TO_MEDIUM_DURATION_MS = 150
+    // TODO(b/201510778): make private when related misuse is fixed
+    const val ANIMATE_MEDIUM_TO_LARGE_DURATION_MS = 450
+
     /** Resizes [BiometricPromptLayout] and the [panelViewController] via the [PromptViewModel]. */
     fun bind(
         view: BiometricPromptLayout,
@@ -134,7 +137,7 @@
                                     )
                                 }
                                 size.isMedium && currentSize.isSmall -> {
-                                    val duration = AuthDialog.ANIMATE_SMALL_TO_MEDIUM_DURATION_MS
+                                    val duration = ANIMATE_SMALL_TO_MEDIUM_DURATION_MS
                                     panelViewController.updateForContentDimensions(
                                         width,
                                         height,
@@ -165,7 +168,7 @@
                                     )
                                 }
                                 size.isLarge -> {
-                                    val duration = AuthDialog.ANIMATE_MEDIUM_TO_LARGE_DURATION_MS
+                                    val duration = ANIMATE_MEDIUM_TO_LARGE_DURATION_MS
                                     panelViewController.setUseFullScreen(true)
                                     panelViewController.updateForContentDimensions(
                                         panelViewController.containerWidth,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
index 25fe619..931946a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/CredentialViewBinder.kt
@@ -9,7 +9,6 @@
 import androidx.lifecycle.repeatOnLifecycle
 import com.android.app.animation.Interpolators
 import com.android.systemui.R
-import com.android.systemui.biometrics.AuthDialog
 import com.android.systemui.biometrics.AuthPanelController
 import com.android.systemui.biometrics.ui.CredentialPasswordView
 import com.android.systemui.biometrics.ui.CredentialPatternView
@@ -22,6 +21,8 @@
 import kotlinx.coroutines.flow.onEach
 import kotlinx.coroutines.launch
 
+private const val ANIMATE_CREDENTIAL_INITIAL_DURATION_MS = 150
+
 /**
  * View binder for all credential variants of BiometricPrompt, including [CredentialPatternView] and
  * [CredentialPasswordView].
@@ -147,7 +148,7 @@
     postOnAnimation {
         animate()
             .translationY(0f)
-            .setDuration(AuthDialog.ANIMATE_CREDENTIAL_INITIAL_DURATION_MS.toLong())
+            .setDuration(ANIMATE_CREDENTIAL_INITIAL_DURATION_MS.toLong())
             .alpha(1f)
             .setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN)
             .withLayer()
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
index c9b1624..6f4e1a3 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/controller/UdfpsKeyguardViewController.kt
@@ -19,11 +19,11 @@
 import com.android.systemui.biometrics.UdfpsAnimationViewController
 import com.android.systemui.biometrics.UdfpsKeyguardView
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter
 import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
 import kotlinx.coroutines.ExperimentalCoroutinesApi
 
@@ -32,7 +32,7 @@
 open class UdfpsKeyguardViewController(
     val view: UdfpsKeyguardView,
     statusBarStateController: StatusBarStateController,
-    shadeExpansionStateManager: ShadeExpansionStateManager,
+    primaryBouncerInteractor: PrimaryBouncerInteractor,
     systemUIDialogManager: SystemUIDialogManager,
     dumpManager: DumpManager,
     private val alternateBouncerInteractor: AlternateBouncerInteractor,
@@ -41,7 +41,7 @@
     UdfpsAnimationViewController<UdfpsKeyguardView>(
         view,
         statusBarStateController,
-        shadeExpansionStateManager,
+        primaryBouncerInteractor,
         systemUIDialogManager,
         dumpManager,
     ),
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModel.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModel.kt
index 9b30acb..b406ea4 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModel.kt
@@ -33,7 +33,7 @@
 @Inject
 constructor(
     private val displayStateInteractor: DisplayStateInteractor,
-    private val promptSelectorInteractor: PromptSelectorInteractor,
+    promptSelectorInteractor: PromptSelectorInteractor,
 ) {
     /** Current device rotation. */
     private var rotation: Int = Surface.ROTATION_0
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
index be08932..267afae 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModel.kt
@@ -15,16 +15,21 @@
  */
 package com.android.systemui.biometrics.ui.viewmodel
 
+import android.content.Context
+import android.graphics.Rect
 import android.hardware.biometrics.BiometricPrompt
 import android.util.Log
 import android.view.HapticFeedbackConstants
 import android.view.MotionEvent
-import com.android.systemui.biometrics.AuthBiometricView
+import com.android.systemui.biometrics.Utils
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
-import com.android.systemui.biometrics.domain.model.BiometricModalities
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricModality
+import com.android.systemui.biometrics.shared.model.DisplayRotation
 import com.android.systemui.biometrics.shared.model.PromptKind
+import com.android.systemui.biometrics.ui.binder.Spaghetti
+import com.android.systemui.dagger.qualifiers.Application
 import com.android.systemui.flags.FeatureFlags
 import com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION
 import com.android.systemui.statusbar.VibratorHelper
@@ -49,6 +54,7 @@
     private val displayStateInteractor: DisplayStateInteractor,
     private val promptSelectorInteractor: PromptSelectorInteractor,
     private val vibrator: VibratorHelper,
+    @Application context: Context,
     private val featureFlags: FeatureFlags,
 ) {
     /** Models UI of [BiometricPromptLayout.iconView] */
@@ -62,8 +68,8 @@
             .distinctUntilChanged()
 
     // TODO(b/251476085): remove after icon controllers are migrated - do not keep this state
-    private var _legacyState = MutableStateFlow(AuthBiometricView.STATE_IDLE)
-    val legacyState: StateFlow<Int> = _legacyState.asStateFlow()
+    private var _legacyState = MutableStateFlow(Spaghetti.BiometricState.STATE_IDLE)
+    val legacyState: StateFlow<Spaghetti.BiometricState> = _legacyState.asStateFlow()
 
     private val _isAuthenticating: MutableStateFlow<Boolean> = MutableStateFlow(false)
 
@@ -135,6 +141,23 @@
             !isOverlayTouched && size.isNotSmall
         }
 
+    /** Padding for prompt UI elements */
+    val promptPadding: Flow<Rect> =
+        combine(size, displayStateInteractor.currentRotation) { size, rotation ->
+            if (size != PromptSize.LARGE) {
+                val navBarInsets = Utils.getNavbarInsets(context)
+                if (rotation == DisplayRotation.ROTATION_90) {
+                    Rect(0, 0, navBarInsets.right, 0)
+                } else if (rotation == DisplayRotation.ROTATION_270) {
+                    Rect(navBarInsets.left, 0, 0, 0)
+                } else {
+                    Rect(0, 0, 0, navBarInsets.bottom)
+                }
+            } else {
+                Rect(0, 0, 0, 0)
+            }
+        }
+
     /** Title for the prompt. */
     val title: Flow<String> =
         promptSelectorInteractor.prompt.map { it?.title ?: "" }.distinctUntilChanged()
@@ -270,7 +293,7 @@
         _isAuthenticated.value = PromptAuthState(false)
         _forceMediumSize.value = true
         _message.value = PromptMessage.Error(message)
-        _legacyState.value = AuthBiometricView.STATE_ERROR
+        _legacyState.value = Spaghetti.BiometricState.STATE_ERROR
 
         if (hapticFeedback) {
             vibrator.error(failedModality)
@@ -322,13 +345,13 @@
         _forceMediumSize.value = true
         _legacyState.value =
             if (alreadyAuthenticated && isConfirmationRequired.first()) {
-                AuthBiometricView.STATE_PENDING_CONFIRMATION
+                Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
             } else if (alreadyAuthenticated && !isConfirmationRequired.first()) {
-                AuthBiometricView.STATE_AUTHENTICATED
+                Spaghetti.BiometricState.STATE_AUTHENTICATED
             } else if (clearIconError) {
-                AuthBiometricView.STATE_IDLE
+                Spaghetti.BiometricState.STATE_IDLE
             } else {
-                AuthBiometricView.STATE_HELP
+                Spaghetti.BiometricState.STATE_HELP
             }
 
         messageJob?.cancel()
@@ -353,7 +376,7 @@
         _message.value =
             if (message.isNotBlank()) PromptMessage.Help(message) else PromptMessage.Empty
         _forceMediumSize.value = true
-        _legacyState.value = AuthBiometricView.STATE_HELP
+        _legacyState.value = Spaghetti.BiometricState.STATE_HELP
 
         messageJob?.cancel()
         messageJob = launch {
@@ -373,7 +396,7 @@
         _isAuthenticating.value = true
         _isAuthenticated.value = PromptAuthState(false)
         _message.value = if (message.isBlank()) PromptMessage.Empty else PromptMessage.Help(message)
-        _legacyState.value = AuthBiometricView.STATE_AUTHENTICATING
+        _legacyState.value = Spaghetti.BiometricState.STATE_AUTHENTICATING
 
         // reset the try again button(s) after the user attempts a retry
         if (isRetry) {
@@ -406,9 +429,9 @@
         _message.value = PromptMessage.Empty
         _legacyState.value =
             if (needsUserConfirmation) {
-                AuthBiometricView.STATE_PENDING_CONFIRMATION
+                Spaghetti.BiometricState.STATE_PENDING_CONFIRMATION
             } else {
-                AuthBiometricView.STATE_AUTHENTICATED
+                Spaghetti.BiometricState.STATE_AUTHENTICATED
             }
 
         if (!needsUserConfirmation) {
@@ -449,7 +472,7 @@
 
         _isAuthenticated.value = authState.asExplicitlyConfirmed()
         _message.value = PromptMessage.Empty
-        _legacyState.value = AuthBiometricView.STATE_AUTHENTICATED
+        _legacyState.value = Spaghetti.BiometricState.STATE_AUTHENTICATED
 
         vibrator.success(authState.authenticatedModality)
 
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
index f2b4e09..c0b2153 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt
@@ -28,8 +28,11 @@
 import com.android.systemui.util.time.SystemClock
 import javax.inject.Inject
 import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
 import kotlinx.coroutines.flow.asStateFlow
 import kotlinx.coroutines.flow.filterNotNull
 import kotlinx.coroutines.flow.launchIn
@@ -47,8 +50,10 @@
     val primaryBouncerShowingSoon: StateFlow<Boolean>
     val primaryBouncerStartingToHide: StateFlow<Boolean>
     val primaryBouncerStartingDisappearAnimation: StateFlow<Runnable?>
+
     /** Determines if we want to instantaneously show the primary bouncer instead of translating. */
     val primaryBouncerScrimmed: StateFlow<Boolean>
+
     /**
      * Set how much of the notification panel is showing on the screen.
      *
@@ -60,8 +65,23 @@
     val panelExpansionAmount: StateFlow<Float>
     val keyguardPosition: StateFlow<Float?>
     val isBackButtonEnabled: StateFlow<Boolean?>
-    /** Determines if user is already unlocked */
-    val keyguardAuthenticated: StateFlow<Boolean?>
+
+    /**
+     * Triggers when the user has successfully used biometrics to authenticate. True = biometrics
+     * used to authenticate is Class 3, else false. When null, biometrics haven't authenticated the
+     * device.
+     */
+    val keyguardAuthenticatedBiometrics: StateFlow<Boolean?>
+
+    /**
+     * Triggers when the given userId (Int) has successfully used primary authentication to
+     * authenticate
+     */
+    val keyguardAuthenticatedPrimaryAuth: Flow<Int>
+
+    /** Triggers when the given userId (Int) has requested the bouncer when already authenticated */
+    val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int>
+
     val showMessage: StateFlow<BouncerShowMessageModel?>
     val resourceUpdateRequests: StateFlow<Boolean>
     val alternateBouncerVisible: StateFlow<Boolean>
@@ -88,7 +108,11 @@
 
     fun setShowMessage(bouncerShowMessageModel: BouncerShowMessageModel?)
 
-    fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?)
+    fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticatedBiometrics: Boolean?)
+
+    suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int)
+
+    suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int)
 
     fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean)
 
@@ -117,9 +141,11 @@
     private val _primaryBouncerDisappearAnimation = MutableStateFlow<Runnable?>(null)
     override val primaryBouncerStartingDisappearAnimation =
         _primaryBouncerDisappearAnimation.asStateFlow()
+
     /** Determines if we want to instantaneously show the primary bouncer instead of translating. */
     private val _primaryBouncerScrimmed = MutableStateFlow(false)
     override val primaryBouncerScrimmed = _primaryBouncerScrimmed.asStateFlow()
+
     /**
      * Set how much of the notification panel is showing on the screen.
      *
@@ -134,13 +160,26 @@
     override val keyguardPosition = _keyguardPosition.asStateFlow()
     private val _isBackButtonEnabled = MutableStateFlow<Boolean?>(null)
     override val isBackButtonEnabled = _isBackButtonEnabled.asStateFlow()
-    private val _keyguardAuthenticated = MutableStateFlow<Boolean?>(null)
-    /** Determines if user is already unlocked */
-    override val keyguardAuthenticated = _keyguardAuthenticated.asStateFlow()
+
+    /** Whether the user is already unlocked by biometrics */
+    private val _keyguardAuthenticatedBiometrics = MutableStateFlow<Boolean?>(null)
+    override val keyguardAuthenticatedBiometrics = _keyguardAuthenticatedBiometrics.asStateFlow()
+
+    /** Whether the user is unlocked via a primary authentication method (pin/pattern/password). */
+    private val _keyguardAuthenticatedPrimaryAuth = MutableSharedFlow<Int>()
+    override val keyguardAuthenticatedPrimaryAuth: Flow<Int> =
+        _keyguardAuthenticatedPrimaryAuth.asSharedFlow()
+
+    /** Whether the user requested to show the bouncer when device is already authenticated */
+    private val _userRequestedBouncerWhenAlreadyAuthenticated = MutableSharedFlow<Int>()
+    override val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+        _userRequestedBouncerWhenAlreadyAuthenticated.asSharedFlow()
+
     private val _showMessage = MutableStateFlow<BouncerShowMessageModel?>(null)
     override val showMessage = _showMessage.asStateFlow()
     private val _resourceUpdateRequests = MutableStateFlow(false)
     override val resourceUpdateRequests = _resourceUpdateRequests.asStateFlow()
+
     /** Values associated with the AlternateBouncer */
     private val _alternateBouncerVisible = MutableStateFlow(false)
     override val alternateBouncerVisible = _alternateBouncerVisible.asStateFlow()
@@ -204,8 +243,16 @@
         _showMessage.value = bouncerShowMessageModel
     }
 
-    override fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?) {
-        _keyguardAuthenticated.value = keyguardAuthenticated
+    override fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticatedBiometrics: Boolean?) {
+        _keyguardAuthenticatedBiometrics.value = keyguardAuthenticatedBiometrics
+    }
+
+    override suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+        _keyguardAuthenticatedPrimaryAuth.emit(userId)
+    }
+
+    override suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+        _userRequestedBouncerWhenAlreadyAuthenticated.emit(userId)
     }
 
     override fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean) {
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
index 9527f32..abddb0a 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt
@@ -92,6 +92,9 @@
     /** Whether the pattern should be visible for the currently-selected user. */
     val isPatternVisible: StateFlow<Boolean> = authenticationInteractor.isPatternVisible
 
+    /** The minimal length of a pattern. */
+    val minPatternLength = authenticationInteractor.minPatternLength
+
     init {
         if (flags.isEnabled()) {
             // Clear the message if moved from throttling to no-longer throttling.
@@ -204,12 +207,24 @@
                 loggingReason = "successful authentication",
             )
         } else {
-            repository.setMessage(errorMessage(authenticationInteractor.getAuthenticationMethod()))
+            showErrorMessage()
         }
 
         return isAuthenticated
     }
 
+    /**
+     * Shows the error message.
+     *
+     * Callers should use this instead of [authenticate] when they know ahead of time that an auth
+     * attempt will fail but aren't interested in the other side effects like triggering throttling.
+     * For example, if the user entered a pattern that's too short, the system can show the error
+     * message without having the attempt trigger throttling.
+     */
+    suspend fun showErrorMessage() {
+        repository.setMessage(errorMessage(authenticationInteractor.getAuthenticationMethod()))
+    }
+
     private fun promptMessage(authMethod: AuthenticationMethodModel): String {
         return when (authMethod) {
             is AuthenticationMethodModel.Pin ->
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
index 0e0f1f6..579f0b7 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
@@ -79,14 +79,18 @@
 ) {
     private val passiveAuthBouncerDelay =
         context.resources.getInteger(R.integer.primary_bouncer_passive_auth_delay).toLong()
+
     /** Runnable to show the primary bouncer. */
     val showRunnable = Runnable {
         repository.setPrimaryShow(true)
         repository.setPrimaryShowingSoon(false)
         primaryBouncerCallbackInteractor.dispatchVisibilityChanged(View.VISIBLE)
     }
-
-    val keyguardAuthenticated: Flow<Boolean> = repository.keyguardAuthenticated.filterNotNull()
+    val keyguardAuthenticatedPrimaryAuth: Flow<Int> = repository.keyguardAuthenticatedPrimaryAuth
+    val keyguardAuthenticatedBiometrics: Flow<Boolean> =
+        repository.keyguardAuthenticatedBiometrics.filterNotNull()
+    val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+        repository.userRequestedBouncerWhenAlreadyAuthenticated.filterNotNull()
     val isShowing: StateFlow<Boolean> = repository.primaryBouncerShow
     val startingToHide: Flow<Unit> = repository.primaryBouncerStartingToHide.filter { it }.map {}
     val isBackButtonEnabled: Flow<Boolean> = repository.isBackButtonEnabled.filterNotNull()
@@ -96,6 +100,7 @@
     val resourceUpdateRequests: Flow<Boolean> = repository.resourceUpdateRequests.filter { it }
     val keyguardPosition: Flow<Float> = repository.keyguardPosition.filterNotNull()
     val panelExpansionAmount: Flow<Float> = repository.panelExpansionAmount
+
     /** 0f = bouncer fully hidden. 1f = bouncer fully visible. */
     val bouncerExpansion: Flow<Float> =
         combine(repository.panelExpansionAmount, repository.primaryBouncerShow) {
@@ -107,6 +112,7 @@
                 0f
             }
         }
+
     /** Allow for interaction when just about fully visible */
     val isInteractable: Flow<Boolean> = bouncerExpansion.map { it > 0.9 }
     val sideFpsShowing: Flow<Boolean> = repository.sideFpsShowing
@@ -144,7 +150,7 @@
     @JvmOverloads
     fun show(isScrimmed: Boolean) {
         // Reset some states as we show the bouncer.
-        repository.setKeyguardAuthenticated(null)
+        repository.setKeyguardAuthenticatedBiometrics(null)
         repository.setPrimaryStartingToHide(false)
 
         val resumeBouncer =
@@ -268,9 +274,19 @@
         repository.setResourceUpdateRequests(true)
     }
 
-    /** Tell the bouncer that keyguard is authenticated. */
-    fun notifyKeyguardAuthenticated(strongAuth: Boolean) {
-        repository.setKeyguardAuthenticated(strongAuth)
+    /** Tell the bouncer that keyguard is authenticated with primary authentication. */
+    fun notifyKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+        applicationScope.launch { repository.setKeyguardAuthenticatedPrimaryAuth(userId) }
+    }
+
+    /** Tell the bouncer that bouncer is requested when device is already authenticated */
+    fun notifyUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+        applicationScope.launch { repository.setKeyguardAuthenticatedPrimaryAuth(userId) }
+    }
+
+    /** Tell the bouncer that keyguard is authenticated with biometrics. */
+    fun notifyKeyguardAuthenticatedBiometrics(strongAuth: Boolean) {
+        repository.setKeyguardAuthenticatedBiometrics(strongAuth)
     }
 
     /** Update the position of the bouncer when showing. */
@@ -280,7 +296,7 @@
 
     /** Notifies that the state change was handled. */
     fun notifyKeyguardAuthenticatedHandled() {
-        repository.setKeyguardAuthenticated(null)
+        repository.setKeyguardAuthenticatedBiometrics(null)
     }
 
     /** Notifies that the message was shown. */
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
index 6ba8439..649ae2f 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModel.kt
@@ -59,7 +59,7 @@
     val bouncerShowMessage: Flow<BouncerShowMessageModel> = interactor.showMessage
 
     /** Observe whether keyguard is authenticated already. */
-    val keyguardAuthenticated: Flow<Boolean> = interactor.keyguardAuthenticated
+    val keyguardAuthenticated: Flow<Boolean> = interactor.keyguardAuthenticatedBiometrics
 
     /** Observe whether the side fps is showing. */
     val sideFpsShowing: Flow<Boolean> = interactor.sideFpsShowing
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
index 80a41ce..d214797 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModel.kt
@@ -40,20 +40,21 @@
 
     /** Notifies that the UI has been shown to the user. */
     fun onShown() {
+        _password.value = ""
         interactor.resetMessage()
     }
 
     /** Notifies that the user has changed the password input. */
-    fun onPasswordInputChanged(password: String) {
-        if (this.password.value.isEmpty() && password.isNotEmpty()) {
+    fun onPasswordInputChanged(newPassword: String) {
+        if (this.password.value.isEmpty() && newPassword.isNotEmpty()) {
             interactor.clearMessage()
         }
 
-        if (password.isNotEmpty()) {
+        if (newPassword.isNotEmpty()) {
             interactor.onIntentionalUserInput()
         }
 
-        _password.value = password
+        _password.value = newPassword
     }
 
     /** Notifies that the user has pressed the key for attempting to authenticate the password. */
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
index 85eaf0b..1985c37 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModel.kt
@@ -129,7 +129,12 @@
                     buildList {
                         var dot = previousDot
                         while (dot != hitDot) {
-                            add(dot)
+                            // Move along the direction of the line connecting the previously
+                            // selected dot and current hit dot, and see if they were skipped over
+                            // but fall on that line.
+                            if (dot.isOnLineSegment(previousDot, hitDot)) {
+                                add(dot)
+                            }
                             dot =
                                 PatternDotViewModel(
                                     x =
@@ -170,7 +175,9 @@
         _selectedDots.value = linkedSetOf()
 
         applicationScope.launch {
-            if (interactor.authenticate(pattern) != true) {
+            if (pattern.size < interactor.minPatternLength) {
+                interactor.showErrorMessage()
+            } else if (interactor.authenticate(pattern) != true) {
                 showFailureAnimation()
             }
         }
@@ -206,6 +213,34 @@
     }
 }
 
+/**
+ * Determines whether [this] dot is present on the line segment connecting [first] and [second]
+ * dots.
+ */
+private fun PatternDotViewModel.isOnLineSegment(
+    first: PatternDotViewModel,
+    second: PatternDotViewModel
+): Boolean {
+    val anotherPoint = this
+    // No need to consider any points outside the bounds of two end points
+    val isWithinBounds =
+        anotherPoint.x.isBetween(first.x, second.x) && anotherPoint.y.isBetween(first.y, second.y)
+    if (!isWithinBounds) {
+        return false
+    }
+
+    // Uses the 2 point line equation: (y-y1)/(x-x1) = (y2-y1)/(x2-x1)
+    // which can be rewritten as:      (y-y1)*(x2-x1) = (x-x1)*(y2-y1)
+    // This is true for any point on the line passing through these two points
+    return (anotherPoint.y - first.y) * (second.x - first.x) ==
+        (anotherPoint.x - first.x) * (second.y - first.y)
+}
+
+/** Is [this] Int between [a] and [b] */
+private fun Int.isBetween(a: Int, b: Int): Boolean {
+    return (this in a..b) || (this in b..a)
+}
+
 data class PatternDotViewModel(
     val x: Int,
     val y: Int,
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
index ebf939b..dc5c528 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModel.kt
@@ -70,13 +70,7 @@
     /** Appearance of the confirm button. */
     val confirmButtonAppearance: StateFlow<ActionButtonAppearance> =
         interactor.isAutoConfirmEnabled
-            .map {
-                if (it) {
-                    ActionButtonAppearance.Hidden
-                } else {
-                    ActionButtonAppearance.Shown
-                }
-            }
+            .map { if (it) ActionButtonAppearance.Hidden else ActionButtonAppearance.Shown }
             .stateIn(
                 scope = applicationScope,
                 started = SharingStarted.Eagerly,
@@ -85,6 +79,7 @@
 
     /** Notifies that the UI has been shown to the user. */
     fun onShown() {
+        clearPinInput()
         interactor.resetMessage()
     }
 
@@ -113,7 +108,7 @@
 
     /** Notifies that the user long-pressed the backspace button. */
     fun onBackspaceButtonLongPressed() {
-        mutablePinInput.value = mutablePinInput.value.clearAll()
+        clearPinInput()
     }
 
     /** Notifies that the user clicked the "enter" button. */
@@ -121,6 +116,10 @@
         tryAuthenticate(useAutoConfirm = false)
     }
 
+    private fun clearPinInput() {
+        mutablePinInput.value = mutablePinInput.value.clearAll()
+    }
+
     private fun tryAuthenticate(useAutoConfirm: Boolean) {
         val pinCode = mutablePinInput.value.getPin()
 
@@ -133,7 +132,7 @@
 
             // TODO(b/291528545): this should not be cleared on success (at least until the view
             // is animated away).
-            mutablePinInput.value = mutablePinInput.value.clearAll()
+            clearPinInput()
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
index c9517c2..da5e933 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
@@ -29,6 +29,7 @@
 import android.app.KeyguardManager;
 import android.app.NotificationManager;
 import android.app.StatsManager;
+import android.app.StatusBarManager;
 import android.app.UiModeManager;
 import android.app.WallpaperManager;
 import android.app.admin.DevicePolicyManager;
@@ -681,4 +682,10 @@
     static TextClassificationManager provideTextClassificationManager(Context context) {
         return context.getSystemService(TextClassificationManager.class);
     }
+
+    @Provides
+    @Singleton
+    static StatusBarManager provideStatusBarManager(Context context) {
+        return context.getSystemService(StatusBarManager.class);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
index 7ce7ce94..f12b919 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
@@ -34,9 +34,11 @@
 import com.android.systemui.globalactions.GlobalActionsComponent
 import com.android.systemui.keyboard.KeyboardUI
 import com.android.systemui.keyboard.PhysicalKeyboardCoreStartable
-import com.android.systemui.keyguard.KeyguardViewMediator
 import com.android.systemui.keyguard.KeyguardViewConfigurator
+import com.android.systemui.keyguard.KeyguardViewMediator
 import com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceCoreStartable
+import com.android.systemui.keyguard.ui.binder.KeyguardDismissActionBinder
+import com.android.systemui.keyguard.ui.binder.KeyguardDismissBinder
 import com.android.systemui.log.SessionTracker
 import com.android.systemui.media.RingtonePlayer
 import com.android.systemui.media.dialog.MediaOutputSwitcherDialogUI
@@ -74,12 +76,14 @@
 /**
  * Collection of {@link CoreStartable}s that should be run on AOSP.
  */
-@Module(includes = [
-    MultiUserUtilsModule::class,
-    StartControlsStartableModule::class,
-    StartBinderLoggerModule::class,
-    WallpaperModule::class,
-])
+@Module(
+    includes = [
+        MultiUserUtilsModule::class,
+        StartControlsStartableModule::class,
+        StartBinderLoggerModule::class,
+        WallpaperModule::class,
+    ]
+)
 abstract class SystemUICoreStartableModule {
     /** Inject into AuthController.  */
     @Binds
@@ -352,4 +356,14 @@
     @IntoMap
     @ClassKey(BackActionInteractor::class)
     abstract fun bindBackActionInteractor(impl: BackActionInteractor): CoreStartable
+
+    @Binds
+    @IntoMap
+    @ClassKey(KeyguardDismissActionBinder::class)
+    abstract fun bindKeyguardDismissActionBinder(impl: KeyguardDismissActionBinder): CoreStartable
+
+    @Binds
+    @IntoMap
+    @ClassKey(KeyguardDismissBinder::class)
+    abstract fun bindKeyguardDismissBinder(impl: KeyguardDismissBinder): CoreStartable
 }
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 7ee0ff4..3a942bd 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -37,7 +37,6 @@
 import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider;
 import com.android.systemui.biometrics.UdfpsDisplayModeProvider;
 import com.android.systemui.biometrics.dagger.BiometricsModule;
-import com.android.systemui.biometrics.dagger.UdfpsModule;
 import com.android.systemui.bouncer.ui.BouncerViewModule;
 import com.android.systemui.classifier.FalsingModule;
 import com.android.systemui.clipboardoverlay.dagger.ClipboardOverlayModule;
@@ -207,7 +206,6 @@
             TelephonyRepositoryModule.class,
             TemporaryDisplayModule.class,
             TunerModule.class,
-            UdfpsModule.class,
             UserModule.class,
             UtilModule.class,
             NoteTaskModule.class,
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt
similarity index 64%
rename from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
rename to packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt
index df5cefd..626a68f 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/data/DisplayEvent.kt
@@ -14,16 +14,11 @@
  * limitations under the License.
  */
 
-package com.android.systemui.biometrics.shared.model
+package com.android.systemui.display.data
 
-import android.hardware.fingerprint.FingerprintSensorProperties
-
-/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
-enum class FingerprintSensorType {
-    UNKNOWN,
-    REAR,
-    UDFPS_ULTRASONIC,
-    UDFPS_OPTICAL,
-    POWER_BUTTON,
-    HOME_BUTTON,
+sealed interface DisplayEvent {
+    val displayId: Int
+    data class Added(override val displayId: Int) : DisplayEvent
+    data class Removed(override val displayId: Int) : DisplayEvent
+    data class Changed(override val displayId: Int) : DisplayEvent
 }
diff --git a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
index 3444af4..1751358 100644
--- a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
@@ -29,6 +29,7 @@
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.dagger.qualifiers.Application
 import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.display.data.DisplayEvent
 import com.android.systemui.util.Compile
 import com.android.systemui.util.traceSection
 import javax.inject.Inject
@@ -41,6 +42,7 @@
 import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.combine
 import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.filter
 import kotlinx.coroutines.flow.flowOn
 import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.flow.onEach
@@ -48,7 +50,13 @@
 
 /** Provides a [Flow] of [Display] as returned by [DisplayManager]. */
 interface DisplayRepository {
-    /** Provides a nullable set of displays. */
+    /** Display change event indicating a change to the given displayId has occurred. */
+    val displayChangeEvent: Flow<Int>
+
+    /**
+     * Provides a nullable set of displays. Updates when new displays have been added or removed but
+     * not when a display's info has changed.
+     */
     val displays: Flow<Set<Display>>
 
     /**
@@ -86,33 +94,36 @@
     @Application applicationScope: CoroutineScope,
     @Background backgroundCoroutineDispatcher: CoroutineDispatcher
 ) : DisplayRepository {
-
     // Displays are enabled only after receiving them in [onDisplayAdded]
-    private val enabledDisplays: StateFlow<Set<Display>> =
-        conflatedCallbackFlow {
-                val callback =
-                    object : DisplayListener {
-                        override fun onDisplayAdded(displayId: Int) {
-                            trySend(getDisplays())
-                        }
+    private val allDisplayEvents: Flow<DisplayEvent> = conflatedCallbackFlow {
+        val callback =
+            object : DisplayListener {
+                override fun onDisplayAdded(displayId: Int) {
+                    trySend(DisplayEvent.Added(displayId))
+                }
 
-                        override fun onDisplayRemoved(displayId: Int) {
-                            trySend(getDisplays())
-                        }
+                override fun onDisplayRemoved(displayId: Int) {
+                    trySend(DisplayEvent.Removed(displayId))
+                }
 
-                        override fun onDisplayChanged(displayId: Int) {
-                            trySend(getDisplays())
-                        }
-                    }
-                displayManager.registerDisplayListener(
-                    callback,
-                    backgroundHandler,
-                    EVENT_FLAG_DISPLAY_ADDED or
-                        EVENT_FLAG_DISPLAY_CHANGED or
-                        EVENT_FLAG_DISPLAY_REMOVED,
-                )
-                awaitClose { displayManager.unregisterDisplayListener(callback) }
+                override fun onDisplayChanged(displayId: Int) {
+                    trySend(DisplayEvent.Changed(displayId))
+                }
             }
+        displayManager.registerDisplayListener(
+            callback,
+            backgroundHandler,
+            EVENT_FLAG_DISPLAY_ADDED or EVENT_FLAG_DISPLAY_CHANGED or EVENT_FLAG_DISPLAY_REMOVED,
+        )
+        awaitClose { displayManager.unregisterDisplayListener(callback) }
+    }
+
+    override val displayChangeEvent: Flow<Int> =
+        allDisplayEvents.filter { it is DisplayEvent.Changed }.map { it.displayId }
+
+    private val enabledDisplays =
+        allDisplayEvents
+            .map { getDisplays() }
             .flowOn(backgroundCoroutineDispatcher)
             .stateIn(
                 applicationScope,
diff --git a/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt b/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
index ecc9d0e..f730935 100644
--- a/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
@@ -34,7 +34,8 @@
     context: Context,
     private val onStartMirroringClickListener: View.OnClickListener,
     private val onCancelMirroring: View.OnClickListener,
-) : Dialog(context, R.style.Theme_SystemUI_Dialog) {
+    theme: Int = R.style.Theme_SystemUI_Dialog,
+) : Dialog(context, theme) {
 
     private lateinit var mirrorButton: TextView
     private lateinit var dismissButton: TextView
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
index 1cd3774..4e4b79c 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandler.java
@@ -155,9 +155,12 @@
                         return true;
                     }
 
-                    // Don't set expansion if the user doesn't have a pin/password set.
+                    // Don't set expansion if the user doesn't have a pin/password set so that no
+                    // animations are played we're not transitioning to the bouncer.
                     if (!mLockPatternUtils.isSecure(mUserTracker.getUserId())) {
-                        return true;
+                        // Return false so the gesture is not consumed, allowing the dream to wake
+                        // if it wants instead of doing nothing.
+                        return false;
                     }
 
                     // For consistency, we adopt the expansion definition found in the
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 1e5fcbe..37a9572 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -122,7 +122,7 @@
     // TODO(b/292213543): Tracking Bug
     @JvmField
     val NOTIFICATION_GROUP_EXPANSION_CHANGE =
-            unreleasedFlag("notification_group_expansion_change", teamfood = true)
+            unreleasedFlag("notification_group_expansion_change")
 
     // 200 - keyguard/lockscreen
     // ** Flag retired **
@@ -268,9 +268,9 @@
     val MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA =
         unreleasedFlag("migrate_split_keyguard_bottom_area", teamfood = true)
 
-    /** Whether to listen for fingerprint authentication over keyguard occluding activities. */
-    // TODO(b/283260512): Tracking bug.
-    @JvmField val FP_LISTEN_OCCLUDING_APPS = releasedFlag("fp_listen_occluding_apps")
+    // TODO(b/297037052): Tracking bug.
+    @JvmField
+    val REMOVE_NPVC_BOTTOM_AREA_USAGE = unreleasedFlag("remove_npvc_bottom_area_usage")
 
     /** Flag meant to guard the talkback fix for the KeyguardIndicationTextView */
     // TODO(b/286563884): Tracking bug
@@ -312,11 +312,6 @@
     val KEYGUARD_WM_STATE_REFACTOR: UnreleasedFlag =
             unreleasedFlag("keyguard_wm_state_refactor")
 
-    /** Stop running face auth when the display state changes to OFF. */
-    // TODO(b/294221702): Tracking bug.
-    @JvmField val STOP_FACE_AUTH_ON_DISPLAY_OFF = resourceBooleanFlag(
-            R.bool.flag_stop_face_auth_on_display_off, "stop_face_auth_on_display_off")
-
     /** Flag to disable the face scanning animation pulsing. */
     // TODO(b/295245791): Tracking bug.
     @JvmField val STOP_PULSING_FACE_SCANNING_ANIMATION = resourceBooleanFlag(
@@ -365,6 +360,10 @@
     @JvmField
     val QS_PIPELINE_AUTO_ADD = unreleasedFlag("qs_pipeline_auto_add", teamfood = true)
 
+    // TODO(b/296357483): Tracking Bug
+    @JvmField
+    val QS_PIPELINE_NEW_TILES = unreleasedFlag("qs_pipeline_new_tiles")
+
     // TODO(b/254512383): Tracking Bug
     @JvmField
     val FULL_SCREEN_USER_SWITCHER =
@@ -389,9 +388,6 @@
     // TODO(b/265892345): Tracking Bug
     val PLUG_IN_STATUS_BAR_CHIP = releasedFlag("plug_in_status_bar_chip")
 
-    // TODO(b/280426085): Tracking Bug
-    @JvmField val NEW_BLUETOOTH_REPOSITORY = releasedFlag("new_bluetooth_repository")
-
     // TODO(b/292533677): Tracking Bug
     val WIFI_TRACKER_LIB_FOR_WIFI_ICON = releasedFlag("wifi_tracker_lib_for_wifi_icon")
 
@@ -666,9 +662,6 @@
     // 2200 - biometrics (udfps, sfps, BiometricPrompt, etc.)
     // TODO(b/259264861): Tracking Bug
     @JvmField val UDFPS_NEW_TOUCH_DETECTION = releasedFlag("udfps_new_touch_detection")
-    @JvmField val UDFPS_ELLIPSE_DETECTION = releasedFlag("udfps_ellipse_detection")
-    // TODO(b/278622168): Tracking Bug
-    @JvmField val BIOMETRIC_BP_STRONG = releasedFlag("biometric_bp_strong")
 
     // 2300 - stylus
     @JvmField val TRACK_STYLUS_EVER_USED = releasedFlag("track_stylus_ever_used")
@@ -746,8 +739,7 @@
     // 3000 - dream
     // TODO(b/285059790) : Tracking Bug
     @JvmField
-    val LOCKSCREEN_WALLPAPER_DREAM_ENABLED =
-        unreleasedFlag(name = "enable_lockscreen_wallpaper_dream", teamfood = true)
+    val LOCKSCREEN_WALLPAPER_DREAM_ENABLED = unreleasedFlag("enable_lockscreen_wallpaper_dream")
 
     // TODO(b/283084712): Tracking Bug
     @JvmField val IMPROVED_HUN_ANIMATIONS = unreleasedFlag("improved_hun_animations")
@@ -785,7 +777,8 @@
 
     /** TODO(b/296223317): Enables the new keyguard presentation containing a clock. */
     @JvmField
-    val ENABLE_CLOCK_KEYGUARD_PRESENTATION = unreleasedFlag("enable_clock_keyguard_presentation")
+    val ENABLE_CLOCK_KEYGUARD_PRESENTATION =
+        unreleasedFlag("enable_clock_keyguard_presentation", teamfood = true)
 
     /** Enable the Compose implementation of the PeopleSpaceActivity. */
     @JvmField
@@ -802,4 +795,12 @@
     /** Enable haptic slider component in the brightness slider */
     @JvmField
     val HAPTIC_BRIGHTNESS_SLIDER = unreleasedFlag("haptic_brightness_slider")
+
+    // TODO(b/287205379): Tracking bug
+    @JvmField
+    val QS_CONTAINER_GRAPH_OPTIMIZER = unreleasedFlag( "qs_container_graph_optimizer")
+
+    /** Enable showing a dialog when clicking on Quick Settings bluetooth tile. */
+    @JvmField
+    val BLUETOOTH_QS_TILE_DIALOG = unreleasedFlag("bluetooth_qs_tile_dialog")
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt b/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt
index b5b56b2..6f25f7c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/backlight/ui/view/KeyboardBacklightDialog.kt
@@ -44,7 +44,8 @@
     context: Context,
     initialCurrentLevel: Int,
     initialMaxLevel: Int,
-) : Dialog(context, R.style.Theme_SystemUI_Dialog) {
+    theme: Int = R.style.Theme_SystemUI_Dialog,
+) : Dialog(context, theme) {
 
     private data class RootProperties(
         val cornerRadius: Float,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 2b4dc81..9915720 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -2208,14 +2208,21 @@
         // we explicitly re-set state.
         if (mShowing && mKeyguardStateController.isShowing()) {
             if (mPM.isInteractive() && !mHiding) {
-                // It's already showing, and we're not trying to show it while the screen is off.
-                // We can simply reset all of the views, but don't hide the bouncer in case the user
-                // is currently interacting with it.
-                if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is "
-                        + "already showing, we're interactive, and we were not previously hiding. "
-                        + "It should be safe to short-circuit here.");
-                resetStateLocked(/* hideBouncer= */ false);
-                return;
+                if (mKeyguardStateController.isKeyguardGoingAway()) {
+                    Log.e(TAG, "doKeyguard: we're still showing, but going away. Re-show the "
+                            + "keyguard rather than short-circuiting and resetting.");
+                } else {
+                    // It's already showing, and we're not trying to show it while the screen is
+                    // off. We can simply reset all of the views, but don't hide the bouncer in case
+                    // the user is currently interacting with it.
+                    if (DEBUG) Log.d(TAG,
+                            "doKeyguard: not showing (instead, resetting) because it is "
+                                    + "already showing, we're interactive, we were not "
+                                    + "previously hiding. It should be safe to short-circuit "
+                                    + "here.");
+                    resetStateLocked(/* hideBouncer= */ false);
+                    return;
+                }
             } else {
                 // We are trying to show the keyguard while the screen is off or while we were in
                 // the middle of hiding - this results from race conditions involving locking while
@@ -2740,13 +2747,18 @@
             setUnlockAndWakeFromDream(false, WakeAndUnlockUpdateReason.SHOW);
             setPendingLock(false);
 
-            // Force if we we're showing in the middle of hiding, to ensure we end up in the correct
-            // state.
-            setShowingLocked(true, mHiding /* force */);
-            if (mHiding) {
-                Log.d(TAG, "Forcing setShowingLocked because mHiding=true, which means we're "
-                        + "showing in the middle of hiding.");
+            final boolean hidingOrGoingAway =
+                    mHiding || mKeyguardStateController.isKeyguardGoingAway();
+            if (hidingOrGoingAway) {
+                Log.d(TAG, "Forcing setShowingLocked because one of these is true:"
+                        + "mHiding=" + mHiding
+                        + ", keyguardGoingAway=" + mKeyguardStateController.isKeyguardGoingAway()
+                        + ", which means we're showing in the middle of hiding.");
             }
+
+            // Force if we we're showing in the middle of unlocking, to ensure we end up in the
+            // correct state.
+            setShowingLocked(true, hidingOrGoingAway /* force */);
             mHiding = false;
 
             if (!mFeatureFlags.isEnabled(Flags.KEYGUARD_WM_STATE_REFACTOR)) {
@@ -2954,7 +2966,6 @@
         Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
                 + " fadeoutDuration=" + fadeoutDuration);
         synchronized (KeyguardViewMediator.this) {
-
             // Tell ActivityManager that we canceled the keyguard animation if
             // handleStartKeyguardExitAnimation was called, but we're not hiding the keyguard,
             // unless we're animating the surface behind the keyguard and will be hiding the
@@ -3222,10 +3233,13 @@
 
         // Post layout changes to the next frame, so we don't hang at the end of the animation.
         DejankUtils.postAfterTraversal(() -> {
-            if (!mPM.isInteractive()) {
-                Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal" +
-                        "Not interactive after traversal. Don't hide the keyguard. This means we " +
-                        "re-locked the device during unlock.");
+            if (!mPM.isInteractive() && !mPendingLock) {
+                Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal:"
+                        + "mPM.isInteractive()=" + mPM.isInteractive()
+                        + "mPendingLock=" + mPendingLock + "."
+                        + "One of these being false means we re-locked the device during unlock. "
+                        + "Do not proceed to finish keyguard exit and unlock.");
+                finishSurfaceBehindRemoteAnimation(true /* showKeyguard */);
                 return;
             }
 
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
index 8954947..6db21b2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepository.kt
@@ -26,6 +26,7 @@
 import com.android.keyguard.FaceAuthUiEvent
 import com.android.systemui.Dumpable
 import com.android.systemui.R
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
 import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
 import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
@@ -50,7 +51,6 @@
 import com.android.systemui.log.FaceAuthenticationLogger
 import com.android.systemui.log.SessionTracker
 import com.android.systemui.log.table.TableLogBuffer
-import com.android.systemui.log.table.logDiffsForTable
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.user.data.model.SelectionStatus
 import com.android.systemui.user.data.repository.UserRepository
@@ -66,9 +66,10 @@
 import kotlinx.coroutines.delay
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.SharingStarted
 import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asStateFlow
 import kotlinx.coroutines.flow.combine
-import kotlinx.coroutines.flow.distinctUntilChanged
 import kotlinx.coroutines.flow.filter
 import kotlinx.coroutines.flow.filterNotNull
 import kotlinx.coroutines.flow.flowOf
@@ -77,6 +78,7 @@
 import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.flow.merge
 import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.stateIn
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.withContext
 
@@ -153,13 +155,14 @@
     private val faceAuthLogger: FaceAuthenticationLogger,
     private val biometricSettingsRepository: BiometricSettingsRepository,
     private val deviceEntryFingerprintAuthRepository: DeviceEntryFingerprintAuthRepository,
-    private val trustRepository: TrustRepository,
+    trustRepository: TrustRepository,
     private val keyguardRepository: KeyguardRepository,
     private val keyguardInteractor: KeyguardInteractor,
     private val alternateBouncerInteractor: AlternateBouncerInteractor,
     @FaceDetectTableLog private val faceDetectLog: TableLogBuffer,
     @FaceAuthTableLog private val faceAuthLog: TableLogBuffer,
     private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
+    private val displayStateInteractor: DisplayStateInteractor,
     private val featureFlags: FeatureFlags,
     dumpManager: DumpManager,
 ) : DeviceEntryFaceAuthRepository, Dumpable {
@@ -202,11 +205,9 @@
     private val keyguardSessionId: InstanceId?
         get() = sessionTracker.getSessionId(StatusBarManager.SESSION_KEYGUARD)
 
-    private val _canRunFaceAuth = MutableStateFlow(false)
     override val canRunFaceAuth: StateFlow<Boolean>
-        get() = _canRunFaceAuth
 
-    private val canRunDetection = MutableStateFlow(false)
+    private val canRunDetection: StateFlow<Boolean>
 
     private val _isAuthenticated = MutableStateFlow(false)
     override val isAuthenticated: Flow<Boolean>
@@ -252,10 +253,58 @@
         dumpManager.registerCriticalDumpable("DeviceEntryFaceAuthRepositoryImpl", this)
 
         if (featureFlags.isEnabled(Flags.FACE_AUTH_REFACTOR)) {
+            canRunFaceAuth =
+                listOf(
+                        *gatingConditionsForAuthAndDetect(),
+                        Pair(isLockedOut.isFalse(), "isNotInLockOutState"),
+                        Pair(
+                            trustRepository.isCurrentUserTrusted.isFalse(),
+                            "currentUserIsNotTrusted"
+                        ),
+                        Pair(
+                            biometricSettingsRepository.isFaceAuthCurrentlyAllowed,
+                            "isFaceAuthCurrentlyAllowed"
+                        ),
+                        Pair(isAuthenticated.isFalse(), "faceNotAuthenticated"),
+                    )
+                    .andAllFlows("canFaceAuthRun", faceAuthLog)
+                    .flowOn(mainDispatcher)
+                    .stateIn(applicationScope, SharingStarted.Eagerly, false)
+
+            // Face detection can run only when lockscreen bypass is enabled
+            // & detection is supported
+            //   & biometric unlock is not allowed
+            //     or user is trusted by trust manager & we want to run face detect to dismiss
+            // keyguard
+            canRunDetection =
+                listOf(
+                        *gatingConditionsForAuthAndDetect(),
+                        Pair(isBypassEnabled, "isBypassEnabled"),
+                        Pair(
+                            biometricSettingsRepository.isFaceAuthCurrentlyAllowed
+                                .isFalse()
+                                .or(trustRepository.isCurrentUserTrusted),
+                            "faceAuthIsNotCurrentlyAllowedOrCurrentUserIsTrusted"
+                        ),
+                        // We don't want to run face detect if fingerprint can be used to unlock the
+                        // device
+                        // but it's not possible to authenticate with FP from the bouncer (UDFPS)
+                        Pair(
+                            and(isUdfps(), deviceEntryFingerprintAuthRepository.isRunning)
+                                .isFalse(),
+                            "udfpsAuthIsNotPossibleAnymore"
+                        )
+                    )
+                    .andAllFlows("canFaceDetectRun", faceDetectLog)
+                    .flowOn(mainDispatcher)
+                    .stateIn(applicationScope, SharingStarted.Eagerly, false)
             observeFaceAuthGatingChecks()
             observeFaceDetectGatingChecks()
             observeFaceAuthResettingConditions()
             listenForSchedulingWatchdog()
+        } else {
+            canRunFaceAuth = MutableStateFlow(false).asStateFlow()
+            canRunDetection = MutableStateFlow(false).asStateFlow()
         }
     }
 
@@ -298,39 +347,13 @@
     }
 
     private fun observeFaceDetectGatingChecks() {
-        // Face detection can run only when lockscreen bypass is enabled
-        // & detection is supported
-        //   & biometric unlock is not allowed
-        //     or user is trusted by trust manager & we want to run face detect to dismiss keyguard
-        listOf(
-                canFaceAuthOrDetectRun(faceDetectLog),
-                logAndObserve(isBypassEnabled, "isBypassEnabled", faceDetectLog),
-                logAndObserve(
-                    biometricSettingsRepository.isFaceAuthCurrentlyAllowed
-                        .isFalse()
-                        .or(trustRepository.isCurrentUserTrusted),
-                    "faceAuthIsNotCurrentlyAllowedOrCurrentUserIsTrusted",
-                    faceDetectLog
-                ),
-                // We don't want to run face detect if fingerprint can be used to unlock the device
-                // but it's not possible to authenticate with FP from the bouncer (UDFPS)
-                logAndObserve(
-                    and(isUdfps(), deviceEntryFingerprintAuthRepository.isRunning).isFalse(),
-                    "udfpsAuthIsNotPossibleAnymore",
-                    faceDetectLog
-                )
-            )
-            .reduce(::and)
-            .distinctUntilChanged()
+        canRunDetection
             .onEach {
-                faceAuthLogger.canRunDetectionChanged(it)
-                canRunDetection.value = it
                 if (!it) {
                     cancelDetection()
                 }
             }
             .flowOn(mainDispatcher)
-            .logDiffsForTable(faceDetectLog, "", "canFaceDetectRun", false)
             .launchIn(applicationScope)
     }
 
@@ -339,76 +362,54 @@
             it == BiometricType.UNDER_DISPLAY_FINGERPRINT
         }
 
-    private fun canFaceAuthOrDetectRun(tableLogBuffer: TableLogBuffer): Flow<Boolean> {
-        return listOf(
-                logAndObserve(
-                    biometricSettingsRepository.isFaceAuthEnrolledAndEnabled,
-                    "isFaceAuthEnrolledAndEnabled",
-                    tableLogBuffer
-                ),
-                logAndObserve(faceAuthPaused.isFalse(), "faceAuthIsNotPaused", tableLogBuffer),
-                logAndObserve(
-                    keyguardRepository.isKeyguardGoingAway.isFalse(),
-                    "keyguardNotGoingAway",
-                    tableLogBuffer
-                ),
-                logAndObserve(
-                    keyguardRepository.wakefulness.map { it.isStartingToSleep() }.isFalse(),
-                    "deviceNotStartingToSleep",
-                    tableLogBuffer
-                ),
-                logAndObserve(
-                    keyguardInteractor.isSecureCameraActive
-                        .isFalse()
-                        .or(
-                            alternateBouncerInteractor.isVisible.or(
-                                keyguardInteractor.primaryBouncerShowing
-                            )
-                        ),
-                    "secureCameraNotActiveOrAnyBouncerIsShowing",
-                    tableLogBuffer
-                ),
-                logAndObserve(
-                    biometricSettingsRepository.isFaceAuthSupportedInCurrentPosture,
-                    "isFaceAuthSupportedInCurrentPosture",
-                    tableLogBuffer
-                ),
-                logAndObserve(
-                    biometricSettingsRepository.isCurrentUserInLockdown.isFalse(),
-                    "userHasNotLockedDownDevice",
-                    tableLogBuffer
-                ),
-                logAndObserve(
-                    keyguardRepository.isKeyguardShowing,
-                    "isKeyguardShowing",
-                    tableLogBuffer
-                )
-            )
-            .reduce(::and)
+    private fun gatingConditionsForAuthAndDetect(): Array<Pair<Flow<Boolean>, String>> {
+        return arrayOf(
+            Pair(
+                and(
+                        displayStateInteractor.isDefaultDisplayOff,
+                        keyguardRepository.wakefulness.map { it.isAwake() },
+                    )
+                    .isFalse(),
+                // this can happen if an app is requesting for screen off, the display can
+                // turn off without wakefulness.isStartingToSleepOrAsleep calls
+                "displayIsNotOffWhileAwake",
+            ),
+            Pair(
+                biometricSettingsRepository.isFaceAuthEnrolledAndEnabled,
+                "isFaceAuthEnrolledAndEnabled"
+            ),
+            Pair(faceAuthPaused.isFalse(), "faceAuthIsNotPaused"),
+            Pair(keyguardRepository.isKeyguardGoingAway.isFalse(), "keyguardNotGoingAway"),
+            Pair(
+                keyguardRepository.wakefulness.map { it.isStartingToSleep() }.isFalse(),
+                "deviceNotStartingToSleep"
+            ),
+            Pair(
+                keyguardInteractor.isSecureCameraActive
+                    .isFalse()
+                    .or(
+                        alternateBouncerInteractor.isVisible.or(
+                            keyguardInteractor.primaryBouncerShowing
+                        )
+                    ),
+                "secureCameraNotActiveOrAnyBouncerIsShowing"
+            ),
+            Pair(
+                biometricSettingsRepository.isFaceAuthSupportedInCurrentPosture,
+                "isFaceAuthSupportedInCurrentPosture"
+            ),
+            Pair(
+                biometricSettingsRepository.isCurrentUserInLockdown.isFalse(),
+                "userHasNotLockedDownDevice"
+            ),
+            Pair(keyguardRepository.isKeyguardShowing, "isKeyguardShowing")
+        )
     }
 
     private fun observeFaceAuthGatingChecks() {
-        // Face auth can run only if all of the gating conditions are true.
-        listOf(
-                canFaceAuthOrDetectRun(faceAuthLog),
-                logAndObserve(isLockedOut.isFalse(), "isNotInLockOutState", faceAuthLog),
-                logAndObserve(
-                    trustRepository.isCurrentUserTrusted.isFalse(),
-                    "currentUserIsNotTrusted",
-                    faceAuthLog
-                ),
-                logAndObserve(
-                    biometricSettingsRepository.isFaceAuthCurrentlyAllowed,
-                    "isFaceAuthCurrentlyAllowed",
-                    faceAuthLog
-                ),
-                logAndObserve(isAuthenticated.isFalse(), "faceNotAuthenticated", faceAuthLog),
-            )
-            .reduce(::and)
-            .distinctUntilChanged()
+        canRunFaceAuth
             .onEach {
                 faceAuthLogger.canFaceAuthRunChanged(it)
-                _canRunFaceAuth.value = it
                 if (!it) {
                     // Cancel currently running auth if any of the gating checks are false.
                     faceAuthLogger.cancellingFaceAuth()
@@ -416,7 +417,6 @@
                 }
             }
             .flowOn(mainDispatcher)
-            .logDiffsForTable(faceAuthLog, "", "canFaceAuthRun", false)
             .launchIn(applicationScope)
     }
 
@@ -618,22 +618,6 @@
         _isAuthRunning.value = false
     }
 
-    private fun logAndObserve(
-        cond: Flow<Boolean>,
-        conditionName: String,
-        logBuffer: TableLogBuffer
-    ): Flow<Boolean> {
-        return cond
-            .distinctUntilChanged()
-            .logDiffsForTable(
-                logBuffer,
-                columnName = conditionName,
-                columnPrefix = "",
-                initialValue = false
-            )
-            .onEach { faceAuthLogger.observedConditionChanged(it, conditionName) }
-    }
-
     companion object {
         const val TAG = "DeviceEntryFaceAuthRepository"
 
@@ -688,3 +672,18 @@
 private fun Flow<Boolean>.isFalse(): Flow<Boolean> {
     return this.map { !it }
 }
+
+private fun List<Pair<Flow<Boolean>, String>>.andAllFlows(
+    combinedLoggingInfo: String,
+    tableLogBuffer: TableLogBuffer
+): Flow<Boolean> {
+    return combine(this.map { it.first }) {
+        val combinedValue =
+            it.reduceIndexed { index, accumulator, current ->
+                tableLogBuffer.logChange(prefix = "", columnName = this[index].second, current)
+                return@reduceIndexed accumulator && current
+            }
+        tableLogBuffer.logChange(prefix = "", combinedLoggingInfo, combinedValue)
+        return@combine combinedValue
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt
index f91ae74..f5ef27d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepository.kt
@@ -24,6 +24,7 @@
 import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint.Companion.DEFAULT
 import com.android.systemui.keyguard.ui.view.layout.blueprints.KeyguardBlueprintModule
 import java.io.PrintWriter
+import java.util.TreeMap
 import javax.inject.Inject
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.flow.Flow
@@ -52,11 +53,12 @@
     blueprints: Set<@JvmSuppressWildcards KeyguardBlueprint>,
     @Application private val applicationScope: CoroutineScope,
 ) {
-    private val blueprintIdMap: Map<String, KeyguardBlueprint> = blueprints.associateBy { it.id }
+    private val blueprintIdMap: TreeMap<String, KeyguardBlueprint> = TreeMap()
     private val _blueprint: MutableSharedFlow<KeyguardBlueprint> = MutableSharedFlow(replay = 1)
     val blueprint: Flow<KeyguardBlueprint> = _blueprint.asSharedFlow()
 
     init {
+        blueprintIdMap.putAll(blueprints.associateBy { it.id })
         applyBlueprint(blueprintIdMap[DEFAULT]!!)
         applicationScope.launch {
             configurationRepository.onAnyConfigurationChange.collect { refreshBlueprint() }
@@ -69,6 +71,20 @@
      * @param blueprintId
      * @return whether the transition has succeeded.
      */
+    fun applyBlueprint(index: Int): Boolean {
+        ArrayList(blueprintIdMap.values)[index]?.let {
+            applyBlueprint(it)
+            return true
+        }
+        return false
+    }
+
+    /**
+     * Emits the blueprint value to the collectors.
+     *
+     * @param blueprintId
+     * @return whether the transition has succeeded.
+     */
     fun applyBlueprint(blueprintId: String?): Boolean {
         val blueprint = blueprintIdMap[blueprintId] ?: return false
         applyBlueprint(blueprint)
@@ -89,6 +105,6 @@
 
     /** Prints all available blueprints to the PrintWriter. */
     fun printBlueprints(pw: PrintWriter) {
-        blueprintIdMap.forEach { entry -> pw.println("${entry.key}") }
+        blueprintIdMap.onEachIndexed { index, entry -> pw.println("$index: ${entry.key}") }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
index d399e4c..2557e81 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
@@ -35,8 +35,10 @@
 import com.android.systemui.keyguard.WakefulnessLifecycle
 import com.android.systemui.keyguard.shared.model.BiometricUnlockModel
 import com.android.systemui.keyguard.shared.model.BiometricUnlockSource
+import com.android.systemui.keyguard.shared.model.DismissAction
 import com.android.systemui.keyguard.shared.model.DozeStateModel
 import com.android.systemui.keyguard.shared.model.DozeTransitionModel
+import com.android.systemui.keyguard.shared.model.KeyguardDone
 import com.android.systemui.keyguard.shared.model.KeyguardRootViewVisibilityState
 import com.android.systemui.keyguard.shared.model.ScreenModel
 import com.android.systemui.keyguard.shared.model.StatusBarState
@@ -53,9 +55,11 @@
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.channels.awaitClose
 import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.SharingStarted
 import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
 import kotlinx.coroutines.flow.asStateFlow
 import kotlinx.coroutines.flow.distinctUntilChanged
 import kotlinx.coroutines.flow.flowOn
@@ -187,6 +191,12 @@
     /** Receive an event for doze time tick */
     val dozeTimeTick: Flow<Long>
 
+    /** Observable for DismissAction */
+    val dismissAction: StateFlow<DismissAction>
+
+    /** Observable updated when keyguardDone should be called either now or soon. */
+    val keyguardDone: Flow<KeyguardDone>
+
     /**
      * Returns `true` if the keyguard is showing; `false` otherwise.
      *
@@ -239,6 +249,10 @@
     fun setIsActiveDreamLockscreenHosted(isLockscreenHosted: Boolean)
 
     fun dozeTimeTick()
+
+    fun setDismissAction(dismissAction: DismissAction)
+
+    suspend fun setKeyguardDone(keyguardDoneType: KeyguardDone)
 }
 
 /** Encapsulates application state for the keyguard. */
@@ -261,6 +275,19 @@
     @Application private val scope: CoroutineScope,
     private val systemClock: SystemClock,
 ) : KeyguardRepository {
+    private val _dismissAction: MutableStateFlow<DismissAction> =
+        MutableStateFlow(DismissAction.None)
+    override val dismissAction = _dismissAction.asStateFlow()
+    override fun setDismissAction(dismissAction: DismissAction) {
+        _dismissAction.value = dismissAction
+    }
+
+    private val _keyguardDone: MutableSharedFlow<KeyguardDone> = MutableSharedFlow()
+    override val keyguardDone = _keyguardDone.asSharedFlow()
+    override suspend fun setKeyguardDone(keyguardDoneType: KeyguardDone) {
+        _keyguardDone.emit(keyguardDoneType)
+    }
+
     private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
     override val animateBottomAreaDozingTransitions =
         _animateBottomAreaDozingTransitions.asStateFlow()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
index 867675b..00036ce 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/TrustRepository.kt
@@ -17,6 +17,7 @@
 package com.android.systemui.keyguard.data.repository
 
 import android.app.trust.TrustManager
+import com.android.keyguard.TrustGrantFlags
 import com.android.keyguard.logging.TrustRepositoryLogger
 import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
 import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
@@ -34,6 +35,7 @@
 import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.combine
 import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.filter
 import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.flow.onEach
 import kotlinx.coroutines.flow.onStart
@@ -50,6 +52,9 @@
 
     /** Reports that whether trust is managed has changed for the current user. */
     val isCurrentUserTrustManaged: StateFlow<Boolean>
+
+    /** A trust agent is requesting to dismiss the keyguard from a trust change. */
+    val trustAgentRequestingToDismissKeyguard: Flow<TrustModel>
 }
 
 @SysUISingleton
@@ -78,7 +83,7 @@
                         ) {
                             logger.onTrustChanged(enabled, newlyUnlocked, userId, flags, grantMsgs)
                             trySendWithFailureLogging(
-                                TrustModel(enabled, userId),
+                                TrustModel(enabled, userId, TrustGrantFlags(flags)),
                                 TrustRepositoryLogger.TAG,
                                 "onTrustChanged"
                             )
@@ -158,6 +163,17 @@
                     initialValue = false
                 )
 
+    override val trustAgentRequestingToDismissKeyguard: Flow<TrustModel>
+        get() =
+            combine(trust, userRepository.selectedUserInfo, ::Pair)
+                .map { latestTrustModelForUser[it.second.id] }
+                .distinctUntilChanged()
+                .filter {
+                    it != null &&
+                        (it.flags.isInitiatedByUser || it.flags.dismissKeyguardRequested())
+                }
+                .map { it!! }
+
     private fun isUserTrustManaged(userId: Int) =
         trustManagedForUser[userId]?.isTrustManaged ?: false
 
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
index 390ad7e..6ce9185 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
@@ -37,6 +37,16 @@
         return keyguardBlueprintRepository.applyBlueprint(blueprintId)
     }
 
+    /**
+     * Transitions to a blueprint.
+     *
+     * @param blueprintId
+     * @return whether the transition has succeeded.
+     */
+    fun transitionToBlueprint(blueprintId: Int): Boolean {
+        return keyguardBlueprintRepository.applyBlueprint(blueprintId)
+    }
+
     /** Re-emits the blueprint value to the collectors. */
     fun refreshBlueprint() {
         keyguardBlueprintRepository.refreshBlueprint()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
new file mode 100644
index 0000000..08d29d4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.domain.interactor
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.keyguard.shared.model.KeyguardState.ALTERNATE_BOUNCER
+import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
+import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER
+import com.android.systemui.util.kotlin.sample
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.filterNot
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
+import kotlinx.coroutines.flow.stateIn
+
+/** Encapsulates business-logic for actions to run when the keyguard is dismissed. */
+@ExperimentalCoroutinesApi
+@SysUISingleton
+class KeyguardDismissActionInteractor
+@Inject
+constructor(
+    private val repository: KeyguardRepository,
+    transitionInteractor: KeyguardTransitionInteractor,
+    val dismissInteractor: KeyguardDismissInteractor,
+    @Application private val applicationScope: CoroutineScope,
+) {
+    val dismissAction: Flow<DismissAction> = repository.dismissAction
+
+    val onCancel: Flow<Runnable> = dismissAction.map { it.onCancelAction }
+
+    // TODO (b/268240415): use message in alt + primary bouncer message
+    // message to show to the user about the dismiss action, else empty string
+    val message = dismissAction.map { it.message }
+
+    /**
+     * True if the dismiss action will run an animation on the lockscreen and requires any views
+     * that would obscure this animation (ie: the primary bouncer) to immediately hide, so the
+     * animation would be visible.
+     */
+    val willAnimateDismissActionOnLockscreen: StateFlow<Boolean> =
+        dismissAction
+            .map { it.willAnimateOnLockscreen }
+            .stateIn(
+                scope = applicationScope,
+                started = SharingStarted.WhileSubscribed(),
+                initialValue = false,
+            )
+
+    private val finishedTransitionToGone: Flow<Unit> =
+        transitionInteractor.finishedKeyguardState.filter { it == GONE }.map {} // map to Unit
+    val executeDismissAction: Flow<() -> KeyguardDone> =
+        merge(
+                finishedTransitionToGone,
+                dismissInteractor.dismissKeyguardRequestWithImmediateDismissAction
+            )
+            .sample(dismissAction)
+            .filterNot { it is DismissAction.None }
+            .map { it.onDismissAction }
+    val resetDismissAction: Flow<Unit> =
+        transitionInteractor.finishedKeyguardTransitionStep
+            .filter { it.to != ALTERNATE_BOUNCER && it.to != PRIMARY_BOUNCER && it.to != GONE }
+            .sample(dismissAction)
+            .filterNot { it is DismissAction.None }
+            .map {} // map to Unit
+
+    fun runDismissAnimationOnKeyguard(): Boolean {
+        return willAnimateDismissActionOnLockscreen.value
+    }
+
+    fun runAfterKeyguardGone(runnable: Runnable) {
+        setDismissAction(
+            DismissAction.RunAfterKeyguardGone(
+                dismissAction = { runnable.run() },
+                onCancelAction = {},
+                message = "",
+                willAnimateOnLockscreen = false,
+            )
+        )
+    }
+
+    fun setDismissAction(dismissAction: DismissAction) {
+        repository.dismissAction.value.onCancelAction.run()
+        repository.setDismissAction(dismissAction)
+    }
+
+    fun handleDismissAction() {
+        repository.setDismissAction(DismissAction.None)
+    }
+
+    suspend fun setKeyguardDone(keyguardDoneTiming: KeyguardDone) {
+        dismissInteractor.setKeyguardDone(keyguardDoneTiming)
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt
new file mode 100644
index 0000000..cab6928
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractor.kt
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.domain.interactor
+
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.data.repository.TrustRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.user.domain.interactor.UserInteractor
+import com.android.systemui.util.kotlin.Utils.Companion.toQuad
+import com.android.systemui.util.kotlin.sample
+import javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
+
+/** Encapsulates business logic for requesting the keyguard to dismiss/finish/done. */
+@SysUISingleton
+class KeyguardDismissInteractor
+@Inject
+constructor(
+    trustRepository: TrustRepository,
+    val keyguardRepository: KeyguardRepository,
+    val primaryBouncerInteractor: PrimaryBouncerInteractor,
+    val alternateBouncerInteractor: AlternateBouncerInteractor,
+    val powerInteractor: PowerInteractor,
+    val userInteractor: UserInteractor,
+) {
+    /*
+     * Updates when a biometric has authenticated the device and is requesting to dismiss
+     * the keyguard. When true, a class 3 biometrics has authenticated. Else, a lower class
+     * biometric strength has authenticated and is requesting to dismiss the keyguard.
+     */
+    private val biometricAuthenticatedRequestDismissKeyguard: Flow<Unit> =
+        primaryBouncerInteractor.keyguardAuthenticatedBiometrics.map {} // map to Unit
+
+    /*
+     * Updates when a trust change is requesting to dismiss the keyguard and is able to do so
+     * in the current device state.
+     */
+    private val onTrustGrantedRequestDismissKeyguard: Flow<Unit> =
+        trustRepository.trustAgentRequestingToDismissKeyguard
+            .sample(
+                combine(
+                    primaryBouncerInteractor.isShowing,
+                    alternateBouncerInteractor.isVisible,
+                    powerInteractor.isInteractive,
+                    ::Triple
+                ),
+                ::toQuad
+            )
+            .filter { (trustModel, primaryBouncerShowing, altBouncerShowing, interactive) ->
+                val bouncerShowing = primaryBouncerShowing || altBouncerShowing
+                (interactive || trustModel.flags.temporaryAndRenewable()) &&
+                    (bouncerShowing || trustModel.flags.dismissKeyguardRequested())
+            }
+            .map {} // map to Unit
+
+    /*
+     * Updates when the current user successfully has authenticated via primary authentication
+     * (pin/pattern/password).
+     */
+    private val primaryAuthenticated: Flow<Unit> =
+        primaryBouncerInteractor.keyguardAuthenticatedPrimaryAuth
+            .filter { authedUserId -> authedUserId == userInteractor.getSelectedUserId() }
+            .map {} // map to Unit
+
+    /*
+     * Updates when the current user requests the bouncer after they've already successfully
+     * authenticated (ie: from non-bypass face auth, from a trust agent that didn't immediately
+     * dismiss the keyguard, or if keyguard security is set to SWIPE or NONE).
+     */
+    private val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Unit> =
+        primaryBouncerInteractor.userRequestedBouncerWhenAlreadyAuthenticated
+            .filter { authedUserId -> authedUserId == userInteractor.getSelectedUserId() }
+            .map {} // map to Unit
+
+    /** Updates when keyguardDone should be requested. */
+    val keyguardDone: Flow<KeyguardDone> = keyguardRepository.keyguardDone
+
+    /** Updates when any request to dismiss the current user's keyguard has arrived. */
+    private val dismissKeyguardRequest: Flow<DismissAction> =
+        merge(
+                biometricAuthenticatedRequestDismissKeyguard,
+                onTrustGrantedRequestDismissKeyguard,
+                primaryAuthenticated,
+                userRequestedBouncerWhenAlreadyAuthenticated,
+            )
+            .sample(keyguardRepository.dismissAction)
+
+    /**
+     * Updates when a request to dismiss the current user's keyguard has arrived and there's a
+     * dismiss action to run immediately. It's expected that the consumer will request keyguardDone
+     * with or without a deferral.
+     */
+    val dismissKeyguardRequestWithImmediateDismissAction: Flow<Unit> =
+        dismissKeyguardRequest.filter { it is DismissAction.RunImmediately }.map {} // map to Unit
+
+    /**
+     * Updates when a request to dismiss the current user's keyguard has arrived and there's isn't a
+     * dismiss action to run immediately. There may still be a dismiss action to run after the
+     * keyguard transitions to GONE.
+     */
+    val dismissKeyguardRequestWithoutImmediateDismissAction: Flow<Unit> =
+        dismissKeyguardRequest.filter { it !is DismissAction.RunImmediately }.map {} // map to Unit
+
+    suspend fun setKeyguardDone(keyguardDoneTiming: KeyguardDone) {
+        keyguardRepository.setKeyguardDone(keyguardDoneTiming)
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
index 3ec660a..f6ad829 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractor.kt
@@ -22,8 +22,6 @@
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
 import com.android.systemui.keyguard.data.repository.DeviceEntryFingerprintAuthRepository
 import com.android.systemui.keyguard.shared.model.ErrorFingerprintAuthenticationStatus
 import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus
@@ -60,7 +58,6 @@
     private val context: Context,
     activityStarter: ActivityStarter,
     powerInteractor: PowerInteractor,
-    featureFlags: FeatureFlags,
 ) {
     private val keyguardOccludedByApp: Flow<Boolean> =
         combine(
@@ -93,37 +90,35 @@
             .ifKeyguardOccludedByApp(/* elseFlow */ flowOf(null))
 
     init {
-        if (featureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
-            scope.launch {
-                // On fingerprint success when the screen is on, go to the home screen
-                fingerprintUnlockSuccessEvents.sample(powerInteractor.isInteractive).collect {
-                    if (it) {
-                        goToHomeScreen()
-                    }
-                    // don't go to the home screen if the authentication is from AOD/dozing/off
+        scope.launch {
+            // On fingerprint success when the screen is on, go to the home screen
+            fingerprintUnlockSuccessEvents.sample(powerInteractor.isInteractive).collect {
+                if (it) {
+                    goToHomeScreen()
                 }
+                // don't go to the home screen if the authentication is from AOD/dozing/off
             }
+        }
 
-            scope.launch {
-                // On device fingerprint lockout, request the bouncer with a runnable to
-                // go to the home screen. Without this, the bouncer won't proceed to the home
-                // screen.
-                fingerprintLockoutEvents.collect {
-                    activityStarter.dismissKeyguardThenExecute(
-                        object : ActivityStarter.OnDismissAction {
-                            override fun onDismiss(): Boolean {
-                                goToHomeScreen()
-                                return false
-                            }
+        scope.launch {
+            // On device fingerprint lockout, request the bouncer with a runnable to
+            // go to the home screen. Without this, the bouncer won't proceed to the home
+            // screen.
+            fingerprintLockoutEvents.collect {
+                activityStarter.dismissKeyguardThenExecute(
+                    object : ActivityStarter.OnDismissAction {
+                        override fun onDismiss(): Boolean {
+                            goToHomeScreen()
+                            return false
+                        }
 
-                            override fun willRunAnimationOnKeyguard(): Boolean {
-                                return false
-                            }
-                        },
-                        /* cancel= */ null,
-                        /* afterKeyguardGone */ false
-                    )
-                }
+                        override fun willRunAnimationOnKeyguard(): Boolean {
+                            return false
+                        }
+                    },
+                    /* cancel= */ null,
+                    /* afterKeyguardGone */ false
+                )
             }
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt
new file mode 100644
index 0000000..c8d5599
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/DismissAction.kt
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.shared.model
+
+/** DismissAction models */
+sealed interface DismissAction {
+    val onDismissAction: () -> KeyguardDone
+    val onCancelAction: Runnable
+    val message: String
+    /**
+     * True if the dismiss action will run an animation on the keyguard and requires any views that
+     * would obscure this animation (ie: the primary bouncer) to immediately hide, so the animation
+     * would be visible.
+     */
+    val willAnimateOnLockscreen: Boolean
+    val runAfterKeyguardGone: Boolean
+
+    class RunImmediately(
+        override val onDismissAction: () -> KeyguardDone,
+        override val onCancelAction: Runnable,
+        override val message: String,
+        override val willAnimateOnLockscreen: Boolean,
+    ) : DismissAction {
+        override val runAfterKeyguardGone: Boolean = false
+    }
+
+    class RunAfterKeyguardGone(
+        val dismissAction: () -> Unit,
+        override val onCancelAction: Runnable,
+        override val message: String,
+        override val willAnimateOnLockscreen: Boolean,
+    ) : DismissAction {
+        override val onDismissAction: () -> KeyguardDone = {
+            dismissAction()
+            // no-op, when this dismissAction is run after the keyguard is gone,
+            // the keyguard is already done so KeyguardDone timing is irrelevant
+            KeyguardDone.IMMEDIATE
+        }
+        override val runAfterKeyguardGone: Boolean = true
+    }
+
+    data object None : DismissAction {
+        override val onDismissAction: () -> KeyguardDone = { KeyguardDone.IMMEDIATE }
+        override val onCancelAction: Runnable = Runnable {}
+        override val message: String = ""
+        override val willAnimateOnLockscreen: Boolean = false
+        override val runAfterKeyguardGone: Boolean = false
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt
similarity index 60%
copy from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
copy to packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt
index df5cefd..5e8cf57 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardDone.kt
@@ -12,18 +12,16 @@
  * WITHOUT 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.biometrics.shared.model
+package com.android.systemui.keyguard.shared.model
 
-import android.hardware.fingerprint.FingerprintSensorProperties
-
-/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
-enum class FingerprintSensorType {
-    UNKNOWN,
-    REAR,
-    UDFPS_ULTRASONIC,
-    UDFPS_OPTICAL,
-    POWER_BUTTON,
-    HOME_BUTTON,
+/**
+ * When to send the keyguard done signal. Should it immediately be sent when the keyguard is
+ * requested to be dismissed? Or should it be sent later?
+ */
+enum class KeyguardDone {
+    IMMEDIATE, // keyguard is immediately done, immediately start transitioning away keyguard
+    LATER, // keyguard is dismissible pending the next keyguardDone call
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
index cdfab1a..206b792 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/TrustModel.kt
@@ -16,6 +16,8 @@
 
 package com.android.systemui.keyguard.shared.model
 
+import com.android.keyguard.TrustGrantFlags
+
 sealed class TrustMessage
 
 /** Represents the trust state */
@@ -24,6 +26,7 @@
     val isTrusted: Boolean,
     /** The user, for which the trust changed. */
     val userId: Int,
+    val flags: TrustGrantFlags,
 ) : TrustMessage()
 
 /** Represents where trust agents are enabled for a particular user. */
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
index 62f43ed..2a5beaf 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/WakefulnessModel.kt
@@ -36,7 +36,7 @@
 
     private fun isAsleep() = state == ASLEEP
 
-    private fun isAwake() = state == AWAKE
+    fun isAwake() = state == AWAKE
 
     fun isStartingToWakeOrAwake() = isStartingToWake() || isAwake()
 
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
index a8070c2..3dd3e07 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
@@ -18,11 +18,13 @@
 package com.android.systemui.keyguard.ui.binder
 
 import android.os.Trace
+import android.transition.TransitionManager
 import android.util.Log
 import androidx.constraintlayout.widget.ConstraintLayout
 import androidx.constraintlayout.widget.ConstraintSet
 import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.repeatOnLifecycle
+import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.BaseBlueprintTransition
 import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel
 import com.android.systemui.lifecycle.repeatWhenAttached
 import kotlinx.coroutines.launch
@@ -40,17 +42,29 @@
                             Trace.beginSection("KeyguardBlueprint#applyBlueprint")
                             Log.d(TAG, "applying blueprint: $blueprint")
 
-                            ConstraintSet().apply {
-                                clone(constraintLayout)
-                                val emptyLayout = ConstraintSet.Layout()
-                                knownIds.forEach { getConstraint(it).layout.copyFrom(emptyLayout) }
-                                blueprint.applyConstraints(this)
-                                // Add and remove views of sections that are not contained by the
-                                // other.
-                                blueprint?.replaceViews(prevBluePrint, constraintLayout)
-                                applyTo(constraintLayout)
+                            val cs =
+                                ConstraintSet().apply {
+                                    clone(constraintLayout)
+                                    val emptyLayout = ConstraintSet.Layout()
+                                    knownIds.forEach {
+                                        getConstraint(it).layout.copyFrom(emptyLayout)
+                                    }
+                                    blueprint.applyConstraints(this)
+                                }
+
+                            // Apply transition.
+                            if (prevBluePrint != null && prevBluePrint != blueprint) {
+                                TransitionManager.beginDelayedTransition(
+                                    constraintLayout,
+                                    BaseBlueprintTransition()
+                                )
                             }
 
+                            // Add and remove views of sections that are not contained by the
+                            // other.
+                            blueprint.replaceViews(prevBluePrint, constraintLayout)
+                            cs.applyTo(constraintLayout)
+
                             viewModel.currentBluePrint = blueprint
                             Trace.endSection()
                         }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
index 44acf4f..a9c71ad 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt
@@ -79,12 +79,6 @@
     //If updated, be sure to update [KeyguardQuickAffordanceViewBinder.kt]
     @Deprecated("Deprecated as part of b/278057014")
     interface Binding {
-        /**
-         * Returns a collection of [ViewPropertyAnimator] instances that can be used to animate the
-         * indication areas.
-         */
-        fun getIndicationAreaAnimators(): List<ViewPropertyAnimator>
-
         /** Notifies that device configuration has changed. */
         fun onConfigurationChanged()
 
@@ -281,10 +275,6 @@
             }
 
         return object : Binding {
-            override fun getIndicationAreaAnimators(): List<ViewPropertyAnimator> {
-                return listOf(ambientIndicationArea).mapNotNull { it?.animate() }
-            }
-
             override fun onConfigurationChanged() {
                 configurationBasedDimensions.value = loadFromResources(view)
             }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt
new file mode 100644
index 0000000..d5add61
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissActionBinder.kt
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.ui.binder
+
+import com.android.keyguard.logging.KeyguardLogger
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.util.kotlin.sample
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.launch
+
+/** Runs actions on keyguard dismissal. */
+@OptIn(ExperimentalCoroutinesApi::class)
+@SysUISingleton
+class KeyguardDismissActionBinder
+@Inject
+constructor(
+    private val interactor: KeyguardDismissActionInteractor,
+    @Application private val scope: CoroutineScope,
+    private val keyguardLogger: KeyguardLogger,
+    private val featureFlags: FeatureFlagsClassic,
+) : CoreStartable {
+
+    override fun start() {
+        if (!featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            return
+        }
+
+        scope.launch {
+            interactor.executeDismissAction.collect {
+                log("executeDismissAction")
+                interactor.setKeyguardDone(it())
+                interactor.handleDismissAction()
+            }
+        }
+
+        scope.launch {
+            interactor.resetDismissAction.sample(interactor.onCancel).collect {
+                log("resetDismissAction")
+                it.run()
+                interactor.handleDismissAction()
+            }
+        }
+
+        scope.launch { interactor.dismissAction.collect { log("updatedDismissAction=$it") } }
+    }
+
+    private fun log(message: String) {
+        keyguardLogger.log(TAG, LogLevel.DEBUG, message)
+    }
+
+    companion object {
+        private const val TAG = "KeyguardDismissAction"
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt
new file mode 100644
index 0000000..f14552b
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardDismissBinder.kt
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.ui.binder
+
+import com.android.keyguard.ViewMediatorCallback
+import com.android.keyguard.logging.KeyguardLogger
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.user.domain.interactor.UserInteractor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.launch
+
+/** Handles keyguard dismissal requests. */
+@OptIn(ExperimentalCoroutinesApi::class)
+@SysUISingleton
+class KeyguardDismissBinder
+@Inject
+constructor(
+    private val interactor: KeyguardDismissInteractor,
+    private val userInteractor: UserInteractor,
+    private val viewMediatorCallback: ViewMediatorCallback,
+    @Application private val scope: CoroutineScope,
+    private val keyguardLogger: KeyguardLogger,
+    private val featureFlags: FeatureFlagsClassic,
+) : CoreStartable {
+
+    override fun start() {
+        if (!featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            return
+        }
+
+        scope.launch {
+            interactor.keyguardDone.collect { keyguardDoneTiming ->
+                when (keyguardDoneTiming) {
+                    KeyguardDone.LATER -> {
+                        log("keyguardDonePending")
+                        viewMediatorCallback.keyguardDonePending(userInteractor.getSelectedUserId())
+                    }
+                    else -> {
+                        log("keyguardDone")
+                        viewMediatorCallback.keyguardDone(userInteractor.getSelectedUserId())
+                    }
+                }
+            }
+        }
+
+        scope.launch {
+            interactor.dismissKeyguardRequestWithoutImmediateDismissAction.collect {
+                log("dismissKeyguardRequestWithoutImmediateDismissAction-keyguardDone")
+                interactor.setKeyguardDone(KeyguardDone.IMMEDIATE)
+            }
+        }
+    }
+
+    private fun log(message: String) {
+        keyguardLogger.log(TAG, LogLevel.DEBUG, message)
+    }
+
+    companion object {
+        private const val TAG = "KeyguardDismiss"
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
index 9503f2c..4b76821 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
@@ -59,20 +59,18 @@
         val disposableHandle =
             view.repeatWhenAttached {
                 repeatOnLifecycle(Lifecycle.State.CREATED) {
-                    if (featureFlags.isEnabled(Flags.FP_LISTEN_OCCLUDING_APPS)) {
-                        launch {
-                            occludingAppDeviceEntryMessageViewModel.message.collect {
-                                biometricMessage ->
-                                if (biometricMessage?.message != null) {
-                                    chipbarCoordinator.displayView(
-                                        createChipbarInfo(
-                                            biometricMessage.message,
-                                            R.drawable.ic_lock,
-                                        )
+                    launch {
+                        occludingAppDeviceEntryMessageViewModel.message.collect { biometricMessage
+                            ->
+                            if (biometricMessage?.message != null) {
+                                chipbarCoordinator.displayView(
+                                    createChipbarInfo(
+                                        biometricMessage.message,
+                                        R.drawable.ic_lock,
                                     )
-                                } else {
-                                    chipbarCoordinator.removeView(ID, "occludingAppMsgNull")
-                                }
+                                )
+                            } else {
+                                chipbarCoordinator.removeView(ID, "occludingAppMsgNull")
                             }
                         }
                     }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
index 8945318..85a2fd5 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
@@ -264,14 +264,8 @@
             KeyguardPreviewSmartspaceViewModel.getLargeClockSmartspaceTopPadding(
                 context.resources,
             )
-
         val startPadding: Int =
-            with(context.resources) {
-                getDimensionPixelSize(
-                    com.android.systemui.customization.R.dimen.clock_padding_start
-                ) + getDimensionPixelSize(R.dimen.below_clock_padding_start)
-            }
-
+            context.resources.getDimensionPixelSize(R.dimen.below_clock_padding_start)
         val endPadding: Int =
             context.resources.getDimensionPixelSize(R.dimen.below_clock_padding_end)
 
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListener.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListener.kt
index 36d21f1..ce7ec0e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListener.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListener.kt
@@ -16,6 +16,7 @@
 
 package com.android.systemui.keyguard.ui.view.layout
 
+import androidx.core.text.isDigitsOnly
 import com.android.systemui.keyguard.data.repository.KeyguardBlueprintRepository
 import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor
 import com.android.systemui.statusbar.commandline.Command
@@ -45,7 +46,11 @@
                 return
             }
 
-            if (keyguardBlueprintInteractor.transitionToBlueprint(arg)) {
+            if (
+                arg.isDigitsOnly() && keyguardBlueprintInteractor.transitionToBlueprint(arg.toInt())
+            ) {
+                pw.println("Transition succeeded!")
+            } else if (keyguardBlueprintInteractor.transitionToBlueprint(arg)) {
                 pw.println("Transition succeeded!")
             } else {
                 pw.println("Invalid argument! To see available blueprint ids, run:")
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt
index 79a97fb..6534dcf 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt
@@ -61,6 +61,6 @@
         )
 
     companion object {
-        const val SHORTCUTS_BESIDE_UDFPS = "shortcutsBesideUdfps"
+        const val SHORTCUTS_BESIDE_UDFPS = "shortcuts-besides-udfps"
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt
new file mode 100644
index 0000000..42b1c10
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/transitions/BaseBlueprintTransition.kt
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.ui.view.layout.blueprints.transitions
+
+import android.animation.Animator
+import android.animation.ObjectAnimator
+import android.transition.ChangeBounds
+import android.transition.TransitionSet
+import android.transition.TransitionValues
+import android.transition.Visibility
+import android.view.View
+import android.view.ViewGroup
+
+class BaseBlueprintTransition : TransitionSet() {
+    init {
+        ordering = ORDERING_SEQUENTIAL
+        addTransition(AlphaOutVisibility())
+            .addTransition(ChangeBounds())
+            .addTransition(AlphaInVisibility())
+    }
+    class AlphaOutVisibility : Visibility() {
+        override fun onDisappear(
+            sceneRoot: ViewGroup?,
+            view: View,
+            startValues: TransitionValues?,
+            endValues: TransitionValues?
+        ): Animator {
+            return ObjectAnimator.ofFloat(view, "alpha", 0f).apply {
+                addUpdateListener { view.alpha = it.animatedValue as Float }
+                start()
+            }
+        }
+    }
+
+    class AlphaInVisibility : Visibility() {
+        override fun onAppear(
+            sceneRoot: ViewGroup?,
+            view: View,
+            startValues: TransitionValues?,
+            endValues: TransitionValues?
+        ): Animator {
+            return ObjectAnimator.ofFloat(view, "alpha", 1f).apply {
+                addUpdateListener { view.alpha = it.animatedValue as Float }
+                start()
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt
index 79b7157..5aba229 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt
@@ -18,8 +18,6 @@
 package com.android.systemui.keyguard.ui.view.layout.sections
 
 import android.content.res.Resources
-import android.view.View
-import android.widget.ImageView
 import androidx.constraintlayout.widget.ConstraintLayout
 import androidx.constraintlayout.widget.ConstraintSet
 import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
@@ -27,13 +25,10 @@
 import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
 import androidx.constraintlayout.widget.ConstraintSet.RIGHT
 import androidx.constraintlayout.widget.ConstraintSet.TOP
-import androidx.core.content.res.ResourcesCompat
 import com.android.systemui.R
-import com.android.systemui.animation.view.LaunchableImageView
 import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.flags.FeatureFlags
 import com.android.systemui.flags.Flags
-import com.android.systemui.keyguard.shared.model.KeyguardSection
 import com.android.systemui.keyguard.ui.binder.KeyguardQuickAffordanceViewBinder
 import com.android.systemui.keyguard.ui.viewmodel.KeyguardQuickAffordancesCombinedViewModel
 import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
@@ -53,10 +48,7 @@
     private val falsingManager: FalsingManager,
     private val indicationController: KeyguardIndicationController,
     private val vibratorHelper: VibratorHelper,
-) : KeyguardSection() {
-    private var leftShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
-    private var rightShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
-
+) : BaseShortcutSection() {
     override fun addViews(constraintLayout: ConstraintLayout) {
         if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
             addLeftShortcut(constraintLayout)
@@ -109,67 +101,4 @@
             connect(R.id.end_button, BOTTOM, R.id.lock_icon_view, BOTTOM)
         }
     }
-
-    override fun removeViews(constraintLayout: ConstraintLayout) {
-        leftShortcutHandle?.destroy()
-        rightShortcutHandle?.destroy()
-        constraintLayout.removeView(R.id.start_button)
-        constraintLayout.removeView(R.id.end_button)
-    }
-
-    private fun addLeftShortcut(constraintLayout: ConstraintLayout) {
-        val padding =
-            constraintLayout.resources.getDimensionPixelSize(
-                R.dimen.keyguard_affordance_fixed_padding
-            )
-        val view =
-            LaunchableImageView(constraintLayout.context, null).apply {
-                id = R.id.start_button
-                scaleType = ImageView.ScaleType.FIT_CENTER
-                background =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_bg,
-                        context.theme
-                    )
-                foreground =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_selected_border,
-                        context.theme
-                    )
-                visibility = View.INVISIBLE
-                setPadding(padding, padding, padding, padding)
-            }
-        constraintLayout.addView(view)
-    }
-
-    private fun addRightShortcut(constraintLayout: ConstraintLayout) {
-        if (constraintLayout.findViewById<View>(R.id.end_button) != null) return
-
-        val padding =
-            constraintLayout.resources.getDimensionPixelSize(
-                R.dimen.keyguard_affordance_fixed_padding
-            )
-        val view =
-            LaunchableImageView(constraintLayout.context, null).apply {
-                id = R.id.end_button
-                scaleType = ImageView.ScaleType.FIT_CENTER
-                background =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_bg,
-                        context.theme
-                    )
-                foreground =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_selected_border,
-                        context.theme
-                    )
-                visibility = View.INVISIBLE
-                setPadding(padding, padding, padding, padding)
-            }
-        constraintLayout.addView(view)
-    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/BaseShortcutSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/BaseShortcutSection.kt
new file mode 100644
index 0000000..d046a19
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/BaseShortcutSection.kt
@@ -0,0 +1,99 @@
+package com.android.systemui.keyguard.ui.view.layout.sections
+
+import android.view.View
+import android.widget.ImageView
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.core.content.res.ResourcesCompat
+import com.android.systemui.R
+import com.android.systemui.animation.view.LaunchableImageView
+import com.android.systemui.keyguard.shared.model.KeyguardSection
+import com.android.systemui.keyguard.ui.binder.KeyguardQuickAffordanceViewBinder
+
+abstract class BaseShortcutSection : KeyguardSection() {
+    protected var leftShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
+    protected var rightShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
+
+    override fun removeViews(constraintLayout: ConstraintLayout) {
+        leftShortcutHandle?.destroy()
+        rightShortcutHandle?.destroy()
+        constraintLayout.removeView(R.id.start_button)
+        constraintLayout.removeView(R.id.end_button)
+    }
+
+    protected fun addLeftShortcut(constraintLayout: ConstraintLayout) {
+        val padding =
+            constraintLayout.resources.getDimensionPixelSize(
+                R.dimen.keyguard_affordance_fixed_padding
+            )
+        val view =
+            LaunchableImageView(constraintLayout.context, null).apply {
+                id = R.id.start_button
+                scaleType = ImageView.ScaleType.FIT_CENTER
+                background =
+                    ResourcesCompat.getDrawable(
+                        context.resources,
+                        R.drawable.keyguard_bottom_affordance_bg,
+                        context.theme
+                    )
+                foreground =
+                    ResourcesCompat.getDrawable(
+                        context.resources,
+                        R.drawable.keyguard_bottom_affordance_selected_border,
+                        context.theme
+                    )
+                visibility = View.INVISIBLE
+                setPadding(padding, padding, padding, padding)
+            }
+        constraintLayout.addView(view)
+    }
+
+    protected fun addRightShortcut(constraintLayout: ConstraintLayout) {
+        if (constraintLayout.findViewById<View>(R.id.end_button) != null) return
+
+        val padding =
+            constraintLayout.resources.getDimensionPixelSize(
+                R.dimen.keyguard_affordance_fixed_padding
+            )
+        val view =
+            LaunchableImageView(constraintLayout.context, null).apply {
+                id = R.id.end_button
+                scaleType = ImageView.ScaleType.FIT_CENTER
+                background =
+                    ResourcesCompat.getDrawable(
+                        context.resources,
+                        R.drawable.keyguard_bottom_affordance_bg,
+                        context.theme
+                    )
+                foreground =
+                    ResourcesCompat.getDrawable(
+                        context.resources,
+                        R.drawable.keyguard_bottom_affordance_selected_border,
+                        context.theme
+                    )
+                visibility = View.INVISIBLE
+                setPadding(padding, padding, padding, padding)
+            }
+        constraintLayout.addView(view)
+    }
+    /**
+     * Defines equality as same class.
+     *
+     * This is to enable set operations to be done as an optimization to blueprint transitions.
+     */
+    override fun equals(other: Any?): Boolean {
+        return other is BaseShortcutSection
+    }
+
+    /**
+     * Defines hashcode as class.
+     *
+     * This is to enable set operations to be done as an optimization to blueprint transitions.
+     */
+    override fun hashCode(): Int {
+        return KEY.hashCode()
+    }
+
+    companion object {
+        private const val KEY = "shortcuts"
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
index 9c6e953..100099d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultLockIconSection.kt
@@ -73,7 +73,13 @@
         val mBottomPaddingPx =
             context.resources.getDimensionPixelSize(R.dimen.lock_icon_margin_bottom)
         val bounds = windowManager.currentWindowMetrics.bounds
-        val widthPixels = bounds.right.toFloat()
+        val insets = windowManager.currentWindowMetrics.windowInsets
+        var widthPixels = bounds.right.toFloat()
+        if (featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)) {
+            // Assumed to be initially neglected as there are no left or right insets in portrait.
+            // However, on landscape, these insets need to included when calculating the midpoint.
+            widthPixels -= (insets.systemWindowInsetLeft + insets.systemWindowInsetRight).toFloat()
+        }
         val heightPixels = bounds.bottom.toFloat()
         val defaultDensity =
             DisplayMetrics.DENSITY_DEVICE_STABLE.toFloat() /
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultShortcutsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultShortcutsSection.kt
index a2db1df..13ef985 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultShortcutsSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultShortcutsSection.kt
@@ -18,21 +18,16 @@
 package com.android.systemui.keyguard.ui.view.layout.sections
 
 import android.content.res.Resources
-import android.view.View
-import android.widget.ImageView
 import androidx.constraintlayout.widget.ConstraintLayout
 import androidx.constraintlayout.widget.ConstraintSet
 import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
 import androidx.constraintlayout.widget.ConstraintSet.LEFT
 import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
 import androidx.constraintlayout.widget.ConstraintSet.RIGHT
-import androidx.core.content.res.ResourcesCompat
 import com.android.systemui.R
-import com.android.systemui.animation.view.LaunchableImageView
 import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.flags.FeatureFlags
 import com.android.systemui.flags.Flags
-import com.android.systemui.keyguard.shared.model.KeyguardSection
 import com.android.systemui.keyguard.ui.binder.KeyguardQuickAffordanceViewBinder
 import com.android.systemui.keyguard.ui.viewmodel.KeyguardQuickAffordancesCombinedViewModel
 import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
@@ -52,10 +47,7 @@
     private val falsingManager: FalsingManager,
     private val indicationController: KeyguardIndicationController,
     private val vibratorHelper: VibratorHelper,
-) : KeyguardSection() {
-    private var leftShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
-    private var rightShortcutHandle: KeyguardQuickAffordanceViewBinder.Binding? = null
-
+) : BaseShortcutSection() {
     override fun addViews(constraintLayout: ConstraintLayout) {
         if (featureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
             addLeftShortcut(constraintLayout)
@@ -108,67 +100,4 @@
             connect(R.id.end_button, BOTTOM, PARENT_ID, BOTTOM, verticalOffsetMargin)
         }
     }
-
-    override fun removeViews(constraintLayout: ConstraintLayout) {
-        leftShortcutHandle?.destroy()
-        rightShortcutHandle?.destroy()
-        constraintLayout.removeView(R.id.start_button)
-        constraintLayout.removeView(R.id.end_button)
-    }
-
-    private fun addLeftShortcut(constraintLayout: ConstraintLayout) {
-        val padding =
-            constraintLayout.resources.getDimensionPixelSize(
-                R.dimen.keyguard_affordance_fixed_padding
-            )
-        val view =
-            LaunchableImageView(constraintLayout.context, null).apply {
-                id = R.id.start_button
-                scaleType = ImageView.ScaleType.FIT_CENTER
-                background =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_bg,
-                        context.theme
-                    )
-                foreground =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_selected_border,
-                        context.theme
-                    )
-                visibility = View.INVISIBLE
-                setPadding(padding, padding, padding, padding)
-            }
-        constraintLayout.addView(view)
-    }
-
-    private fun addRightShortcut(constraintLayout: ConstraintLayout) {
-        if (constraintLayout.findViewById<View>(R.id.end_button) != null) return
-
-        val padding =
-            constraintLayout.resources.getDimensionPixelSize(
-                R.dimen.keyguard_affordance_fixed_padding
-            )
-        val view =
-            LaunchableImageView(constraintLayout.context, null).apply {
-                id = R.id.end_button
-                scaleType = ImageView.ScaleType.FIT_CENTER
-                background =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_bg,
-                        context.theme
-                    )
-                foreground =
-                    ResourcesCompat.getDrawable(
-                        context.resources,
-                        R.drawable.keyguard_bottom_affordance_selected_border,
-                        context.theme
-                    )
-                visibility = View.INVISIBLE
-                setPadding(padding, padding, padding, padding)
-            }
-        constraintLayout.addView(view)
-    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
index b1dd373..c7b0cb9 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt
@@ -39,7 +39,7 @@
 import com.android.systemui.media.controls.ui.KeyguardMediaController
 import com.android.systemui.shade.NotificationPanelView
 import com.android.systemui.shade.NotificationPanelViewController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.Utils
 import dagger.Lazy
 import javax.inject.Inject
@@ -55,6 +55,7 @@
     private val keyguardViewConfigurator: Lazy<KeyguardViewConfigurator>,
     private val notificationPanelViewController: Lazy<NotificationPanelViewController>,
     private val keyguardMediaController: KeyguardMediaController,
+    private val splitShadeStateController: SplitShadeStateController
 ) : KeyguardSection() {
     private val statusViewId = R.id.keyguard_status_view
 
@@ -104,7 +105,7 @@
             connect(statusViewId, END, PARENT_ID, END)
 
             val margin =
-                if (LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)) {
+                if (splitShadeStateController.shouldUseSplitNotificationShade(context.resources)) {
                     context.resources.getDimensionPixelSize(R.dimen.keyguard_split_shade_top_margin)
                 } else {
                     context.resources.getDimensionPixelSize(R.dimen.keyguard_clock_top_margin) +
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
index cca96b7..0783181 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
@@ -19,27 +19,36 @@
 import com.android.app.animation.Interpolators.EMPHASIZED_ACCELERATE
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.flags.FeatureFlagsClassic
+import com.android.systemui.flags.Flags
 import com.android.systemui.keyguard.domain.interactor.FromPrimaryBouncerTransitionInteractor.Companion.TO_GONE_DURATION
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
 import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
 import com.android.systemui.keyguard.shared.model.ScrimAlpha
 import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
 import com.android.systemui.statusbar.SysuiStatusBarStateController
+import dagger.Lazy
 import javax.inject.Inject
 import kotlin.time.Duration.Companion.milliseconds
+import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flatMapLatest
 import kotlinx.coroutines.flow.map
 
 /**
  * Breaks down PRIMARY_BOUNCER->GONE transition into discrete steps for corresponding views to
  * consume.
  */
+@OptIn(ExperimentalCoroutinesApi::class)
 @SysUISingleton
 class PrimaryBouncerToGoneTransitionViewModel
 @Inject
 constructor(
-    private val interactor: KeyguardTransitionInteractor,
+    interactor: KeyguardTransitionInteractor,
     private val statusBarStateController: SysuiStatusBarStateController,
     private val primaryBouncerInteractor: PrimaryBouncerInteractor,
+    keyguardDismissActionInteractor: Lazy<KeyguardDismissActionInteractor>,
+    featureFlags: FeatureFlagsClassic,
 ) {
     private val transitionAnimation =
         KeyguardTransitionAnimationFlow(
@@ -52,11 +61,18 @@
 
     /** Bouncer container alpha */
     val bouncerAlpha: Flow<Float> =
-        transitionAnimation.createFlow(
+        if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            keyguardDismissActionInteractor
+                .get()
+                .willAnimateDismissActionOnLockscreen
+                .flatMapLatest { createBouncerAlphaFlow { it } }
+        } else {
+            createBouncerAlphaFlow(primaryBouncerInteractor::willRunDismissFromKeyguard)
+        }
+    private fun createBouncerAlphaFlow(willRunAnimationOnKeyguard: () -> Boolean): Flow<Float> {
+        return transitionAnimation.createFlow(
             duration = 200.milliseconds,
-            onStart = {
-                willRunDismissFromKeyguard = primaryBouncerInteractor.willRunDismissFromKeyguard()
-            },
+            onStart = { willRunDismissFromKeyguard = willRunAnimationOnKeyguard() },
             onStep = {
                 if (willRunDismissFromKeyguard) {
                     0f
@@ -65,14 +81,24 @@
                 }
             },
         )
+    }
 
     /** Lockscreen alpha */
     val lockscreenAlpha: Flow<Float> =
-        transitionAnimation.createFlow(
+        if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            keyguardDismissActionInteractor
+                .get()
+                .willAnimateDismissActionOnLockscreen
+                .flatMapLatest { createLockscreenAlpha { it } }
+        } else {
+            createLockscreenAlpha(primaryBouncerInteractor::willRunDismissFromKeyguard)
+        }
+    private fun createLockscreenAlpha(willRunAnimationOnKeyguard: () -> Boolean): Flow<Float> {
+        return transitionAnimation.createFlow(
             duration = 50.milliseconds,
             onStart = {
                 leaveShadeOpen = statusBarStateController.leaveOpenOnKeyguardHide()
-                willRunDismissFromKeyguard = primaryBouncerInteractor.willRunDismissFromKeyguard()
+                willRunDismissFromKeyguard = willRunAnimationOnKeyguard()
             },
             onStep = {
                 if (willRunDismissFromKeyguard || leaveShadeOpen) {
@@ -82,17 +108,26 @@
                 }
             },
         )
+    }
 
     /** Scrim alpha values */
     val scrimAlpha: Flow<ScrimAlpha> =
-        transitionAnimation
+        if (featureFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            keyguardDismissActionInteractor
+                .get()
+                .willAnimateDismissActionOnLockscreen
+                .flatMapLatest { createScrimAlphaFlow { it } }
+        } else {
+            createScrimAlphaFlow(primaryBouncerInteractor::willRunDismissFromKeyguard)
+        }
+    private fun createScrimAlphaFlow(willRunAnimationOnKeyguard: () -> Boolean): Flow<ScrimAlpha> {
+        return transitionAnimation
             .createFlow(
                 duration = TO_GONE_DURATION,
                 interpolator = EMPHASIZED_ACCELERATE,
                 onStart = {
                     leaveShadeOpen = statusBarStateController.leaveOpenOnKeyguardHide()
-                    willRunDismissFromKeyguard =
-                        primaryBouncerInteractor.willRunDismissFromKeyguard()
+                    willRunDismissFromKeyguard = willRunAnimationOnKeyguard()
                 },
                 onStep = { 1f - it },
             )
@@ -108,4 +143,5 @@
                     ScrimAlpha(behindAlpha = it)
                 }
             }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
index 053c9b5..60fd104 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt
@@ -29,7 +29,10 @@
 import android.os.IBinder
 import android.os.ResultReceiver
 import android.os.UserHandle
+import android.util.Log
+import android.view.View
 import android.view.ViewGroup
+import android.view.accessibility.AccessibilityEvent
 import androidx.lifecycle.Lifecycle
 import androidx.lifecycle.LifecycleOwner
 import androidx.lifecycle.LifecycleRegistry
@@ -40,6 +43,9 @@
 import com.android.internal.app.ResolverListController
 import com.android.internal.app.chooser.NotSelectableTargetInfo
 import com.android.internal.app.chooser.TargetInfo
+import com.android.internal.widget.RecyclerView
+import com.android.internal.widget.RecyclerViewAccessibilityDelegate
+import com.android.internal.widget.ResolverDrawerLayout
 import com.android.systemui.R
 import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorComponent
 import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorController
@@ -105,6 +111,10 @@
 
         super.onCreate(bundle)
         controller.init()
+        // we override AppList's AccessibilityDelegate set in ResolverActivity.onCreate because in
+        // our case this delegate must extend RecyclerViewAccessibilityDelegate, otherwise
+        // RecyclerView scrolling is broken
+        setAppListAccessibilityDelegate()
     }
 
     override fun onStart() {
@@ -277,6 +287,8 @@
         recentsViewController.createView(parent)
 
     companion object {
+        const val TAG = "MediaProjectionAppSelectorActivity"
+
         /**
          * When EXTRA_CAPTURE_REGION_RESULT_RECEIVER is passed as intent extra the activity will
          * send the [CaptureRegion] to the result receiver instead of returning media projection
@@ -313,4 +325,42 @@
             putExtra(EXTRA_SELECTED_PROFILE, selectedProfile)
         }
     }
+
+    private fun setAppListAccessibilityDelegate() {
+        val rdl = requireViewById<ResolverDrawerLayout>(com.android.internal.R.id.contentPanel)
+        for (i in 0 until mMultiProfilePagerAdapter.count) {
+            val list =
+                mMultiProfilePagerAdapter
+                    .getItem(i)
+                    .rootView
+                    .findViewById<View>(com.android.internal.R.id.resolver_list)
+            if (list == null || list !is RecyclerView) {
+                Log.wtf(TAG, "MediaProjection only supports RecyclerView")
+            } else {
+                list.accessibilityDelegate = RecyclerViewExpandingAccessibilityDelegate(rdl, list)
+            }
+        }
+    }
+
+    /**
+     * An a11y delegate propagating all a11y events to [AppListAccessibilityDelegate] so that it can
+     * expand drawer when needed. It needs to extend [RecyclerViewAccessibilityDelegate] because
+     * that superclass handles RecyclerView scrolling while using a11y services.
+     */
+    private class RecyclerViewExpandingAccessibilityDelegate(
+        rdl: ResolverDrawerLayout,
+        view: RecyclerView
+    ) : RecyclerViewAccessibilityDelegate(view) {
+
+        private val delegate = AppListAccessibilityDelegate(rdl)
+
+        override fun onRequestSendAccessibilityEvent(
+            host: ViewGroup,
+            child: View,
+            event: AccessibilityEvent
+        ): Boolean {
+            super.onRequestSendAccessibilityEvent(host, child, event)
+            return delegate.onRequestSendAccessibilityEvent(host, child, event)
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
index 4be572f..d403788 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java
@@ -29,6 +29,7 @@
 import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.AlertDialog;
+import android.app.StatusBarManager;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -72,6 +73,7 @@
 
     private final FeatureFlags mFeatureFlags;
     private final Lazy<ScreenCaptureDevicePolicyResolver> mScreenCaptureDevicePolicyResolver;
+    private final StatusBarManager mStatusBarManager;
 
     private String mPackageName;
     private int mUid;
@@ -87,9 +89,11 @@
 
     @Inject
     public MediaProjectionPermissionActivity(FeatureFlags featureFlags,
-            Lazy<ScreenCaptureDevicePolicyResolver> screenCaptureDevicePolicyResolver) {
+            Lazy<ScreenCaptureDevicePolicyResolver> screenCaptureDevicePolicyResolver,
+            StatusBarManager statusBarManager) {
         mFeatureFlags = featureFlags;
         mScreenCaptureDevicePolicyResolver = screenCaptureDevicePolicyResolver;
+        mStatusBarManager = statusBarManager;
     }
 
     @Override
@@ -311,6 +315,8 @@
                 // WM Shell running inside.
                 mUserSelectingTask = true;
                 startActivityAsUser(intent, UserHandle.of(ActivityManager.getCurrentUser()));
+                // close shade if it's open
+                mStatusBarManager.collapsePanels();
             }
         } catch (RemoteException e) {
             Log.e(TAG, "Error granting projection permission", e);
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
index dddbeda..e79fc74 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/pipeline/MediaDataManager.kt
@@ -22,12 +22,14 @@
 import android.app.Notification.EXTRA_SUBSTITUTE_APP_NAME
 import android.app.PendingIntent
 import android.app.StatusBarManager
+import android.app.UriGrantsManager
 import android.app.smartspace.SmartspaceAction
 import android.app.smartspace.SmartspaceConfig
 import android.app.smartspace.SmartspaceManager
 import android.app.smartspace.SmartspaceSession
 import android.app.smartspace.SmartspaceTarget
 import android.content.BroadcastReceiver
+import android.content.ContentProvider
 import android.content.ContentResolver
 import android.content.Context
 import android.content.Intent
@@ -700,10 +702,13 @@
             Log.d(TAG, "adding track for $userId from browser: $desc")
         }
 
+        val currentEntry = mediaEntries.get(packageName)
+        val appUid = currentEntry?.appUid ?: Process.INVALID_UID
+
         // Album art
         var artworkBitmap = desc.iconBitmap
         if (artworkBitmap == null && desc.iconUri != null) {
-            artworkBitmap = loadBitmapFromUri(desc.iconUri!!)
+            artworkBitmap = loadBitmapFromUriForUser(desc.iconUri!!, userId, appUid, packageName)
         }
         val artworkIcon =
             if (artworkBitmap != null) {
@@ -712,9 +717,7 @@
                 null
             }
 
-        val currentEntry = mediaEntries.get(packageName)
         val instanceId = currentEntry?.instanceId ?: logger.getNewInstanceId()
-        val appUid = currentEntry?.appUid ?: Process.INVALID_UID
         val isExplicit =
             desc.extras?.getLong(MediaConstants.METADATA_KEY_IS_EXPLICIT) ==
                 MediaConstants.METADATA_VALUE_ATTRIBUTE_PRESENT
@@ -1261,6 +1264,30 @@
             false
         }
     }
+
+    /** Returns a bitmap if the user can access the given URI, else null */
+    private fun loadBitmapFromUriForUser(
+        uri: Uri,
+        userId: Int,
+        appUid: Int,
+        packageName: String,
+    ): Bitmap? {
+        try {
+            val ugm = UriGrantsManager.getService()
+            ugm.checkGrantUriPermission_ignoreNonSystem(
+                appUid,
+                packageName,
+                ContentProvider.getUriWithoutUserId(uri),
+                Intent.FLAG_GRANT_READ_URI_PERMISSION,
+                ContentProvider.getUserIdFromUri(uri, userId)
+            )
+            return loadBitmapFromUri(uri)
+        } catch (e: SecurityException) {
+            Log.e(TAG, "Failed to get URI permission: $e")
+        }
+        return null
+    }
+
     /**
      * Load a bitmap from a URI
      *
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
index 2883210..83a6e58 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/KeyguardMediaController.kt
@@ -35,7 +35,7 @@
 import com.android.systemui.statusbar.notification.stack.MediaContainerView
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.settings.SecureSettings
 import javax.inject.Inject
 import javax.inject.Named
@@ -55,6 +55,7 @@
     private val secureSettings: SecureSettings,
     @Main private val handler: Handler,
     configurationController: ConfigurationController,
+    private val splitShadeStateController: SplitShadeStateController
 ) {
 
     init {
@@ -108,7 +109,7 @@
     }
 
     private fun updateResources() {
-        useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        useSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
     }
 
     @VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
index c1c757e..0b30e59 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt
@@ -52,7 +52,7 @@
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.statusbar.policy.ConfigurationController
 import com.android.systemui.statusbar.policy.KeyguardStateController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.animation.UniqueObjectHostView
 import com.android.systemui.util.settings.SecureSettings
 import com.android.systemui.util.traceSection
@@ -101,6 +101,7 @@
     panelEventsEvents: ShadeStateEvents,
     private val secureSettings: SecureSettings,
     @Main private val handler: Handler,
+    private val splitShadeStateController: SplitShadeStateController
 ) {
 
     /** Track the media player setting status on lock screen. */
@@ -568,7 +569,7 @@
             context.resources.getDimensionPixelSize(
                 R.dimen.lockscreen_shade_media_transition_distance
             )
-        inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
index bb0e9d1..7011ad9 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java
@@ -127,7 +127,7 @@
     private final ActivityStarter mActivityStarter;
     private final DialogLaunchAnimator mDialogLaunchAnimator;
     private final CommonNotifCollection mNotifCollection;
-    private final Object mMediaDevicesLock = new Object();
+    protected final Object mMediaDevicesLock = new Object();
     @VisibleForTesting
     final List<MediaDevice> mGroupMediaDevices = new CopyOnWriteArrayList<>();
     final List<MediaDevice> mCachedMediaDevices = new CopyOnWriteArrayList<>();
@@ -222,7 +222,7 @@
                 R.dimen.media_output_dialog_selectable_margin_end);
     }
 
-    void start(@NonNull Callback cb) {
+    protected void start(@NonNull Callback cb) {
         synchronized (mMediaDevicesLock) {
             mCachedMediaDevices.clear();
             mMediaItemList.clear();
@@ -256,15 +256,15 @@
         return false;
     }
 
-    boolean isRefreshing() {
+    public boolean isRefreshing() {
         return mIsRefreshing;
     }
 
-    void setRefreshing(boolean refreshing) {
+    public void setRefreshing(boolean refreshing) {
         mIsRefreshing = refreshing;
     }
 
-    void stop() {
+    protected void stop() {
         if (mMediaController != null) {
             mMediaController.unregisterCallback(mCb);
         }
@@ -551,7 +551,7 @@
         }
     }
 
-    void refreshDataSetIfNeeded() {
+    public void refreshDataSetIfNeeded() {
         if (mNeedRefresh) {
             buildMediaItems(mCachedMediaDevices);
             mCallback.onDeviceListChanged();
@@ -605,6 +605,15 @@
 
     private void buildMediaItems(List<MediaDevice> devices) {
         synchronized (mMediaDevicesLock) {
+            List<MediaItem> updatedMediaItems = buildMediaItems(mMediaItemList, devices);
+            mMediaItemList.clear();
+            mMediaItemList.addAll(updatedMediaItems);
+        }
+    }
+
+    protected List<MediaItem> buildMediaItems(List<MediaItem> oldMediaItems,
+            List<MediaDevice> devices) {
+        synchronized (mMediaDevicesLock) {
             if (!mLocalMediaManager.isPreferenceRouteListingExist()) {
                 attachRangeInfo(devices);
                 Collections.sort(devices, Comparator.naturalOrder());
@@ -616,22 +625,20 @@
             final MediaDevice connectedMediaDevice =
                     needToHandleMutingExpectedDevice ? null
                             : getCurrentConnectedMediaDevice();
-            if (mMediaItemList.isEmpty()) {
+            if (oldMediaItems.isEmpty()) {
                 if (connectedMediaDevice == null) {
                     if (DEBUG) {
                         Log.d(TAG, "No connected media device or muting expected device exist.");
                     }
-                    categorizeMediaItems(null, devices, needToHandleMutingExpectedDevice);
-                    return;
+                    return categorizeMediaItems(null, devices, needToHandleMutingExpectedDevice);
                 }
                 // selected device exist
-                categorizeMediaItems(connectedMediaDevice, devices, false);
-                return;
+                return categorizeMediaItems(connectedMediaDevice, devices, false);
             }
             // To keep the same list order
             final List<MediaDevice> targetMediaDevices = new ArrayList<>();
             final Map<Integer, MediaItem> dividerItems = new HashMap<>();
-            for (MediaItem originalMediaItem : mMediaItemList) {
+            for (MediaItem originalMediaItem : oldMediaItems) {
                 for (MediaDevice newDevice : devices) {
                     if (originalMediaItem.getMediaDevice().isPresent()
                             && TextUtils.equals(originalMediaItem.getMediaDevice().get().getId(),
@@ -642,7 +649,7 @@
                 }
                 if (originalMediaItem.getMediaItemType()
                         == MediaItem.MediaItemType.TYPE_GROUP_DIVIDER) {
-                    dividerItems.put(mMediaItemList.indexOf(originalMediaItem), originalMediaItem);
+                    dividerItems.put(oldMediaItems.indexOf(originalMediaItem), originalMediaItem);
                 }
             }
             if (targetMediaDevices.size() != devices.size()) {
@@ -651,16 +658,18 @@
             }
             List<MediaItem> finalMediaItems = targetMediaDevices.stream().map(
                     MediaItem::new).collect(Collectors.toList());
-            dividerItems.forEach((key, item) -> {
-                finalMediaItems.add(key, item);
-            });
+            dividerItems.forEach(finalMediaItems::add);
             attachConnectNewDeviceItemIfNeeded(finalMediaItems);
-            mMediaItemList.clear();
-            mMediaItemList.addAll(finalMediaItems);
+            return finalMediaItems;
         }
     }
 
-    private void categorizeMediaItems(MediaDevice connectedMediaDevice, List<MediaDevice> devices,
+    /**
+     * Initial categorization of current devices, will not be called for updates to the devices
+     * list.
+     */
+    private List<MediaItem> categorizeMediaItems(MediaDevice connectedMediaDevice,
+            List<MediaDevice> devices,
             boolean needToHandleMutingExpectedDevice) {
         synchronized (mMediaDevicesLock) {
             List<MediaItem> finalMediaItems = new ArrayList<>();
@@ -691,8 +700,7 @@
                 }
             }
             attachConnectNewDeviceItemIfNeeded(finalMediaItems);
-            mMediaItemList.clear();
-            mMediaItemList.addAll(finalMediaItems);
+            return finalMediaItems;
         }
     }
 
@@ -765,7 +773,7 @@
         mGroupMediaDevices.clear();
     }
 
-    void connectDevice(MediaDevice device) {
+    protected void connectDevice(MediaDevice device) {
         mMetricLogger.updateOutputEndPoints(getCurrentConnectedMediaDevice(), device);
 
         ThreadUtils.postOnBackgroundThread(() -> {
@@ -777,7 +785,7 @@
         return mMediaItemList;
     }
 
-    MediaDevice getCurrentConnectedMediaDevice() {
+    public MediaDevice getCurrentConnectedMediaDevice() {
         return mLocalMediaManager.getCurrentConnectedDevice();
     }
 
@@ -794,7 +802,7 @@
         return mLocalMediaManager.getSelectableMediaDevice();
     }
 
-    List<MediaDevice> getSelectedMediaDevice() {
+    public List<MediaDevice> getSelectedMediaDevice() {
         return mLocalMediaManager.getSelectedMediaDevice();
     }
 
@@ -859,7 +867,7 @@
                 UserHandle.of(UserHandle.myUserId()));
     }
 
-    boolean isAnyDeviceTransferring() {
+    public boolean isAnyDeviceTransferring() {
         synchronized (mMediaDevicesLock) {
             for (MediaItem mediaItem : mMediaItemList) {
                 if (mediaItem.getMediaDevice().isPresent()
@@ -976,7 +984,7 @@
         broadcast.setBroadcastCode(broadcastCode.getBytes(StandardCharsets.UTF_8));
     }
 
-    void setTemporaryAllowListExceptionIfNeeded(MediaDevice targetDevice) {
+    protected void setTemporaryAllowListExceptionIfNeeded(MediaDevice targetDevice) {
         if (mPowerExemptionManager == null || mPackageName == null) {
             Log.w(TAG, "powerExemptionManager or package name is null");
             return;
@@ -1221,7 +1229,7 @@
         }
     };
 
-    interface Callback {
+    public interface Callback {
         /**
          * Override to handle the media content updating.
          */
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
index af65937..2b38edb 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputDialogFactory.kt
@@ -38,7 +38,7 @@
 /**
  * Factory to create [MediaOutputDialog] objects.
  */
-class MediaOutputDialogFactory @Inject constructor(
+open class MediaOutputDialogFactory @Inject constructor(
     private val context: Context,
     private val mediaSessionManager: MediaSessionManager,
     private val lbm: LocalBluetoothManager?,
@@ -60,7 +60,7 @@
     }
 
     /** Creates a [MediaOutputDialog] for the given package. */
-    fun create(packageName: String, aboveStatusBar: Boolean, view: View? = null) {
+    open fun create(packageName: String, aboveStatusBar: Boolean, view: View? = null) {
         // Dismiss the previous dialog, if any.
         mediaOutputDialog?.dismiss()
 
@@ -89,7 +89,7 @@
     }
 
     /** dismiss [MediaOutputDialog] if exist. */
-    fun dismiss() {
+    open fun dismiss() {
         mediaOutputDialog?.dismiss()
         mediaOutputDialog = null
     }
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index 555269d..62b22c5 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -133,7 +133,6 @@
 import com.android.systemui.settings.DisplayTracker;
 import com.android.systemui.settings.UserContextProvider;
 import com.android.systemui.settings.UserTracker;
-import com.android.systemui.shade.ShadeController;
 import com.android.systemui.shade.ShadeViewController;
 import com.android.systemui.shared.navigationbar.RegionSamplingHelper;
 import com.android.systemui.shared.recents.utilities.Utilities;
@@ -156,6 +155,7 @@
 import com.android.systemui.statusbar.phone.LightBarController;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
 import com.android.systemui.util.DeviceConfigProxy;
 import com.android.systemui.util.ViewController;
 import com.android.wm.shell.back.BackAnimation;
@@ -200,7 +200,7 @@
     private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
     private final SysUiState mSysUiFlagsContainer;
     private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
-    private final ShadeController mShadeController;
+    private final KeyguardStateController mKeyguardStateController;
     private final ShadeViewController mShadeViewController;
     private final NotificationRemoteInputManager mNotificationRemoteInputManager;
     private final OverviewProxyService mOverviewProxyService;
@@ -262,7 +262,7 @@
     @VisibleForTesting
     public int mDisplayId;
     private boolean mIsOnDefaultDisplay;
-    public boolean mHomeBlockedThisTouch;
+    private boolean mHomeBlockedThisTouch;
 
     /**
      * When user is QuickSwitching between apps of different orientations, we'll draw a fake
@@ -531,7 +531,6 @@
     @Inject
     NavigationBar(
             NavigationBarView navigationBarView,
-            ShadeController shadeController,
             NavigationBarFrame navigationBarFrame,
             @Nullable Bundle savedState,
             @DisplayId Context context,
@@ -550,6 +549,7 @@
             Optional<Pip> pipOptional,
             Optional<Recents> recentsOptional,
             Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
+            KeyguardStateController keyguardStateController,
             ShadeViewController shadeViewController,
             NotificationRemoteInputManager notificationRemoteInputManager,
             NotificationShadeDepthController notificationShadeDepthController,
@@ -585,7 +585,7 @@
         mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
         mSysUiFlagsContainer = sysUiFlagsContainer;
         mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
-        mShadeController = shadeController;
+        mKeyguardStateController = keyguardStateController;
         mShadeViewController = shadeViewController;
         mNotificationRemoteInputManager = notificationRemoteInputManager;
         mOverviewProxyService = overviewProxyService;
@@ -1326,8 +1326,7 @@
                 mHomeBlockedThisTouch = false;
                 if (mTelecomManagerOptional.isPresent()
                         && mTelecomManagerOptional.get().isRinging()) {
-                    if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing)
-                            .orElse(false)) {
+                    if (mKeyguardStateController.isShowing()) {
                         Log.i(TAG, "Ignoring HOME; there's a ringing incoming call. " +
                                 "No heads up");
                         mHomeBlockedThisTouch = true;
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
index 580facd..5a42028 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java
@@ -19,7 +19,6 @@
 import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_FLOATING_MENU;
 import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_GESTURE;
 import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR;
-
 import static com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler.DEBUG_MISSING_GESTURE_TAG;
 import static com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen;
 
@@ -58,7 +57,6 @@
 import com.android.systemui.shared.system.QuickStepContract;
 import com.android.systemui.shared.system.TaskStackChangeListeners;
 import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.CommandQueue.Callbacks;
 import com.android.systemui.statusbar.phone.AutoHideController;
 import com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
 import com.android.systemui.statusbar.phone.LightBarController;
@@ -75,7 +73,6 @@
 /** A controller to handle navigation bars. */
 @SysUISingleton
 public class NavigationBarController implements
-        Callbacks,
         ConfigurationController.ConfigurationListener,
         NavigationModeController.ModeChangedListener,
         Dumpable {
@@ -130,7 +127,7 @@
         mSecureSettings = secureSettings;
         mDisplayTracker = displayTracker;
         mDisplayManager = mContext.getSystemService(DisplayManager.class);
-        commandQueue.addCallback(this);
+        commandQueue.addCallback(mCommandQueueCallbacks);
         configurationController.addCallback(this);
         mConfigChanges.applyNewConfig(mContext.getResources());
         mNavMode = navigationModeController.addListener(this);
@@ -270,25 +267,51 @@
         return taskbarEnabled;
     }
 
-    @Override
-    public void onDisplayRemoved(int displayId) {
-        removeNavigationBar(displayId);
-    }
-
-    @Override
-    public void onDisplayReady(int displayId) {
-        Display display = mDisplayManager.getDisplay(displayId);
-        mIsLargeScreen = isLargeScreen(mContext);
-        createNavigationBar(display, null /* savedState */, null /* result */);
-    }
-
-    @Override
-    public void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
-        final NavigationBar navigationBar = getNavigationBar(displayId);
-        if (navigationBar != null) {
-            navigationBar.setNavigationBarLumaSamplingEnabled(enable);
+    private final CommandQueue.Callbacks mCommandQueueCallbacks = new CommandQueue.Callbacks() {
+        @Override
+        public void onDisplayRemoved(int displayId) {
+            removeNavigationBar(displayId);
         }
-    }
+
+        @Override
+        public void onDisplayReady(int displayId) {
+            Display display = mDisplayManager.getDisplay(displayId);
+            mIsLargeScreen = isLargeScreen(mContext);
+            createNavigationBar(display, null /* savedState */, null /* result */);
+        }
+
+        @Override
+        public void setNavigationBarLumaSamplingEnabled(int displayId, boolean enable) {
+            final NavigationBar navigationBar = getNavigationBar(displayId);
+            if (navigationBar != null) {
+                navigationBar.setNavigationBarLumaSamplingEnabled(enable);
+            }
+        }
+
+        @Override
+        public void showPinningEnterExitToast(boolean entering) {
+            int displayId = mContext.getDisplayId();
+            final NavigationBarView navBarView = getNavigationBarView(displayId);
+            if (navBarView != null) {
+                navBarView.showPinningEnterExitToast(entering);
+            } else if (displayId == mDisplayTracker.getDefaultDisplayId()
+                    && mTaskbarDelegate.isInitialized()) {
+                mTaskbarDelegate.showPinningEnterExitToast(entering);
+            }
+        }
+
+        @Override
+        public void showPinningEscapeToast() {
+            int displayId = mContext.getDisplayId();
+            final NavigationBarView navBarView = getNavigationBarView(displayId);
+            if (navBarView != null) {
+                navBarView.showPinningEscapeToast();
+            } else if (displayId == mDisplayTracker.getDefaultDisplayId()
+                    && mTaskbarDelegate.isInitialized()) {
+                mTaskbarDelegate.showPinningEscapeToast();
+            }
+        }
+    };
 
     /**
      * Recreates the navigation bar for the given display.
@@ -446,26 +469,6 @@
         return mNavigationBars.get(displayId);
     }
 
-    public void showPinningEnterExitToast(int displayId, boolean entering) {
-        final NavigationBarView navBarView = getNavigationBarView(displayId);
-        if (navBarView != null) {
-            navBarView.showPinningEnterExitToast(entering);
-        } else if (displayId == mDisplayTracker.getDefaultDisplayId()
-                && mTaskbarDelegate.isInitialized()) {
-            mTaskbarDelegate.showPinningEnterExitToast(entering);
-        }
-    }
-
-    public void showPinningEscapeToast(int displayId) {
-        final NavigationBarView navBarView = getNavigationBarView(displayId);
-        if (navBarView != null) {
-            navBarView.showPinningEscapeToast();
-        } else if (displayId == mDisplayTracker.getDefaultDisplayId()
-                && mTaskbarDelegate.isInitialized()) {
-            mTaskbarDelegate.showPinningEscapeToast();
-        }
-    }
-
     public boolean isOverviewEnabled(int displayId) {
         final NavigationBarView navBarView = getNavigationBarView(displayId);
         if (navBarView != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
index 856a92e..9359958 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java
@@ -39,6 +39,7 @@
 import com.android.systemui.settings.brightness.BrightnessSliderController;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.statusbar.policy.BrightnessMirrorController;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.tuner.TunerService;
 
 import javax.inject.Inject;
@@ -80,9 +81,10 @@
             QSLogger qsLogger, BrightnessController.Factory brightnessControllerFactory,
             BrightnessSliderController.Factory brightnessSliderFactory,
             FalsingManager falsingManager,
-            StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
+            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
+            SplitShadeStateController splitShadeStateController) {
         super(view, qsHost, qsCustomizerController, usingMediaPlayer, mediaHost,
-                metricsLogger, uiEventLogger, qsLogger, dumpManager);
+                metricsLogger, uiEventLogger, qsLogger, dumpManager, splitShadeStateController);
         mTunerService = tunerService;
         mQsCustomizerController = qsCustomizerController;
         mQsTileRevealControllerFactory = qsTileRevealControllerFactory;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
index 20f0352..81e3a2f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
@@ -40,7 +40,7 @@
 import com.android.systemui.qs.external.CustomTile;
 import com.android.systemui.qs.logging.QSLogger;
 import com.android.systemui.qs.tileimpl.QSTileViewImpl;
-import com.android.systemui.util.LargeScreenUtils;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.util.ViewController;
 import com.android.systemui.util.animation.DisappearParameters;
 
@@ -86,6 +86,8 @@
 
     private final QSHost.Callback mQSHostCallback = this::setTiles;
 
+    private SplitShadeStateController mSplitShadeStateController;
+
     @VisibleForTesting
     protected final QSPanel.OnConfigurationChangedListener mOnConfigurationChangedListener =
             new QSPanel.OnConfigurationChangedListener() {
@@ -93,8 +95,8 @@
                 public void onConfigurationChange(Configuration newConfig) {
                     final boolean previousSplitShadeState = mShouldUseSplitNotificationShade;
                     final int previousOrientation = mLastOrientation;
-                    mShouldUseSplitNotificationShade =
-                            LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+                    mShouldUseSplitNotificationShade = mSplitShadeStateController
+                            .shouldUseSplitNotificationShade(getResources());
                     mLastOrientation = newConfig.orientation;
 
                     mQSLogger.logOnConfigurationChanged(
@@ -138,7 +140,8 @@
             MetricsLogger metricsLogger,
             UiEventLogger uiEventLogger,
             QSLogger qsLogger,
-            DumpManager dumpManager
+            DumpManager dumpManager,
+            SplitShadeStateController splitShadeStateController
     ) {
         super(view);
         mHost = host;
@@ -149,8 +152,9 @@
         mUiEventLogger = uiEventLogger;
         mQSLogger = qsLogger;
         mDumpManager = dumpManager;
+        mSplitShadeStateController = splitShadeStateController;
         mShouldUseSplitNotificationShade =
-                LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+                mSplitShadeStateController.shouldUseSplitNotificationShade(getResources());
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
index 2d54313..585136a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanelController.java
@@ -32,6 +32,7 @@
 import com.android.systemui.qs.customize.QSCustomizerController;
 import com.android.systemui.qs.dagger.QSScope;
 import com.android.systemui.qs.logging.QSLogger;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.util.leak.RotationUtils;
 
 import java.util.ArrayList;
@@ -55,10 +56,10 @@
             @Named(QS_USING_COLLAPSED_LANDSCAPE_MEDIA)
                     Provider<Boolean> usingCollapsedLandscapeMediaProvider,
             MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger,
-            DumpManager dumpManager
+            DumpManager dumpManager, SplitShadeStateController splitShadeStateController
     ) {
         super(view, qsHost, qsCustomizerController, usingMediaPlayer, mediaHost, metricsLogger,
-                uiEventLogger, qsLogger, dumpManager);
+                uiEventLogger, qsLogger, dumpManager, splitShadeStateController);
         mUsingCollapsedLandscapeMediaProvider = usingCollapsedLandscapeMediaProvider;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 30218a6..26912f8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -226,7 +226,7 @@
                 listenToMetadata(device);
             } else {
                 stopListeningToStaleDeviceMetadata();
-                batteryLevel = device.getBatteryLevel();
+                batteryLevel = device.getMinBatteryLevelWithMemberDevices();
             }
 
             if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt
new file mode 100644
index 0000000..1a03481
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataInteractor.kt
@@ -0,0 +1,26 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.flow.Flow
+
+/**
+ * Provides data and availability for the tile. In most cases it would delegate data retrieval to
+ * repository, manager, controller or a combination of those. Avoid doing long running operations in
+ * these methods because there is no background thread guarantee. Use [Flow.flowOn] (typically
+ * with @Background [CoroutineDispatcher]) instead to move the calculations to another thread.
+ */
+interface QSTileDataInteractor<DATA_TYPE> {
+
+    /**
+     * Returns the data to be mapped to [QSTileState]. Make sure to start the flow [Flow.onStart]
+     * with the current state to update the tile as soon as possible.
+     */
+    fun tileData(qsTileDataRequest: QSTileDataRequest): Flow<DATA_TYPE>
+
+    /**
+     * Returns tile availability - whether this device currently supports this tile. Make sure to
+     * start the flow [Flow.onStart] with the current state to update the tile as soon as possible.
+     */
+    fun availability(): Flow<Boolean>
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt
new file mode 100644
index 0000000..8289704
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileDataRequest.kt
@@ -0,0 +1,6 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+data class QSTileDataRequest(
+    val userId: Int,
+    val trigger: StateUpdateTrigger,
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt
new file mode 100644
index 0000000..8569fc7
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/QSTileUserActionInteractor.kt
@@ -0,0 +1,13 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import android.annotation.WorkerThread
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+
+interface QSTileUserActionInteractor<DATA_TYPE> {
+
+    /**
+     * Processes user input based on [userAction] and [currentData]. It's safe to run long running
+     * computations inside this function in this.
+     */
+    @WorkerThread suspend fun handleInput(userAction: QSTileUserAction, currentData: DATA_TYPE)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt
new file mode 100644
index 0000000..ed7ec8e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/StateUpdateTrigger.kt
@@ -0,0 +1,11 @@
+package com.android.systemui.qs.tiles.base.interactor
+
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+
+sealed interface StateUpdateTrigger {
+    class UserAction<T>(val action: QSTileUserAction, val tileState: QSTileState, val tileData: T) :
+        StateUpdateTrigger
+    data object ForceUpdate : StateUpdateTrigger
+    data object InitialRequest : StateUpdateTrigger
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt
new file mode 100644
index 0000000..a5eaac1
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileConfig.kt
@@ -0,0 +1,14 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.graphics.drawable.Icon
+import com.android.systemui.qs.pipeline.shared.TileSpec
+
+data class QSTileConfig(
+    val tileSpec: TileSpec,
+    val tileIcon: Icon,
+    val tileLabel: CharSequence,
+// TODO(b/299908705): Fill necessary params
+/*
+val instanceId: InstanceId,
+ */
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt
new file mode 100644
index 0000000..39db703
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileLifecycle.kt
@@ -0,0 +1,6 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+enum class QSTileLifecycle {
+    ON_CREATE,
+    ON_DESTROY,
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt
new file mode 100644
index 0000000..53f9edf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileState.kt
@@ -0,0 +1,18 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.graphics.drawable.Icon
+
+data class QSTileState(
+    val icon: Icon,
+    val label: CharSequence,
+// TODO(b/299908705): Fill necessary params
+/*
+   val subtitle: CharSequence = "",
+   val activeState: ActivationState = Active,
+   val enabledState: Enabled = Enabled,
+   val loopIconAnimation: Boolean = false,
+   val secondaryIcon: Icon? = null,
+   val slashState: SlashState? = null,
+   val supportedActions: Collection<UserAction> = listOf(Click), clicks should be a default action
+*/
+)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt
new file mode 100644
index 0000000..f1f8f01
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileUserAction.kt
@@ -0,0 +1,13 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import android.content.Context
+import android.view.View
+
+sealed interface QSTileUserAction {
+
+    val context: Context
+    val view: View?
+
+    class Click(override val context: Context, override val view: View?) : QSTileUserAction
+    class LongClick(override val context: Context, override val view: View?) : QSTileUserAction
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt
new file mode 100644
index 0000000..49077f3
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModel.kt
@@ -0,0 +1,41 @@
+package com.android.systemui.qs.tiles.viewmodel
+
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.StateFlow
+
+/**
+ * Represents tiles behaviour logic. This ViewModel is a connection between tile view and data
+ * layers.
+ */
+interface QSTileViewModel {
+
+    /**
+     * State of the tile to be shown by the view. Favor reactive consumption over the
+     * [StateFlow.value], because there is no guarantee that current value would be available at any
+     * time.
+     */
+    val state: StateFlow<QSTileState>
+
+    val config: QSTileConfig
+
+    val isAvailable: Flow<Boolean>
+
+    /**
+     * Handles ViewModel lifecycle. Implementations should be inactive outside of
+     * [QSTileLifecycle.ON_CREATE] and [QSTileLifecycle.ON_DESTROY] bounds.
+     */
+    fun onLifecycle(lifecycle: QSTileLifecycle)
+
+    /**
+     * Notifies about the user change. Implementations should avoid using 3rd party userId sources
+     * and use this value instead. This is to maintain consistent and concurrency-free behaviour
+     * across different parts of QS.
+     */
+    fun onUserIdChanged(userId: Int)
+
+    /** Triggers emit of the new [QSTileState] in [state]. */
+    fun forceUpdate()
+
+    /** Notifies underlying logic about user input. */
+    fun onActionPerformed(userAction: QSTileUserAction)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
index 4b22edc..21c5ae8 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java
@@ -16,7 +16,6 @@
 
 package com.android.systemui.recents;
 
-import android.annotation.Nullable;
 import android.content.Context;
 import android.os.Handler;
 import android.os.RemoteException;
@@ -25,11 +24,7 @@
 import com.android.systemui.dagger.SysUISingleton;
 import com.android.systemui.plugins.ActivityStarter;
 import com.android.systemui.shared.recents.IOverviewProxy;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
-
-import dagger.Lazy;
-
-import java.util.Optional;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
 
 import javax.inject.Inject;
 
@@ -40,20 +35,20 @@
 public class OverviewProxyRecentsImpl implements RecentsImplementation {
 
     private final static String TAG = "OverviewProxyRecentsImpl";
-    @Nullable
-    private final Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
-
     private Handler mHandler;
     private final OverviewProxyService mOverviewProxyService;
     private final ActivityStarter mActivityStarter;
+    private final KeyguardStateController mKeyguardStateController;
 
     @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
     @Inject
-    public OverviewProxyRecentsImpl(Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
-            OverviewProxyService overviewProxyService, ActivityStarter activityStarter) {
-        mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy;
+    public OverviewProxyRecentsImpl(
+            OverviewProxyService overviewProxyService,
+            ActivityStarter activityStarter,
+            KeyguardStateController keyguardStateController) {
         mOverviewProxyService = overviewProxyService;
         mActivityStarter = activityStarter;
+        mKeyguardStateController = keyguardStateController;
     }
 
     @Override
@@ -101,9 +96,7 @@
                 }
             };
             // Preload only if device for current user is unlocked
-            final Optional<CentralSurfaces> centralSurfacesOptional =
-                    mCentralSurfacesOptionalLazy.get();
-            if (centralSurfacesOptional.map(CentralSurfaces::isKeyguardShowing).orElse(false)) {
+            if (mKeyguardStateController.isShowing()) {
                 mActivityStarter.executeRunnableDismissingKeyguard(
                         () -> mHandler.post(toggleRecents), null, true /* dismissShade */,
                         false /* afterKeyguardGone */,
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
index 83fb723..291d273 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
@@ -69,7 +69,9 @@
             listOf(ComposeMustBeAvailable(), CompileTimeFlagMustBeEnabled())
 
     override fun isEnabled(): Boolean {
-        return requirements.all { it.isMet() }
+        // SCENE_CONTAINER_ENABLED is an explicit static flag check that helps with downstream
+        // optimizations, e.g., unused code stripping. Do not remove!
+        return Flags.SCENE_CONTAINER_ENABLED && requirements.all { it.isMet() }
     }
 
     override fun requirementDescription(): String {
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/RequestProcessor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/RequestProcessor.kt
index 98f2fee..5154067 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/RequestProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/RequestProcessor.kt
@@ -16,10 +16,8 @@
 
 package com.android.systemui.screenshot
 
-import android.graphics.Insets
 import android.util.Log
 import android.view.WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE
-import com.android.internal.util.ScreenshotRequest
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.dagger.qualifiers.Application
 import com.android.systemui.flags.FeatureFlags
@@ -49,64 +47,6 @@
         /** For the Java Async version, to invoke the callback. */
         @Application private val mainScope: CoroutineScope
 ) : ScreenshotRequestProcessor {
-    /**
-     * Inspects the incoming request, returning a potentially modified request depending on policy.
-     *
-     * @param request the request to process
-     */
-    // TODO: Delete once SCREENSHOT_METADATA flag is launched
-    suspend fun process(request: ScreenshotRequest): ScreenshotRequest {
-        var result = request
-
-        // Apply work profile screenshots policy:
-        //
-        // If the focused app belongs to a work profile, transforms a full screen
-        // (or partial) screenshot request to a task snapshot (provided image) screenshot.
-
-        // Whenever displayContentInfo is fetched, the topComponent is also populated
-        // regardless of the managed profile status.
-
-        if (request.type != TAKE_SCREENSHOT_PROVIDED_IMAGE) {
-            val info = policy.findPrimaryContent(policy.getDefaultDisplayId())
-            Log.d(TAG, "findPrimaryContent: $info")
-
-            result = if (policy.isManagedProfile(info.user.identifier)) {
-                val image = capture.captureTask(info.taskId)
-                        ?: error("Task snapshot returned a null Bitmap!")
-
-                // Provide the task snapshot as the screenshot
-                ScreenshotRequest.Builder(TAKE_SCREENSHOT_PROVIDED_IMAGE, request.source)
-                        .setTopComponent(info.component)
-                        .setTaskId(info.taskId)
-                        .setUserId(info.user.identifier)
-                        .setBitmap(image)
-                        .setBoundsOnScreen(info.bounds)
-                        .setInsets(Insets.NONE)
-                        .build()
-            } else {
-                // Create a new request of the same type which includes the top component
-                ScreenshotRequest.Builder(request.type, request.source)
-                        .setTopComponent(info.component).build()
-            }
-        }
-
-        return result
-    }
-
-    /**
-     * Note: This is for compatibility with existing Java. Prefer the suspending function when
-     * calling from a Coroutine context.
-     *
-     * @param request the request to process
-     * @param callback the callback to provide the processed request, invoked from the main thread
-     */
-    // TODO: Delete once SCREENSHOT_METADATA flag is launched
-    fun processAsync(request: ScreenshotRequest, callback: Consumer<ScreenshotRequest>) {
-        mainScope.launch {
-            val result = process(request)
-            callback.accept(result)
-        }
-    }
 
     override suspend fun process(screenshot: ScreenshotData): ScreenshotData {
         var result = screenshot
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
index 6c886fc..c5bc2fb 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
@@ -4,6 +4,7 @@
 import android.os.Trace
 import android.util.Log
 import android.view.Display
+import android.view.WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE
 import com.android.internal.logging.UiEventLogger
 import com.android.internal.util.ScreenshotRequest
 import com.android.systemui.dagger.SysUISingleton
@@ -55,7 +56,7 @@
         onSaved: (Uri) -> Unit,
         requestCallback: RequestCallback
     ) {
-        val displayIds = getDisplaysToScreenshot()
+        val displayIds = getDisplaysToScreenshot(screenshotRequest.type)
         val resultCallbackWrapper = MultiResultCallbackWrapper(requestCallback)
         screenshotRequest.oneForEachDisplay(displayIds).forEach { screenshotData: ScreenshotData ->
             dispatchToController(
@@ -93,8 +94,13 @@
             .handleScreenshot(screenshotData, onSaved, callback)
     }
 
-    private fun getDisplaysToScreenshot(): List<Int> {
-        return displays.value.filter { it.type in ALLOWED_DISPLAY_TYPES }.map { it.displayId }
+    private fun getDisplaysToScreenshot(requestType: Int): List<Int> {
+        return if (requestType == TAKE_SCREENSHOT_PROVIDED_IMAGE) {
+            // If this is a provided image, let's show the UI on the default display only.
+            listOf(Display.DEFAULT_DISPLAY)
+        } else {
+            displays.value.filter { it.type in ALLOWED_DISPLAY_TYPES }.map { it.displayId }
+        }
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 246ea0e..3aa7bac 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -97,6 +97,7 @@
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.internal.policy.SystemBarUtils;
+import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.util.LatencyTracker;
 import com.android.keyguard.ActiveUnlockConfig;
 import com.android.keyguard.FaceAuthApiRequestReason;
@@ -140,7 +141,6 @@
 import com.android.systemui.keyguard.shared.model.TransitionStep;
 import com.android.systemui.keyguard.shared.model.WakefulnessModel;
 import com.android.systemui.keyguard.ui.binder.KeyguardLongPressViewBinder;
-import com.android.systemui.keyguard.ui.view.KeyguardRootView;
 import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel;
 import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel;
 import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingTransitionViewModel;
@@ -165,7 +165,6 @@
 import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
 import com.android.systemui.shade.data.repository.ShadeRepository;
 import com.android.systemui.shade.transition.ShadeTransitionController;
-import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
 import com.android.systemui.shared.system.QuickStepContract;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.GestureRecorder;
@@ -223,10 +222,10 @@
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcherController;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcherView;
 import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.statusbar.window.StatusBarWindowStateController;
 import com.android.systemui.unfold.SysUIUnfoldComponent;
 import com.android.systemui.util.Compile;
-import com.android.systemui.util.LargeScreenUtils;
 import com.android.systemui.util.Utils;
 import com.android.systemui.util.time.SystemClock;
 import com.android.wm.shell.animation.FlingAnimationUtils;
@@ -320,7 +319,6 @@
     private final NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
     private final LayoutInflater mLayoutInflater;
     private final FeatureFlags mFeatureFlags;
-    private final PowerManager mPowerManager;
     private final AccessibilityManager mAccessibilityManager;
     private final NotificationWakeUpCoordinator mWakeUpCoordinator;
     private final PulseExpansionHandler mPulseExpansionHandler;
@@ -336,6 +334,7 @@
     private final KeyguardUserSwitcherComponent.Factory mKeyguardUserSwitcherComponentFactory;
     private final KeyguardStatusBarViewComponent.Factory mKeyguardStatusBarViewComponentFactory;
     private final FragmentService mFragmentService;
+    private final IStatusBarService mStatusBarService;
     private final ScrimController mScrimController;
     private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
     private final TapAgainViewController mTapAgainViewController;
@@ -356,7 +355,6 @@
     private final AccessibilityDelegate mAccessibilityDelegate = new ShadeAccessibilityDelegate();
     private final NotificationGutsManager mGutsManager;
     private final AlternateBouncerInteractor mAlternateBouncerInteractor;
-    private final KeyguardRootView mKeyguardRootView;
     private final QuickSettingsController mQsController;
     private final TouchHandler mTouchHandler = new TouchHandler();
 
@@ -370,8 +368,6 @@
     /** The current squish amount for the predictive back animation */
     private float mCurrentBackProgress = 0.0f;
     private boolean mTracking;
-    private boolean mIsTrackingExpansionFromStatusBar;
-    private boolean mHintAnimationRunning;
     @Deprecated
     private KeyguardBottomAreaView mKeyguardBottomArea;
     private boolean mExpanding;
@@ -622,7 +618,7 @@
     private int mLockscreenToDreamingTransitionTranslationY;
     private int mGoneToDreamingTransitionTranslationY;
     private int mLockscreenToOccludedTransitionTranslationY;
-
+    private SplitShadeStateController mSplitShadeStateController;
     private final Runnable mFlingCollapseRunnable = () -> fling(0, false /* expand */,
             mNextCollapseSpeedUpFactor, false /* expandBecauseOfFalsing */);
     private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable =
@@ -744,6 +740,7 @@
             NavigationBarController navigationBarController,
             QuickSettingsController quickSettingsController,
             FragmentService fragmentService,
+            IStatusBarService statusBarService,
             ContentResolver contentResolver,
             ShadeHeaderController shadeHeaderController,
             ScreenOffAnimationController screenOffAnimationController,
@@ -780,7 +777,7 @@
             SharedNotificationContainerInteractor sharedNotificationContainerInteractor,
             KeyguardViewConfigurator keyguardViewConfigurator,
             KeyguardFaceAuthInteractor keyguardFaceAuthInteractor,
-            KeyguardRootView keyguardRootView) {
+            SplitShadeStateController splitShadeStateController) {
         keyguardStateController.addCallback(new KeyguardStateController.Callback() {
             @Override
             public void onKeyguardFadingAwayChanged() {
@@ -874,9 +871,11 @@
         mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory;
         mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory;
         mFragmentService = fragmentService;
+        mStatusBarService = statusBarService;
         mSettingsChangeObserver = new SettingsChangeObserver(handler);
+        mSplitShadeStateController = splitShadeStateController;
         mSplitShadeEnabled =
-                LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+                mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
         mView.setWillNotDraw(!DEBUG_DRAWABLE);
         mShadeHeaderController = shadeHeaderController;
         mLayoutInflater = layoutInflater;
@@ -884,7 +883,6 @@
         mAnimateBack = mFeatureFlags.isEnabled(Flags.WM_SHADE_ANIMATE_BACK_GESTURE);
         mTrackpadGestureFeaturesEnabled = mFeatureFlags.isEnabled(Flags.TRACKPAD_GESTURE_FEATURES);
         mFalsingCollector = falsingCollector;
-        mPowerManager = powerManager;
         mWakeUpCoordinator = coordinator;
         mMainDispatcher = mainDispatcher;
         mAccessibilityManager = accessibilityManager;
@@ -985,7 +983,6 @@
                     }
                 });
         mAlternateBouncerInteractor = alternateBouncerInteractor;
-        mKeyguardRootView = keyguardRootView;
         dumpManager.registerDumpable(this);
     }
 
@@ -1298,7 +1295,7 @@
     @Override
     public void updateResources() {
         final boolean newSplitShadeEnabled =
-                LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+                mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
         final boolean splitShadeChanged = mSplitShadeEnabled != newSplitShadeEnabled;
         mSplitShadeEnabled = newSplitShadeEnabled;
         mQsController.updateResources();
@@ -1517,7 +1514,7 @@
     }
 
     private boolean shouldAvoidChangingNotificationsCount() {
-        return mHintAnimationRunning || mUnlockedScreenOffAnimationController.isAnimationPlaying();
+        return mUnlockedScreenOffAnimationController.isAnimationPlaying();
     }
 
     @Deprecated
@@ -2643,7 +2640,7 @@
                 && !mHeadsUpManager.hasPinnedHeadsUp()) {
             alpha = getFadeoutAlpha();
         }
-        if (mBarState == KEYGUARD && !mHintAnimationRunning
+        if (mBarState == KEYGUARD
                 && !mKeyguardBypassController.getBypassEnabled()
                 && !mQsController.getFullyExpanded()) {
             alpha *= mClockPositionResult.clockAlpha;
@@ -2681,7 +2678,7 @@
         //   change due to "unlock hint animation." In this case, fading out the bottom area
         //   would also hide the message that says "swipe to unlock," we don't want to do that.
         float expansionAlpha = MathUtils.constrainedMap(0f, 1f,
-                isUnlockHintRunning() ? 0f : KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
+                KeyguardBouncerConstants.ALPHA_EXPANSION_THRESHOLD, 1f,
                 getExpandedFraction());
 
         float alpha = Math.min(expansionAlpha, 1 - mQsController.computeExpansionFraction());
@@ -2845,7 +2842,6 @@
 
     private void onTrackingStopped(boolean expand) {
         mTracking = false;
-        maybeStopTrackingExpansionFromStatusBar(expand);
 
         updateExpansionAndVisibility();
         if (expand) {
@@ -2864,44 +2860,6 @@
                 mView.getHeight(), mNavigationBarBottomHeight);
     }
 
-    @VisibleForTesting
-    void startUnlockHintAnimation() {
-        if (mPowerManager.isPowerSaveMode() || mAmbientState.getDozeAmount() > 0f) {
-            onUnlockHintStarted();
-            onUnlockHintFinished();
-            return;
-        }
-
-        // We don't need to hint the user if an animation is already running or the user is changing
-        // the expansion.
-        if (mHeightAnimator != null || mTracking) {
-            return;
-        }
-        notifyExpandingStarted();
-        startUnlockHintAnimationPhase1(() -> {
-            notifyExpandingFinished();
-            onUnlockHintFinished();
-            mHintAnimationRunning = false;
-        });
-        onUnlockHintStarted();
-        mHintAnimationRunning = true;
-    }
-
-    @VisibleForTesting
-    void onUnlockHintFinished() {
-        // Delay the reset a bit so the user can read the text.
-        mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS);
-        mScrimController.setExpansionAffectsAlpha(true);
-        mNotificationStackScrollLayoutController.setUnlockHintRunning(false);
-    }
-
-    @VisibleForTesting
-    void onUnlockHintStarted() {
-        mKeyguardIndicationController.showActionToUnlock();
-        mScrimController.setExpansionAffectsAlpha(false);
-        mNotificationStackScrollLayoutController.setUnlockHintRunning(true);
-    }
-
     private boolean shouldUseDismissingAnimation() {
         return mBarState != StatusBarState.SHADE && (mKeyguardStateController.canDismissLockScreen()
                 || !isTracking());
@@ -2988,7 +2946,7 @@
                                 0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
                         mLockscreenGestureLogger
                                 .log(LockscreenUiEvent.LOCKSCREEN_LOCK_SHOW_HINT);
-                        startUnlockHintAnimation();
+                        mKeyguardIndicationController.showActionToUnlock();
                     }
                 }
                 break;
@@ -3036,7 +2994,9 @@
     private void setHeadsUpManager(HeadsUpManagerPhone headsUpManager) {
         mHeadsUpManager = headsUpManager;
         mHeadsUpManager.addListener(mOnHeadsUpChangedListener);
-        mHeadsUpTouchHelper = new HeadsUpTouchHelper(headsUpManager,
+        mHeadsUpTouchHelper = new HeadsUpTouchHelper(
+                headsUpManager,
+                mStatusBarService,
                 mNotificationStackScrollLayoutController.getHeadsUpCallback(),
                 new HeadsUpNotificationViewControllerImpl());
     }
@@ -3396,7 +3356,6 @@
         ipw.print("mOverExpansion="); ipw.println(mOverExpansion);
         ipw.print("mExpandedHeight="); ipw.println(mExpandedHeight);
         ipw.print("mTracking="); ipw.println(mTracking);
-        ipw.print("mHintAnimationRunning="); ipw.println(mHintAnimationRunning);
         ipw.print("mExpanding="); ipw.println(mExpanding);
         ipw.print("mSplitShadeEnabled="); ipw.println(mSplitShadeEnabled);
         ipw.print("mKeyguardNotificationBottomPadding=");
@@ -4055,73 +4014,6 @@
         mView.removeCallbacks(mFlingCollapseRunnable);
     }
 
-    @Override
-    public boolean isUnlockHintRunning() {
-        return mHintAnimationRunning;
-    }
-
-    /**
-     * Phase 1: Move everything upwards.
-     */
-    private void startUnlockHintAnimationPhase1(final Runnable onAnimationFinished) {
-        float target = Math.max(0, getMaxPanelHeight() - mHintDistance);
-        ValueAnimator animator = createHeightAnimator(target);
-        animator.setDuration(250);
-        animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
-        animator.addListener(new AnimatorListenerAdapter() {
-            private boolean mCancelled;
-
-            @Override
-            public void onAnimationCancel(Animator animation) {
-                mCancelled = true;
-            }
-
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                if (mCancelled) {
-                    setAnimator(null);
-                    onAnimationFinished.run();
-                } else {
-                    startUnlockHintAnimationPhase2(onAnimationFinished);
-                }
-            }
-        });
-        animator.start();
-        setAnimator(animator);
-
-
-        if (mFeatureFlags.isEnabled(Flags.MIGRATE_SPLIT_KEYGUARD_BOTTOM_AREA)) {
-            final ViewPropertyAnimator mKeyguardRootViewAnimator = mKeyguardRootView.animate();
-            mKeyguardRootViewAnimator
-                    .translationY(-mHintDistance)
-                    .setDuration(250)
-                    .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
-                    .withEndAction(() -> mKeyguardRootViewAnimator
-                            .translationY(0)
-                            .setDuration(450)
-                            .setInterpolator(mBounceInterpolator)
-                            .start())
-                    .start();
-        } else {
-            final List<ViewPropertyAnimator> indicationAnimators =
-                    mKeyguardBottomArea.getIndicationAreaAnimators();
-
-            for (final ViewPropertyAnimator indicationAreaAnimator : indicationAnimators) {
-                indicationAreaAnimator
-                    .translationY(-mHintDistance)
-                    .setDuration(250)
-                    .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
-                    .withEndAction(() -> indicationAreaAnimator
-                        .translationY(0)
-                        .setDuration(450)
-                        .setInterpolator(mBounceInterpolator)
-                        .start())
-                    .start();
-            }
-        }
-
-    }
-
     private void setAnimator(ValueAnimator animator) {
         mHeightAnimator = animator;
         if (animator == null && mPanelUpdateWhenAnimatorEnds) {
@@ -4132,7 +4024,7 @@
 
     /** Returns whether a shade or QS expansion animation is running */
     private boolean isShadeOrQsHeightAnimationRunning() {
-        return mHeightAnimator != null && !mHintAnimationRunning && !mIsSpringBackAnimation;
+        return mHeightAnimator != null && !mIsSpringBackAnimation;
     }
 
     /**
@@ -4211,9 +4103,7 @@
 
     /** Called when the user performs a click anywhere in the empty area of the panel. */
     private void onEmptySpaceClick() {
-        if (!mHintAnimationRunning)  {
-            onMiddleClicked();
-        }
+        onMiddleClicked();
     }
 
     @VisibleForTesting
@@ -4244,42 +4134,6 @@
     }
 
     @Override
-    public void startTrackingExpansionFromStatusBar() {
-        mIsTrackingExpansionFromStatusBar = true;
-        InteractionJankMonitorWrapper.begin(
-                mView, InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
-    }
-
-    /**
-     * Stops tracking an expansion that originated from the status bar (if we had started tracking
-     * it).
-     *
-     * @param expand the expand boolean passed to {@link #onTrackingStopped(boolean)}.
-     */
-    private void maybeStopTrackingExpansionFromStatusBar(boolean expand) {
-        if (!mIsTrackingExpansionFromStatusBar) {
-            return;
-        }
-        mIsTrackingExpansionFromStatusBar = false;
-
-        // Determine whether the shade actually expanded due to the status bar touch:
-        // - If the user just taps on the status bar, then #isExpanded is false but
-        // #onTrackingStopped is called with `true`.
-        // - If the user drags down on the status bar but doesn't drag down far enough, then
-        // #onTrackingStopped is called with `false` but #isExpanded is true.
-        // So, we need *both* #onTrackingStopped called with `true` *and* #isExpanded to be true in
-        // order to confirm that the shade successfully opened.
-        boolean shadeExpansionFromStatusBarSucceeded = expand && isExpanded();
-        if (shadeExpansionFromStatusBarSucceeded) {
-            InteractionJankMonitorWrapper.end(
-                    InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
-        } else {
-            InteractionJankMonitorWrapper.cancel(
-                    InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR);
-        }
-    }
-
-    @Override
     public void updateTouchableRegion() {
         //A layout will ensure that onComputeInternalInsets will be called and after that we can
         // resize the layout. Make sure that the window stays small for one frame until the
@@ -4849,11 +4703,6 @@
         return mStatusBarStateListener;
     }
 
-    @VisibleForTesting
-    boolean isHintAnimationRunning() {
-        return mHintAnimationRunning;
-    }
-
     private void onStatusBarWindowStateChanged(@StatusBarManager.WindowVisibleState int state) {
         if (state != WINDOW_STATE_SHOWING
                 && mStatusBarStateController.getState() == StatusBarState.SHADE) {
@@ -4942,12 +4791,11 @@
                     mAnimatingOnDown = mHeightAnimator != null && !mIsSpringBackAnimation;
                     mMinExpandHeight = 0.0f;
                     mDownTime = mSystemClock.uptimeMillis();
-                    if (mAnimatingOnDown && mClosing && !mHintAnimationRunning) {
+                    if (mAnimatingOnDown && mClosing) {
                         cancelHeightAnimator();
                         mTouchSlopExceeded = true;
                         mShadeLog.v("NotificationPanelViewController MotionEvent intercepted:"
-                                + " mAnimatingOnDown: true, mClosing: true, mHintAnimationRunning:"
-                                + " false");
+                                + " mAnimatingOnDown: true, mClosing: true");
                         return true;
                     }
                     if (!mTracking || isFullyCollapsed()) {
@@ -5318,11 +5166,6 @@
         public void startExpand(float x, float y, boolean startTracking, float expandedHeight) {
             startExpandMotion(x, y, startTracking, expandedHeight);
         }
-
-        @Override
-        public void clearNotificationEffects() {
-            mCentralSurfaces.clearNotificationEffects();
-        }
     }
 
     private final class ShadeAccessibilityDelegate extends AccessibilityDelegate {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
index 4a76dd0..2dbcbc9 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
@@ -40,6 +40,7 @@
 import android.view.IWindowSession;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowInsets;
 import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
 import android.view.WindowManagerGlobal;
@@ -409,9 +410,9 @@
     private void applyForceShowNavigationFlag(NotificationShadeWindowState state) {
         if (state.panelExpanded || state.bouncerShowing
                 || ENABLE_REMOTE_INPUT && state.remoteInputActive) {
-            mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
+            mLpChanged.forciblyShownTypes |= WindowInsets.Type.navigationBars();
         } else {
-            mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
+            mLpChanged.forciblyShownTypes &= ~WindowInsets.Type.navigationBars();
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
index 0f85c76..880ba92 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java
@@ -37,6 +37,7 @@
 import com.android.keyguard.dagger.KeyguardBouncerComponent;
 import com.android.systemui.Dumpable;
 import com.android.systemui.R;
+import com.android.systemui.animation.ActivityLaunchAnimator;
 import com.android.systemui.back.domain.interactor.BackActionInteractor;
 import com.android.systemui.bouncer.domain.interactor.BouncerMessageInteractor;
 import com.android.systemui.bouncer.ui.binder.KeyguardBouncerViewBinder;
@@ -560,7 +561,9 @@
     void setExpandAnimationRunning(boolean running) {
         if (mExpandAnimationRunning != running) {
             // TODO(b/288507023): Remove this log.
-            Log.d(TAG, "Setting mExpandAnimationRunning=" + running);
+            if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+                Log.d(TAG, "Setting mExpandAnimationRunning=" + running);
+            }
             if (running) {
                 mLaunchAnimationTimeout = mClock.uptimeMillis() + 5000;
             }
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
index 9412542..bdf114e 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationsQSContainerController.kt
@@ -39,6 +39,7 @@
 import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
 import com.android.systemui.shared.system.QuickStepContract
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.LargeScreenUtils
 import com.android.systemui.util.ViewController
 import com.android.systemui.util.concurrency.DelayableExecutor
@@ -61,6 +62,7 @@
         private val featureFlags: FeatureFlags,
         private val
             notificationStackScrollLayoutController: NotificationStackScrollLayoutController,
+        private val splitShadeStateController: SplitShadeStateController
 ) : ViewController<NotificationsQuickSettingsContainer>(view), QSContainerController {
 
     private var qsExpanded = false
@@ -149,7 +151,8 @@
     }
 
     fun updateResources() {
-        val newSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(resources)
+        val newSplitShadeEnabled =
+                splitShadeStateController.shouldUseSplitNotificationShade(resources)
         val splitShadeEnabledChanged = newSplitShadeEnabled != splitShadeEnabled
         splitShadeEnabled = newSplitShadeEnabled
         largeScreenShadeHeaderActive = LargeScreenUtils.shouldUseLargeScreenShadeHeader(resources)
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index b2bbffd..9a16538 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -100,6 +100,7 @@
 import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.KeyguardStateController;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.util.LargeScreenUtils;
 import com.android.systemui.util.kotlin.JavaAdapter;
 
@@ -150,6 +151,7 @@
     private final ShadeLogger mShadeLog;
     private final KeyguardFaceAuthInteractor mKeyguardFaceAuthInteractor;
     private final CastController mCastController;
+    private final SplitShadeStateController mSplitShadeStateController;
     private final FeatureFlags mFeatureFlags;
     private final InteractionJankMonitor mInteractionJankMonitor;
     private final ShadeRepository mShadeRepository;
@@ -344,14 +346,16 @@
             ShadeRepository shadeRepository,
             ShadeInteractor shadeInteractor,
             JavaAdapter javaAdapter,
-            CastController castController
+            CastController castController,
+            SplitShadeStateController splitShadeStateController
     ) {
         mPanelViewControllerLazy = panelViewControllerLazy;
         mPanelView = panelView;
         mQsFrame = mPanelView.findViewById(R.id.qs_frame);
         mKeyguardStatusBar = mPanelView.findViewById(R.id.keyguard_header);
         mResources = mPanelView.getResources();
-        mSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+        mSplitShadeStateController = splitShadeStateController;
+        mSplitShadeEnabled = mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
         mQsFrameTranslateController = qsFrameTranslateController;
         mShadeTransitionController = shadeTransitionController;
         mPulseExpansionHandler = pulseExpansionHandler;
@@ -437,7 +441,7 @@
     }
 
     void updateResources() {
-        mSplitShadeEnabled = LargeScreenUtils.shouldUseSplitNotificationShade(mResources);
+        mSplitShadeEnabled = mSplitShadeStateController.shouldUseSplitNotificationShade(mResources);
         if (mQs != null) {
             mQs.setInSplitShade(mSplitShadeEnabled);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
index 02f337a..447a15d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
@@ -33,6 +33,8 @@
  * {@link com.android.systemui.keyguard.KeyguardViewMediator} and others.
  */
 public interface ShadeController extends CoreStartable {
+    /** True if the shade UI is enabled on this particular Android variant and false otherwise. */
+    boolean isShadeEnabled();
 
     /** Make our window larger and the shade expanded */
     void instantExpandShade();
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
index 5f95bca..82959ee 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
@@ -23,6 +23,7 @@
 /** Empty implementation of ShadeController for variants of Android without shades. */
 @SysUISingleton
 open class ShadeControllerEmptyImpl @Inject constructor() : ShadeController {
+    override fun isShadeEnabled() = false
     override fun start() {}
     override fun instantExpandShade() {}
     override fun instantCollapseShade() {}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
index 9a3e4e5..367449b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
@@ -114,6 +114,11 @@
     }
 
     @Override
+    public boolean isShadeEnabled() {
+        return true;
+    }
+
+    @Override
     public void instantExpandShade() {
         // Make our window larger and the panel expanded.
         makeExpandedVisible(true /* force */);
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
index 6564118..9a356ad 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeHeaderController.kt
@@ -135,7 +135,8 @@
     private val date: TextView = header.requireViewById(R.id.date)
     private val iconContainer: StatusIconContainer = header.requireViewById(R.id.statusIcons)
     private val mShadeCarrierGroup: ShadeCarrierGroup = header.requireViewById(R.id.carrier_group)
-    private val systemIcons: View = header.requireViewById(R.id.shade_header_system_icons)
+    private val systemIconsHoverContainer: View =
+        header.requireViewById(R.id.hover_system_icons_container)
 
     private var roundedCorners = 0
     private var cutout: DisplayCutout? = null
@@ -259,14 +260,18 @@
                     header.paddingRight,
                     header.paddingBottom
                 )
-                systemIcons.setPaddingRelative(
+                systemIconsHoverContainer.setPaddingRelative(
                     resources.getDimensionPixelSize(
-                        R.dimen.shade_header_system_icons_padding_start
+                        R.dimen.hover_system_icons_container_padding_start
                     ),
-                    resources.getDimensionPixelSize(R.dimen.shade_header_system_icons_padding_top),
-                    resources.getDimensionPixelSize(R.dimen.shade_header_system_icons_padding_end),
                     resources.getDimensionPixelSize(
-                        R.dimen.shade_header_system_icons_padding_bottom
+                        R.dimen.hover_system_icons_container_padding_top
+                    ),
+                    resources.getDimensionPixelSize(
+                        R.dimen.hover_system_icons_container_padding_end
+                    ),
+                    resources.getDimensionPixelSize(
+                        R.dimen.hover_system_icons_container_padding_bottom
                     )
                 )
             }
@@ -330,8 +335,8 @@
         demoModeController.addCallback(demoModeReceiver)
         statusBarIconController.addIconGroup(iconManager)
         nextAlarmController.addCallback(nextAlarmCallback)
-        systemIcons.setOnHoverListener(
-            statusOverlayHoverListenerFactory.createListener(systemIcons)
+        systemIconsHoverContainer.setOnHoverListener(
+            statusOverlayHoverListenerFactory.createListener(systemIconsHoverContainer)
         )
     }
 
@@ -343,7 +348,7 @@
         demoModeController.removeCallback(demoModeReceiver)
         statusBarIconController.removeIconGroup(iconManager)
         nextAlarmController.removeCallback(nextAlarmCallback)
-        systemIcons.setOnHoverListener(null)
+        systemIconsHoverContainer.setOnHoverListener(null)
     }
 
     fun disable(state1: Int, state2: Int, animate: Boolean) {
@@ -479,11 +484,11 @@
         if (largeScreenActive) {
             logInstantEvent("Large screen constraints set")
             header.setTransition(LARGE_SCREEN_HEADER_TRANSITION_ID)
-            systemIcons.setOnClickListener { shadeCollapseAction?.run() }
+            systemIconsHoverContainer.setOnClickListener { shadeCollapseAction?.run() }
         } else {
             logInstantEvent("Small screen constraints set")
             header.setTransition(HEADER_TRANSITION_ID)
-            systemIcons.setOnClickListener(null)
+            systemIconsHoverContainer.setOnClickListener(null)
         }
         header.jumpToState(header.startState)
         updatePosition()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
index 1121834..b3f6e16 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
@@ -199,12 +199,6 @@
     /** Animate to expanded shade after a delay in ms. Used for lockscreen to shade transition. */
     fun transitionToExpandedShade(delay: Long)
 
-    /**
-     * Returns whether the unlock hint animation is running. The unlock hint animation is when the
-     * user taps the lock screen, causing the contents of the lock screen visually bounce.
-     */
-    val isUnlockHintRunning: Boolean
-
     /** @see ViewGroupFadeHelper.reset */
     fun resetViewGroupFade()
 
@@ -248,9 +242,6 @@
     /** Sends an external (e.g. Status Bar) touch event to the Shade touch handler. */
     fun handleExternalTouch(event: MotionEvent): Boolean
 
-    /** Starts tracking a shade expansion gesture that originated from the status bar. */
-    fun startTrackingExpansionFromStatusBar()
-
     /**
      * Performs haptic feedback from a view with a haptic feedback constant.
      *
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
index 6a2bef2..b8a4101 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
@@ -73,7 +73,6 @@
         return false
     }
     override fun transitionToExpandedShade(delay: Long) {}
-    override val isUnlockHintRunning: Boolean = false
 
     override fun resetViewGroupFade() {}
     override fun setKeyguardTransitionProgress(keyguardAlpha: Float, keyguardTranslationY: Int) {}
@@ -86,7 +85,6 @@
     override fun handleExternalTouch(event: MotionEvent): Boolean {
         return false
     }
-    override fun startTrackingExpansionFromStatusBar() {}
     override fun performHapticFeedback(constant: Int) {}
 
     override val shadeHeadsUpTracker = ShadeHeadsUpTrackerEmptyImpl()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
index 509921f..947259a 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
@@ -42,7 +42,7 @@
 
     /**
      * The amount the lockscreen shade has dragged down by the user, [0-1]. 0 means fully collapsed,
-     * 1 means fully expanded.
+     * 1 means fully expanded. Value resets to 0 when the user finishes dragging.
      */
     val lockscreenShadeExpansion: StateFlow<Float>
 
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
index 3b19411..95a072c 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
@@ -20,6 +20,10 @@
 import com.android.systemui.dagger.qualifiers.Application
 import com.android.systemui.keyguard.data.repository.KeyguardRepository
 import com.android.systemui.keyguard.shared.model.StatusBarState
+import com.android.systemui.scene.domain.interactor.SceneInteractor
+import com.android.systemui.scene.shared.flag.SceneContainerFlags
+import com.android.systemui.scene.shared.model.ObservableTransitionState
+import com.android.systemui.scene.shared.model.SceneKey
 import com.android.systemui.shade.data.repository.ShadeRepository
 import com.android.systemui.statusbar.disableflags.data.repository.DisableFlagsRepository
 import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
@@ -28,22 +32,29 @@
 import com.android.systemui.user.domain.interactor.UserInteractor
 import com.android.systemui.util.kotlin.pairwise
 import javax.inject.Inject
+import javax.inject.Provider
 import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.SharingStarted
 import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.combine
 import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flatMapLatest
+import kotlinx.coroutines.flow.flowOf
 import kotlinx.coroutines.flow.map
 import kotlinx.coroutines.flow.stateIn
 
 /** Business logic for shade interactions. */
+@OptIn(ExperimentalCoroutinesApi::class)
 @SysUISingleton
 class ShadeInteractor
 @Inject
 constructor(
     @Application scope: CoroutineScope,
     disableFlagsRepository: DisableFlagsRepository,
+    sceneContainerFlags: SceneContainerFlags,
+    sceneInteractorProvider: Provider<SceneInteractor>,
     keyguardRepository: KeyguardRepository,
     userSetupRepository: UserSetupRepository,
     deviceProvisionedController: DeviceProvisionedController,
@@ -68,28 +79,45 @@
 
     /** The amount [0-1] that the shade has been opened */
     val shadeExpansion: Flow<Float> =
-        combine(
-            repository.lockscreenShadeExpansion,
-            keyguardRepository.statusBarState,
-            repository.legacyShadeExpansion,
-            repository.qsExpansion,
-            splitShadeEnabled
-        ) { dragDownAmount, statusBarState, legacyShadeExpansion, qsExpansion, splitShadeEnabled ->
-            when (statusBarState) {
-                // legacyShadeExpansion is 1 instead of 0 when QS is expanded
-                StatusBarState.SHADE ->
-                    if (!splitShadeEnabled && qsExpansion > 0f) 0f else legacyShadeExpansion
-                StatusBarState.KEYGUARD -> dragDownAmount
-                // This is required, as shadeExpansion gets reset to 0f even with the shade open
-                StatusBarState.SHADE_LOCKED -> 1f
-            }
+        if (sceneContainerFlags.isEnabled()) {
+            sceneBasedExpansion(sceneInteractorProvider.get(), SceneKey.Shade)
+        } else {
+            combine(
+                    repository.lockscreenShadeExpansion,
+                    keyguardRepository.statusBarState,
+                    repository.legacyShadeExpansion,
+                    repository.qsExpansion,
+                    splitShadeEnabled
+                ) {
+                    lockscreenShadeExpansion,
+                    statusBarState,
+                    legacyShadeExpansion,
+                    qsExpansion,
+                    splitShadeEnabled ->
+                    when (statusBarState) {
+                        // legacyShadeExpansion is 1 instead of 0 when QS is expanded
+                        StatusBarState.SHADE ->
+                            if (!splitShadeEnabled && qsExpansion > 0f) 0f else legacyShadeExpansion
+                        StatusBarState.KEYGUARD -> lockscreenShadeExpansion
+                        // dragDownAmount, which drives lockscreenShadeExpansion resets to 0f when
+                        // the pointer is lifted and the lockscreen shade is fully expanded
+                        StatusBarState.SHADE_LOCKED -> 1f
+                    }
+                }
+                .distinctUntilChanged()
         }
 
     /**
      * The amount [0-1] QS has been opened. Normal shade with notifications (QQS) visible will
      * report 0f.
      */
-    val qsExpansion: StateFlow<Float> = repository.qsExpansion
+    val qsExpansion: StateFlow<Float> =
+        if (sceneContainerFlags.isEnabled()) {
+            sceneBasedExpansion(sceneInteractorProvider.get(), SceneKey.QuickSettings)
+                .stateIn(scope, SharingStarted.Eagerly, 0f)
+        } else {
+            repository.qsExpansion
+        }
 
     /** The amount [0-1] either QS or the shade has been opened */
     val anyExpansion: StateFlow<Float> =
@@ -119,4 +147,26 @@
                 disableFlags.isQuickSettingsEnabled() &&
                 !isDozing
         }
+
+    fun sceneBasedExpansion(sceneInteractor: SceneInteractor, sceneKey: SceneKey) =
+        sceneInteractor.transitionState
+            .flatMapLatest { state ->
+                when (state) {
+                    is ObservableTransitionState.Idle ->
+                        if (state.scene == sceneKey) {
+                            flowOf(1f)
+                        } else {
+                            flowOf(0f)
+                        }
+                    is ObservableTransitionState.Transition ->
+                        if (state.toScene == sceneKey) {
+                            state.progress
+                        } else if (state.fromScene == sceneKey) {
+                            state.progress.map { progress -> 1 - progress }
+                        } else {
+                            flowOf(0f)
+                        }
+                }
+            }
+            .distinctUntilChanged()
 }
diff --git a/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
index fd57f21..4ba5674 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImpl.kt
@@ -20,7 +20,7 @@
 import android.content.res.Configuration
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import javax.inject.Inject
 
 /** Interpolator responsible for the shade when on large screens. */
@@ -32,6 +32,7 @@
     private val context: Context,
     private val splitShadeInterpolator: SplitShadeInterpolator,
     private val portraitShadeInterpolator: LargeScreenPortraitShadeInterpolator,
+    private val splitShadeStateController: SplitShadeStateController
 ) : LargeScreenShadeInterpolator {
 
     private var inSplitShade = false
@@ -48,7 +49,7 @@
     }
 
     private fun updateResources() {
-        inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
     }
 
     private val impl: LargeScreenShadeInterpolator
diff --git a/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
index ec16109..9715070 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/transition/ShadeTransitionController.kt
@@ -18,7 +18,6 @@
 
 import android.content.Context
 import android.content.res.Configuration
-import com.android.systemui.R
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.qs.QS
@@ -31,6 +30,7 @@
 import com.android.systemui.statusbar.SysuiStatusBarStateController
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
 import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import java.io.PrintWriter
 import javax.inject.Inject
 
@@ -45,6 +45,7 @@
     private val context: Context,
     private val scrimShadeTransitionController: ScrimShadeTransitionController,
     private val statusBarStateController: SysuiStatusBarStateController,
+    private val splitShadeStateController: SplitShadeStateController
 ) {
 
     lateinit var shadeViewController: ShadeViewController
@@ -73,7 +74,7 @@
     }
 
     private fun updateResources() {
-        inSplitShade = context.resources.getBoolean(R.bool.config_use_split_notification_shade)
+        inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
     }
 
     private fun onPanelStateChanged(@PanelState state: Int) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
index 5b24af0..b6a633f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AbstractLockscreenShadeTransitionController.kt
@@ -6,14 +6,15 @@
 import com.android.systemui.Dumpable
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import java.io.PrintWriter
 
 /** An abstract implementation of a class that controls the lockscreen to shade transition. */
 abstract class AbstractLockscreenShadeTransitionController(
     protected val context: Context,
     configurationController: ConfigurationController,
-    dumpManager: DumpManager
+    dumpManager: DumpManager,
+    private val splitShadeStateController: SplitShadeStateController
 ) : Dumpable {
 
     protected var useSplitShade = false
@@ -44,7 +45,8 @@
     }
 
     private fun updateResourcesInternal() {
-        useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        useSplitShade = splitShadeStateController
+                .shouldUseSplitNotificationShade(context.resources)
         updateResources()
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
index fec6112..238317c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionController.kt
@@ -8,6 +8,7 @@
 import com.android.systemui.media.controls.ui.MediaHierarchyManager
 import com.android.systemui.shade.ShadeViewController
 import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import dagger.assisted.Assisted
 import dagger.assisted.AssistedFactory
 import dagger.assisted.AssistedInject
@@ -16,12 +17,14 @@
 class LockscreenShadeKeyguardTransitionController
 @AssistedInject
 constructor(
-    private val mediaHierarchyManager: MediaHierarchyManager,
-    @Assisted private val notificationPanelController: ShadeViewController,
-    context: Context,
-    configurationController: ConfigurationController,
-    dumpManager: DumpManager
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+        private val mediaHierarchyManager: MediaHierarchyManager,
+        @Assisted private val notificationPanelController: ShadeViewController,
+        context: Context,
+        configurationController: ConfigurationController,
+        dumpManager: DumpManager,
+        splitShadeStateController: SplitShadeStateController
+) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager,
+        splitShadeStateController) {
 
     /**
      * Distance that the full shade transition takes in order for the keyguard content on
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
index df8c6ab..5f3d757 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionController.kt
@@ -25,6 +25,7 @@
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.qs.QS
 import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import dagger.assisted.Assisted
 import dagger.assisted.AssistedFactory
 import dagger.assisted.AssistedInject
@@ -38,7 +39,14 @@
     configurationController: ConfigurationController,
     dumpManager: DumpManager,
     @Assisted private val qsProvider: () -> QS,
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+    splitShadeStateController: SplitShadeStateController
+) :
+    AbstractLockscreenShadeTransitionController(
+        context,
+        configurationController,
+        dumpManager,
+        splitShadeStateController
+    ) {
 
     private val qs: QS
         get() = qsProvider()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
index 00d3701..af4a1aa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionController.kt
@@ -7,6 +7,7 @@
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.statusbar.phone.ScrimController
 import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import javax.inject.Inject
 
 /** Controls the lockscreen to shade transition for scrims. */
@@ -16,8 +17,10 @@
     private val scrimController: ScrimController,
     context: Context,
     configurationController: ConfigurationController,
-    dumpManager: DumpManager
-) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager) {
+    dumpManager: DumpManager,
+    splitShadeStateController: SplitShadeStateController
+) : AbstractLockscreenShadeTransitionController(context, configurationController, dumpManager,
+    splitShadeStateController) {
 
     /**
      * Distance that the full shade transition takes in order for scrim to fully transition to the
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
index 73bbbca..29ca0f4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt
@@ -42,7 +42,7 @@
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.statusbar.phone.LSShadeTransitionLogger
 import com.android.systemui.statusbar.policy.ConfigurationController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.wm.shell.animation.Interpolators
 import java.io.PrintWriter
 import javax.inject.Inject
@@ -79,6 +79,7 @@
     private val shadeRepository: ShadeRepository,
     private val shadeInteractor: ShadeInteractor,
     private val powerInteractor: PowerInteractor,
+    private val splitShadeStateController: SplitShadeStateController
 ) : Dumpable {
     private var pulseHeight: Float = 0f
 
@@ -267,7 +268,9 @@
             R.dimen.lockscreen_shade_udfps_keyguard_transition_distance)
         statusBarTransitionDistance = context.resources.getDimensionPixelSize(
             R.dimen.lockscreen_shade_status_bar_transition_distance)
-        useSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+
+        useSplitShade = splitShadeStateController
+                .shouldUseSplitNotificationShade(context.resources)
     }
 
     fun setStackScroller(nsslController: NotificationStackScrollLayoutController) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
index 59c63aa..5c45f3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
@@ -46,7 +46,7 @@
 import com.android.systemui.statusbar.phone.ScrimController
 import com.android.systemui.statusbar.policy.ConfigurationController
 import com.android.systemui.statusbar.policy.KeyguardStateController
-import com.android.systemui.util.LargeScreenUtils
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.WallpaperController
 import java.io.PrintWriter
 import javax.inject.Inject
@@ -67,6 +67,7 @@
     private val notificationShadeWindowController: NotificationShadeWindowController,
     private val dozeParameters: DozeParameters,
     private val context: Context,
+    private val splitShadeStateController: SplitShadeStateController,
     dumpManager: DumpManager,
     configurationController: ConfigurationController
 ) : ShadeExpansionListener, Dumpable {
@@ -329,7 +330,7 @@
     }
 
     private fun updateResources() {
-        inSplitShade = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        inSplitShade = splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
     }
 
     fun addListener(listener: DepthListener) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 3f37c60..c760227 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -776,7 +776,7 @@
             }
 
         } else if (viewEnd >= shelfClipStart
-                && (!mAmbientState.isUnlockHintRunning() || view.isInShelf())
+                && view.isInShelf()
                 && (mAmbientState.isShadeExpanded()
                 || (!view.isPinned() && !view.isHeadsUpAnimatingAway()))) {
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
index 0aedbf3..c62546f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationLaunchAnimatorController.kt
@@ -140,8 +140,9 @@
     }
 
     override fun onIntentStarted(willAnimate: Boolean) {
-        // TODO(b/288507023): Remove this log.
-        Log.d(TAG, "onIntentStarted(willAnimate=$willAnimate)")
+        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+            Log.d(TAG, "onIntentStarted(willAnimate=$willAnimate)")
+        }
         notificationExpansionRepository.setIsExpandAnimationRunning(willAnimate)
         notificationEntry.isExpandAnimationRunning = willAnimate
 
@@ -172,8 +173,9 @@
     }
 
     override fun onLaunchAnimationCancelled(newKeyguardOccludedState: Boolean?) {
-        // TODO(b/288507023): Remove this log.
-        Log.d(TAG, "onLaunchAnimationCancelled()")
+        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+            Log.d(TAG, "onLaunchAnimationCancelled()")
+        }
 
         // TODO(b/184121838): Should we call InteractionJankMonitor.cancel if the animation started
         // here?
@@ -191,8 +193,9 @@
     }
 
     override fun onLaunchAnimationEnd(isExpandingFullyAbove: Boolean) {
-        // TODO(b/288507023): Remove this log.
-        Log.d(TAG, "onLaunchAnimationEnd()")
+        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+            Log.d(TAG, "onLaunchAnimationEnd()")
+        }
         jankMonitor.end(InteractionJankMonitor.CUJ_NOTIFICATION_APP_START)
 
         notification.isExpandAnimationRunning = false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
index 8754c4a..6f0a97a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/data/repository/NotificationExpansionRepository.kt
@@ -17,6 +17,7 @@
 package com.android.systemui.statusbar.notification.data.repository
 
 import android.util.Log
+import com.android.systemui.animation.ActivityLaunchAnimator
 import com.android.systemui.dagger.SysUISingleton
 import javax.inject.Inject
 import kotlinx.coroutines.flow.Flow
@@ -40,8 +41,9 @@
 
     /** Sets whether the notification expansion animation is currently running. */
     fun setIsExpandAnimationRunning(running: Boolean) {
-        // TODO(b/288507023): Remove this log.
-        Log.d(TAG, "setIsExpandAnimationRunning(running=$running)")
+        if (ActivityLaunchAnimator.DEBUG_LAUNCH_ANIMATION) {
+            Log.d(TAG, "setIsExpandAnimationRunning(running=$running)")
+        }
         _isExpandAnimationRunning.value = running
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
index 51eb9f7..c24e9dc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManager.java
@@ -36,7 +36,7 @@
 @SysUISingleton
 public class NotifInflationErrorManager {
 
-    Set<NotificationEntry> mErroredNotifs = new ArraySet<>();
+    Set<String> mErroredNotifs = new ArraySet<>();
     List<NotifInflationErrorListener> mListeners = new ArrayList<>();
 
     @Inject
@@ -48,7 +48,7 @@
      * @param e the exception encountered while inflating
      */
     public void setInflationError(NotificationEntry entry, Exception e) {
-        mErroredNotifs.add(entry);
+        mErroredNotifs.add(entry.getKey());
         for (int i = 0; i < mListeners.size(); i++) {
             mListeners.get(i).onNotifInflationError(entry, e);
         }
@@ -58,8 +58,8 @@
      * Notification inflated successfully and is no longer errored out.
      */
     public void clearInflationError(NotificationEntry entry) {
-        if (mErroredNotifs.contains(entry)) {
-            mErroredNotifs.remove(entry);
+        if (mErroredNotifs.contains(entry.getKey())) {
+            mErroredNotifs.remove(entry.getKey());
             for (int i = 0; i < mListeners.size(); i++) {
                 mListeners.get(i).onNotifInflationErrorCleared(entry);
             }
@@ -70,7 +70,7 @@
      * Whether or not the notification encountered an exception while inflating.
      */
     public boolean hasInflationError(@NonNull NotificationEntry entry) {
-        return mErroredNotifs.contains(entry);
+        return mErroredNotifs.contains(entry.getKey());
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
index 95e74f2..38a368e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
@@ -86,7 +86,6 @@
     private boolean mExpansionChanging;
     private boolean mIsSmallScreen;
     private boolean mPulsing;
-    private boolean mUnlockHintRunning;
     private float mHideAmount;
     private boolean mAppearing;
     private float mPulseHeight = MAX_PULSE_HEIGHT;
@@ -592,14 +591,6 @@
         mIsSmallScreen = smallScreen;
     }
 
-    public void setUnlockHintRunning(boolean unlockHintRunning) {
-        mUnlockHintRunning = unlockHintRunning;
-    }
-
-    public boolean isUnlockHintRunning() {
-        return mUnlockHintRunning;
-    }
-
     /**
      * @return Whether we need to do a fling down after swiping up on lockscreen.
      */
@@ -770,7 +761,6 @@
         pw.println("mPulseHeight=" + mPulseHeight);
         pw.println("mTrackedHeadsUpRow.key=" + logKey(mTrackedHeadsUpRow));
         pw.println("mMaxHeadsUpTranslation=" + mMaxHeadsUpTranslation);
-        pw.println("mUnlockHintRunning=" + mUnlockHintRunning);
         pw.println("mDozeAmount=" + mDozeAmount);
         pw.println("mDozing=" + mDozing);
         pw.println("mFractionToShade=" + mFractionToShade);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 5e3a67e..e8521d1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -118,9 +118,9 @@
 import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
 import com.android.systemui.statusbar.policy.HeadsUpUtil;
 import com.android.systemui.statusbar.policy.ScrollAdapter;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.util.Assert;
 import com.android.systemui.util.DumpUtilsKt;
-import com.android.systemui.util.LargeScreenUtils;
 
 import com.google.errorprone.annotations.CompileTimeConstant;
 
@@ -568,6 +568,13 @@
     private final ScreenOffAnimationController mScreenOffAnimationController;
     private boolean mShouldUseSplitNotificationShade;
     private boolean mHasFilteredOutSeenNotifications;
+    @Nullable private SplitShadeStateController mSplitShadeStateController = null;
+
+    /** Pass splitShadeStateController to view and update split shade */
+    public void passSplitShadeStateController(SplitShadeStateController splitShadeStateController) {
+        mSplitShadeStateController = splitShadeStateController;
+        updateSplitNotificationShade();
+    }
 
     private final ExpandableView.OnHeightChangedListener mOnChildHeightChangedListener =
             new ExpandableView.OnHeightChangedListener() {
@@ -630,7 +637,6 @@
         mSectionsManager = Dependency.get(NotificationSectionsManager.class);
         mScreenOffAnimationController =
                 Dependency.get(ScreenOffAnimationController.class);
-        updateSplitNotificationShade();
         mSectionsManager.initialize(this);
         mSections = mSectionsManager.createSectionsForBuckets();
 
@@ -1350,8 +1356,7 @@
      */
     private boolean shouldSkipHeightUpdate() {
         return mAmbientState.isOnKeyguard()
-                && (mAmbientState.isUnlockHintRunning()
-                || mAmbientState.isSwipingUp()
+                && (mAmbientState.isSwipingUp()
                 || mAmbientState.isFlingingAfterSwipeUpOnLockscreen());
     }
 
@@ -5071,14 +5076,6 @@
         mAmbientState.setSmallScreen(isFullWidth);
     }
 
-    public void setUnlockHintRunning(boolean running) {
-        mAmbientState.setUnlockHintRunning(running);
-        if (!running) {
-            // re-calculate the stack height which was frozen while running this animation
-            updateStackPosition();
-        }
-    }
-
     public void setPanelFlinging(boolean flinging) {
         mAmbientState.setFlinging(flinging);
         if (!flinging) {
@@ -5675,7 +5672,7 @@
 
     @VisibleForTesting
     void updateSplitNotificationShade() {
-        boolean split = LargeScreenUtils.shouldUseSplitNotificationShade(getResources());
+        boolean split = mSplitShadeStateController.shouldUseSplitNotificationShade(getResources());
         if (split != mShouldUseSplitNotificationShade) {
             mShouldUseSplitNotificationShade = split;
             updateDismissBehavior();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index d8f513c..b051809 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -128,6 +128,7 @@
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
 import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
 import com.android.systemui.statusbar.policy.ZenModeController;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.util.Compile;
@@ -672,7 +673,8 @@
             NotificationTargetsHelper notificationTargetsHelper,
             SecureSettings secureSettings,
             NotificationDismissibilityProvider dismissibilityProvider,
-            ActivityStarter activityStarter) {
+            ActivityStarter activityStarter,
+            SplitShadeStateController splitShadeStateController) {
         mView = view;
         mKeyguardTransitionRepo = keyguardTransitionRepo;
         mStackStateLogger = stackLogger;
@@ -722,6 +724,7 @@
         mSecureSettings = secureSettings;
         mDismissibilityProvider = dismissibilityProvider;
         mActivityStarter = activityStarter;
+        mView.passSplitShadeStateController(splitShadeStateController);
         updateResources();
         setUpView();
     }
@@ -1200,10 +1203,6 @@
         mView.setHeadsUpBoundaries(height, bottomBarHeight);
     }
 
-    public void setUnlockHintRunning(boolean running) {
-        mView.setUnlockHintRunning(running);
-    }
-
     public void setPanelFlinging(boolean flinging) {
         mView.setPanelFlinging(flinging);
     }
@@ -1659,8 +1658,9 @@
 
     @VisibleForTesting
     void onKeyguardTransitionChanged(TransitionStep transitionStep) {
-        boolean isTransitionToAod = transitionStep.getFrom().equals(KeyguardState.GONE)
-                && transitionStep.getTo().equals(KeyguardState.AOD);
+        boolean isTransitionToAod = transitionStep.getTo().equals(KeyguardState.AOD)
+                && (transitionStep.getFrom().equals(KeyguardState.GONE)
+                || transitionStep.getFrom().equals(KeyguardState.OCCLUDED));
         if (mIsInTransitionToAod != isTransitionToAod) {
             mIsInTransitionToAod = isTransitionToAod;
             updateShowEmptyShadeView();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
index c7cb70c..24104d2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
@@ -29,8 +29,8 @@
 import com.android.systemui.statusbar.SysuiStatusBarStateController
 import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
 import com.android.systemui.statusbar.notification.row.ExpandableView
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import com.android.systemui.util.Compile
-import com.android.systemui.util.LargeScreenUtils.shouldUseSplitNotificationShade
 import com.android.systemui.util.children
 import java.io.PrintWriter
 import javax.inject.Inject
@@ -54,7 +54,8 @@
     private val statusBarStateController: SysuiStatusBarStateController,
     private val lockscreenShadeTransitionController: LockscreenShadeTransitionController,
     private val mediaDataManager: MediaDataManager,
-    @Main private val resources: Resources
+    @Main private val resources: Resources,
+    private val splitShadeStateController: SplitShadeStateController
 ) {
 
     /**
@@ -181,7 +182,8 @@
 
         // How many notifications we can show at heightWithoutLockscreenConstraints
         var minCountAtHeightWithoutConstraints =
-            if (isMediaShowing && !shouldUseSplitNotificationShade(resources)) 2 else 1
+            if (isMediaShowing && !splitShadeStateController
+                    .shouldUseSplitNotificationShade(resources)) 2 else 1
         log {
             "\t---maxNotifWithoutSavingSpace=$maxNotifWithoutSavingSpace " +
                 "isMediaShowing=$isMediaShowing" +
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
index 4ed31c2..51b6c75 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt
@@ -21,6 +21,7 @@
 import com.android.systemui.R
 import com.android.systemui.common.ui.data.repository.ConfigurationRepository
 import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.statusbar.policy.SplitShadeStateController
 import javax.inject.Inject
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.MutableStateFlow
@@ -36,6 +37,7 @@
 constructor(
     configurationRepository: ConfigurationRepository,
     private val context: Context,
+    private val splitShadeStateController: SplitShadeStateController
 ) {
 
     private val _topPosition = MutableStateFlow(0f)
@@ -47,7 +49,10 @@
             .map { _ ->
                 with(context.resources) {
                     ConfigurationBasedDimensions(
-                        useSplitShade = getBoolean(R.bool.config_use_split_notification_shade),
+                        useSplitShade =
+                            splitShadeStateController.shouldUseSplitNotificationShade(
+                                context.resources
+                            ),
                         useLargeScreenHeader =
                             getBoolean(R.bool.config_use_large_screen_shade_header),
                         marginHorizontal =
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
index 6f4adeb..f750fed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
@@ -44,7 +44,13 @@
     shadeInteractor: ShadeInteractor,
 ) {
     private val statesForConstrainedNotifications =
-        setOf(KeyguardState.LOCKSCREEN, KeyguardState.AOD, KeyguardState.DOZING)
+        setOf(
+            KeyguardState.LOCKSCREEN,
+            KeyguardState.AOD,
+            KeyguardState.DOZING,
+            KeyguardState.ALTERNATE_BOUNCER,
+            KeyguardState.PRIMARY_BOUNCER
+        )
 
     val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> =
         interactor.configurationBasedDimensions
@@ -126,6 +132,7 @@
     /**
      * When on keyguard, there is limited space to display notifications so calculate how many could
      * be shown. Otherwise, there is no limit since the vertical space will be scrollable.
+     *
      * TODO: b/296606746 - Need to rerun logic when notifs change
      */
     val maxNotifications: Flow<Int> =
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 0031b574..3b9afa1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -17,8 +17,6 @@
 package com.android.systemui.statusbar.phone;
 
 import static android.app.StatusBarManager.SESSION_KEYGUARD;
-
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
 import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
 import static com.android.systemui.keyguard.WakefulnessLifecycle.UNKNOWN_LAST_WAKE_TIME;
 
@@ -702,8 +700,7 @@
         }
 
         final boolean screenOff = !mUpdateMonitor.isDeviceInteractive();
-        if (!mVibratorHelper.hasVibrator() && (screenOff || (mUpdateMonitor.isDreaming()
-                && !mFeatureFlags.isEnabled(FP_LISTEN_OCCLUDING_APPS)))) {
+        if (!mVibratorHelper.hasVibrator() && screenOff) {
             mLogger.d("wakeup device on authentication failure (device doesn't have a vibrator)");
             startWakeAndUnlock(MODE_ONLY_WAKE);
         } else if (biometricSourceType == BiometricSourceType.FINGERPRINT
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
index 67c0c94..cfa481e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
@@ -265,10 +265,6 @@
 
     boolean isOverviewEnabled();
 
-    void showPinningEnterExitToast(boolean entering);
-
-    void showPinningEscapeToast();
-
     void setBouncerShowing(boolean bouncerShowing);
 
     boolean isScreenFullyOff();
@@ -295,16 +291,12 @@
     @VisibleForTesting
     void updateScrimController();
 
-    boolean isKeyguardShowing();
-
     boolean shouldIgnoreTouch();
 
     boolean isDeviceInteractive();
 
     void awakenDreams();
 
-    void clearNotificationEffects();
-
     boolean isBouncerShowing();
 
     boolean isBouncerShowingScrimmed();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
index 0a57046..28bb581 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
@@ -510,16 +510,6 @@
     }
 
     @Override
-    public void showPinningEnterExitToast(boolean entering) {
-        mCentralSurfaces.showPinningEnterExitToast(entering);
-    }
-
-    @Override
-    public void showPinningEscapeToast() {
-        mCentralSurfaces.showPinningEscapeToast();
-    }
-
-    @Override
     public void showScreenPinningRequest(int taskId) {
         if (mKeyguardStateController.isShowing()) {
             // Don't allow apps to trigger this from keyguard.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
index 98ba6d9..ff380db 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesEmptyImpl.kt
@@ -69,8 +69,6 @@
     ) {}
     override fun getNavigationBarView(): NavigationBarView? = null
     override fun isOverviewEnabled() = false
-    override fun showPinningEnterExitToast(entering: Boolean) {}
-    override fun showPinningEscapeToast() {}
     override fun setBouncerShowing(bouncerShowing: Boolean) {}
     override fun isScreenFullyOff() = false
     override fun showScreenPinningRequest(taskId: Int, allowCancel: Boolean) {}
@@ -81,11 +79,9 @@
     override fun setTransitionToFullShadeProgress(transitionToFullShadeProgress: Float) {}
     override fun setPrimaryBouncerHiddenFraction(expansion: Float) {}
     override fun updateScrimController() {}
-    override fun isKeyguardShowing() = false
     override fun shouldIgnoreTouch() = false
     override fun isDeviceInteractive() = false
     override fun awakenDreams() {}
-    override fun clearNotificationEffects() {}
     override fun isBouncerShowing() = false
     override fun isBouncerShowingScrimmed() = false
     override fun isBouncerShowingOverDream() = false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index b797c63..490c469 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -24,11 +24,9 @@
 import static android.view.WindowInsetsController.APPEARANCE_LOW_PROFILE_BARS;
 import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_STATUS_BARS;
 import static android.view.WindowInsetsController.APPEARANCE_SEMI_TRANSPARENT_STATUS_BARS;
-
 import static androidx.core.view.ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO;
 import static androidx.core.view.ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
 import static androidx.lifecycle.Lifecycle.State.RESUMED;
-
 import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
 import static com.android.systemui.charging.WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL;
 import static com.android.systemui.statusbar.NotificationLockscreenUserManager.PERMISSION_SELF;
@@ -1433,7 +1431,7 @@
         // - QS is expanded and we're swiping - swiping up now will hide QS, not dismiss the
         //   keyguard.
         // - Shade is in QQS over keyguard - swiping up should take us back to keyguard
-        if (!isKeyguardShowing()
+        if (!mKeyguardStateController.isShowing()
                 || mStatusBarKeyguardViewManager.primaryBouncerIsOrWillBeShowing()
                 || mKeyguardStateController.isOccluded()
                 || !mKeyguardStateController.canDismissLockScreen()
@@ -2548,16 +2546,6 @@
         return mNavigationBarController.isOverviewEnabled(mDisplayId);
     }
 
-    @Override
-    public void showPinningEnterExitToast(boolean entering) {
-        mNavigationBarController.showPinningEnterExitToast(mDisplayId, entering);
-    }
-
-    @Override
-    public void showPinningEscapeToast() {
-        mNavigationBarController.showPinningEscapeToast(mDisplayId);
-    }
-
     /**
      * Propagation of the bouncer state, indicating that it's fully visible.
      */
@@ -2680,6 +2668,7 @@
                                     && mStatusBarStateController.getDozeAmount() == 1f
                                     && mWakefulnessLifecycle.getLastWakeReason()
                                     == PowerManager.WAKE_REASON_POWER_BUTTON
+                                    && mFingerprintManager.get() != null
                                     && mFingerprintManager.get().isPowerbuttonFps()
                                     && mKeyguardUpdateMonitor
                                     .getCachedIsUnlockWithFingerprintPossible(
@@ -2882,7 +2871,8 @@
         if (mDevicePolicyManager.getCameraDisabled(null,
                 mLockscreenUserManager.getCurrentUserId())) {
             return false;
-        } else if (isKeyguardShowing() && mStatusBarKeyguardViewManager.isSecure()) {
+        } else if (mKeyguardStateController.isShowing()
+                && mStatusBarKeyguardViewManager.isSecure()) {
             // Check if the admin has disabled the camera specifically for the keyguard
             return (mDevicePolicyManager.getKeyguardDisabledFeatures(null,
                     mLockscreenUserManager.getCurrentUserId())
@@ -2998,12 +2988,6 @@
 
         Trace.endSection();
     }
-
-    @Override
-    public boolean isKeyguardShowing() {
-        return mKeyguardStateController.isShowing();
-    }
-
     @Override
     public boolean shouldIgnoreTouch() {
         return (mStatusBarStateController.isDozing()
@@ -3152,11 +3136,7 @@
         }
     }
 
-    /**
-     * Clear Buzz/Beep/Blink.
-     */
-    @Override
-    public void clearNotificationEffects() {
+    private void clearNotificationEffects() {
         try {
             mBarService.clearNotificationEffects();
         } catch (RemoteException e) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
index 16c2e36..dcbaac2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
@@ -17,9 +17,11 @@
 package com.android.systemui.statusbar.phone;
 
 import android.content.Context;
+import android.os.RemoteException;
 import android.view.MotionEvent;
 import android.view.ViewConfiguration;
 
+import com.android.internal.statusbar.IStatusBarService;
 import com.android.systemui.Gefingerpoken;
 import com.android.systemui.statusbar.notification.collection.NotificationEntry;
 import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
@@ -31,6 +33,7 @@
 public class HeadsUpTouchHelper implements Gefingerpoken {
 
     private final HeadsUpManagerPhone mHeadsUpManager;
+    private final IStatusBarService mStatusBarService;
     private final Callback mCallback;
     private int mTrackingPointer;
     private final float mTouchSlop;
@@ -43,9 +46,11 @@
     private ExpandableNotificationRow mPickedChild;
 
     public HeadsUpTouchHelper(HeadsUpManagerPhone headsUpManager,
+            IStatusBarService statusBarService,
             Callback callback,
             HeadsUpNotificationViewController notificationPanelView) {
         mHeadsUpManager = headsUpManager;
+        mStatusBarService = statusBarService;
         mCallback = callback;
         mPanel = notificationPanelView;
         Context context = mCallback.getContext();
@@ -119,7 +124,7 @@
                     // This call needs to be after the expansion start otherwise we will get a
                     // flicker of one frame as it's not expanded yet.
                     mHeadsUpManager.unpinAll(true);
-                    mPanel.clearNotificationEffects();
+                    clearNotificationEffects();
                     endMotion();
                     return true;
                 }
@@ -175,6 +180,14 @@
         mTouchingHeadsUpView = false;
     }
 
+    private void clearNotificationEffects() {
+        try {
+            mStatusBarService.clearNotificationEffects();
+        } catch (RemoteException e) {
+            // Won't fail unless the world has ended.
+        }
+    }
+
     public interface Callback {
         ExpandableView getChildAtRawPosition(float touchX, float touchY);
         boolean isExpanded();
@@ -191,8 +204,5 @@
 
         /** Called when a MotionEvent is about to trigger expansion. */
         void startExpand(float newX, float newY, boolean startTracking, float expandedHeight);
-
-        /** Clear any effects that were added for the expansion. */
-        void clearNotificationEffects();
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
index cdd410e..47ab316 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.kt
@@ -20,7 +20,6 @@
 import android.util.AttributeSet
 import android.view.View
 import android.view.ViewGroup
-import android.view.ViewPropertyAnimator
 import android.view.WindowInsets
 import android.widget.FrameLayout
 import androidx.annotation.StringRes
@@ -32,7 +31,6 @@
 import com.android.systemui.plugins.ActivityStarter
 import com.android.systemui.plugins.FalsingManager
 import com.android.systemui.statusbar.VibratorHelper
-import com.android.systemui.util.animation.requiresRemeasuring
 
 /**
  * Renders the bottom area of the lock-screen. Concerned primarily with the quick affordance UI
@@ -61,6 +59,7 @@
     }
 
     private var ambientIndicationArea: View? = null
+    private var keyguardIndicationArea: View? = null
     private var binding: KeyguardBottomAreaViewBinder.Binding? = null
     private var lockIconViewController: LockIconViewController? = null
 
@@ -124,14 +123,15 @@
     override fun onConfigurationChanged(newConfig: Configuration) {
         super.onConfigurationChanged(newConfig)
         binding?.onConfigurationChanged()
+
+        keyguardIndicationArea?.let {
+            val params = it.layoutParams as FrameLayout.LayoutParams
+            params.bottomMargin =
+                resources.getDimensionPixelSize(R.dimen.keyguard_indication_margin_bottom)
+            it.layoutParams = params
+        }
     }
 
-    /** Returns a list of animators to use to animate the indication areas. */
-    @Deprecated("Deprecated as part of b/278057014")
-    val indicationAreaAnimators: List<ViewPropertyAnimator>
-        get() = checkNotNull(binding).getIndicationAreaAnimators()
-
-
     override fun hasOverlappingRendering(): Boolean {
         return false
     }
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 83a040c..1966033 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -40,6 +40,7 @@
 import com.android.systemui.plugins.DarkIconDispatcher;
 import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
 import com.android.systemui.statusbar.phone.userswitcher.StatusBarUserSwitcherContainer;
+import com.android.systemui.statusbar.policy.Clock;
 import com.android.systemui.user.ui.binder.StatusBarUserChipViewBinder;
 import com.android.systemui.user.ui.viewmodel.StatusBarUserChipViewModel;
 import com.android.systemui.util.leak.RotationUtils;
@@ -51,7 +52,7 @@
     private final StatusBarContentInsetsProvider mContentInsetsProvider;
 
     private DarkReceiver mBattery;
-    private DarkReceiver mClock;
+    private Clock mClock;
     private int mRotationOrientation = -1;
     @Nullable
     private View mCutoutSpace;
@@ -123,6 +124,10 @@
         }
     }
 
+    void onDensityOrFontScaleChanged() {
+        mClock.onDensityOrFontScaleChanged();
+    }
+
     @Override
     public WindowInsets onApplyWindowInsets(WindowInsets insets) {
         if (updateDisplayParameters()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
index 23b0ee0..fc5f915 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
@@ -75,6 +75,10 @@
             override fun onConfigChanged(newConfig: Configuration?) {
                 mView.updateResources()
             }
+
+            override fun onDensityOrFontScaleChanged() {
+                mView.onDensityOrFontScaleChanged()
+            }
         }
 
     override fun onViewAttached() {
@@ -82,6 +86,10 @@
         statusContainer.setOnHoverListener(
             statusOverlayHoverListenerFactory.createDarkAwareListener(statusContainer)
         )
+
+        progressProvider?.setReadyToHandleTransition(true)
+        configurationController.addCallback(configurationListener)
+
         if (moveFromCenterAnimationController == null) return
 
         val statusBarLeftSide: View =
@@ -106,9 +114,6 @@
                 moveFromCenterAnimationController.onStatusBarWidthChanged()
             }
         }
-
-        progressProvider?.setReadyToHandleTransition(true)
-        configurationController.addCallback(configurationListener)
     }
 
     override fun onViewDetached() {
@@ -206,7 +211,6 @@
                     shadeLogger.logMotionEvent(event, "top edge touch ignored")
                     return true
                 }
-                shadeViewController.startTrackingExpansionFromStatusBar()
             }
             return shadeViewController.handleExternalTouch(event)
         }
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 27b8406..e337215 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -17,7 +17,6 @@
 package com.android.systemui.statusbar.phone;
 
 import static android.view.WindowInsets.Type.navigationBars;
-
 import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_HIDDEN;
 import static com.android.systemui.plugins.ActivityStarter.OnDismissAction;
 import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK;
@@ -67,9 +66,12 @@
 import com.android.systemui.dreams.DreamOverlayStateController;
 import com.android.systemui.flags.FeatureFlags;
 import com.android.systemui.flags.Flags;
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor;
 import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor;
 import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
 import com.android.systemui.keyguard.domain.interactor.WindowManagerLockscreenVisibilityInteractor;
+import com.android.systemui.keyguard.shared.model.DismissAction;
+import com.android.systemui.keyguard.shared.model.KeyguardDone;
 import com.android.systemui.navigationbar.NavigationBarView;
 import com.android.systemui.navigationbar.NavigationModeController;
 import com.android.systemui.navigationbar.TaskbarDelegate;
@@ -104,6 +106,7 @@
 import javax.inject.Inject;
 
 import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.ExperimentalCoroutinesApi;
 
 /**
  * Manages creating, showing, hiding and resetting the keyguard within the status bar. Calls back
@@ -111,7 +114,7 @@
  * which is in turn, reported to this class by the current
  * {@link com.android.keyguard.KeyguardViewController}.
  */
-@SysUISingleton
+@ExperimentalCoroutinesApi @SysUISingleton
 public class StatusBarKeyguardViewManager implements RemoteInputController.Callback,
         StatusBarStateController.StateListener, ConfigurationController.ConfigurationListener,
         ShadeExpansionListener, NavigationModeController.ModeChangedListener,
@@ -338,6 +341,7 @@
         }
     };
     private Lazy<WindowManagerLockscreenVisibilityInteractor> mWmLockscreenVisibilityInteractor;
+    private Lazy<KeyguardDismissActionInteractor> mKeyguardDismissActionInteractor;
 
     @Inject
     public StatusBarKeyguardViewManager(
@@ -367,7 +371,8 @@
             ActivityStarter activityStarter,
             KeyguardTransitionInteractor keyguardTransitionInteractor,
             @Main CoroutineDispatcher mainDispatcher,
-            Lazy<WindowManagerLockscreenVisibilityInteractor> wmLockscreenVisibilityInteractor
+            Lazy<WindowManagerLockscreenVisibilityInteractor> wmLockscreenVisibilityInteractor,
+            Lazy<KeyguardDismissActionInteractor> keyguardDismissActionInteractorLazy
     ) {
         mContext = context;
         mViewMediatorCallback = callback;
@@ -400,6 +405,7 @@
         mKeyguardTransitionInteractor = keyguardTransitionInteractor;
         mMainDispatcher = mainDispatcher;
         mWmLockscreenVisibilityInteractor = wmLockscreenVisibilityInteractor;
+        mKeyguardDismissActionInteractor = keyguardDismissActionInteractorLazy;
     }
 
     KeyguardTransitionInteractor mKeyguardTransitionInteractor;
@@ -559,7 +565,6 @@
                 && !mKeyguardStateController.isOccluded()
                 && !mKeyguardStateController.canDismissLockScreen()
                 && !bouncerIsAnimatingAway()
-                && !mShadeViewController.isUnlockHintRunning()
                 && !(mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED);
     }
 
@@ -692,6 +697,45 @@
 
     public void dismissWithAction(OnDismissAction r, Runnable cancelAction,
             boolean afterKeyguardGone, String message) {
+        if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            if (r == null) {
+                return;
+            }
+            Trace.beginSection("StatusBarKeyguardViewManager#interactorDismissWithAction");
+            if (afterKeyguardGone) {
+                mKeyguardDismissActionInteractor.get().setDismissAction(
+                        new DismissAction.RunAfterKeyguardGone(
+                                () -> {
+                                    r.onDismiss();
+                                    return null;
+                                },
+                                (cancelAction != null) ? cancelAction : () -> {},
+                                message == null ? "" : message,
+                                r.willRunAnimationOnKeyguard()
+                        )
+                );
+            } else {
+                mKeyguardDismissActionInteractor.get().setDismissAction(
+                        new DismissAction.RunImmediately(
+                                () -> {
+                                    if (r.onDismiss()) {
+                                        return KeyguardDone.LATER;
+                                    } else {
+                                        return KeyguardDone.IMMEDIATE;
+                                    }
+                                },
+                                (cancelAction != null) ? cancelAction : () -> {},
+                                message == null ? "" : message,
+                                r.willRunAnimationOnKeyguard()
+                        )
+                );
+            }
+
+            showBouncer(true);
+            Trace.endSection();
+            return;
+        }
+
         if (mKeyguardStateController.isShowing()) {
             try {
                 Trace.beginSection("StatusBarKeyguardViewManager#dismissWithAction");
@@ -705,9 +749,12 @@
                     return;
                 }
 
-                mAfterKeyguardGoneAction = r;
-                mKeyguardGoneCancelAction = cancelAction;
-                mDismissActionWillAnimateOnKeyguard = r != null && r.willRunAnimationOnKeyguard();
+                if (!mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+                    mAfterKeyguardGoneAction = r;
+                    mKeyguardGoneCancelAction = cancelAction;
+                    mDismissActionWillAnimateOnKeyguard = r != null
+                            && r.willRunAnimationOnKeyguard();
+                }
 
                 // If there is an alternate auth interceptor (like the UDFPS), show that one
                 // instead of the bouncer.
@@ -755,6 +802,12 @@
      * Adds a {@param runnable} to be executed after Keyguard is gone.
      */
     public void addAfterKeyguardGoneRunnable(Runnable runnable) {
+        if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            if (runnable != null) {
+                mKeyguardDismissActionInteractor.get().runAfterKeyguardGone(runnable);
+            }
+            return;
+        }
         mAfterKeyguardGoneRunnables.add(runnable);
     }
 
@@ -936,7 +989,11 @@
             // We update the state (which will show the keyguard) only if an animation will run on
             // the keyguard. If there is no animation, we wait before updating the state so that we
             // go directly from bouncer to launcher/app.
-            if (mDismissActionWillAnimateOnKeyguard) {
+            if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+                if (mKeyguardDismissActionInteractor.get().runDismissAnimationOnKeyguard()) {
+                    updateStates();
+                }
+            } else if (mDismissActionWillAnimateOnKeyguard) {
                 updateStates();
             }
         } else if (finishRunnable != null) {
@@ -1059,6 +1116,9 @@
     }
 
     private void executeAfterKeyguardGoneAction() {
+        if (mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT)) {
+            return;
+        }
         if (mAfterKeyguardGoneAction != null) {
             mAfterKeyguardGoneAction.onDismiss();
             mAfterKeyguardGoneAction = null;
@@ -1351,10 +1411,10 @@
 
     /**
      * Notifies that the user has authenticated by other means than using the bouncer, for example,
-     * fingerprint.
+     * fingerprint and the keyguard should immediately dismiss.
      */
     public void notifyKeyguardAuthenticated(boolean strongAuth) {
-        mPrimaryBouncerInteractor.notifyKeyguardAuthenticated(strongAuth);
+        mPrimaryBouncerInteractor.notifyKeyguardAuthenticatedBiometrics(strongAuth);
 
         if (mAlternateBouncerInteractor.isVisibleState()) {
             hideAlternateBouncer(false);
@@ -1442,6 +1502,8 @@
         pw.println("  isBouncerShowing(): " + isBouncerShowing());
         pw.println("  bouncerIsOrWillBeShowing(): " + primaryBouncerIsOrWillBeShowing());
         pw.println("  Registered KeyguardViewManagerCallbacks:");
+        pw.println(" refactorKeyguardDismissIntent enabled:"
+                + mFlags.isEnabled(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT));
         for (KeyguardViewManagerCallback callback : mCallbacks) {
             pw.println("      " + callback);
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
index ecc996c..53662f4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
@@ -53,8 +53,8 @@
 import com.android.systemui.statusbar.notification.collection.NotificationEntry;
 import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
 import com.android.systemui.statusbar.notification.domain.interactor.NotificationsInteractor;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
 import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor;
+import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider;
 import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
 import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
 import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
@@ -116,7 +116,7 @@
             NotificationMediaManager notificationMediaManager,
             NotificationGutsManager notificationGutsManager,
             InitController initController,
-            NotificationInterruptStateProvider notificationInterruptStateProvider,
+            VisualInterruptionDecisionProvider visualInterruptionDecisionProvider,
             NotificationRemoteInputManager remoteInputManager,
             NotificationRemoteInputManager.Callback remoteInputManagerCallback,
             NotificationListContainer notificationListContainer) {
@@ -162,7 +162,7 @@
         initController.addPostInitTask(() -> {
             mNotifShadeEventSource.setShadeEmptiedCallback(this::maybeClosePanelForShadeEmptied);
             mNotifShadeEventSource.setNotifRemovedByUserCallback(this::maybeEndAmbientPulse);
-            notificationInterruptStateProvider.addSuppressor(mInterruptSuppressor);
+            visualInterruptionDecisionProvider.addLegacySuppressor(mInterruptSuppressor);
             mLockscreenUserManager.setUpWithPresenter(this);
             mGutsManager.setUpWithPresenter(
                     this, mNotifListContainer, mOnSettingsClickListener);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialogFactory.kt
index 3b15065..d91ca92 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialogFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialogFactory.kt
@@ -48,13 +48,14 @@
      */
     fun create(
         context: Context = this.applicationContext,
+        theme: Int = SystemUIDialog.DEFAULT_THEME,
         dismissOnDeviceLock: Boolean = SystemUIDialog.DEFAULT_DISMISS_ON_DEVICE_LOCK,
     ): ComponentSystemUIDialog {
         Assert.isMainThread()
 
         return ComponentSystemUIDialog(
             context,
-            SystemUIDialog.DEFAULT_THEME,
+            theme,
             dismissOnDeviceLock,
             featureFlags,
             dialogManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
index 249ca35..7ec8e12 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt
@@ -19,7 +19,6 @@
 import android.content.res.ColorStateList
 import android.view.View
 import android.view.View.GONE
-import android.view.View.INVISIBLE
 import android.view.View.VISIBLE
 import android.view.ViewGroup
 import android.widget.ImageView
@@ -34,12 +33,11 @@
 import com.android.systemui.common.ui.binder.IconViewBinder
 import com.android.systemui.lifecycle.repeatWhenAttached
 import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.StatusBarIconView.STATE_DOT
 import com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN
-import com.android.systemui.statusbar.StatusBarIconView.STATE_ICON
 import com.android.systemui.statusbar.pipeline.mobile.ui.MobileViewLogger
 import com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel.LocationBasedMobileViewModel
 import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewBinding
+import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewVisibilityHelper
 import kotlinx.coroutines.awaitCancellation
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.distinctUntilChanged
@@ -106,20 +104,11 @@
 
                     launch {
                         visibilityState.collect { state ->
-                            when (state) {
-                                STATE_ICON -> {
-                                    mobileGroupView.visibility = VISIBLE
-                                    dotView.visibility = GONE
-                                }
-                                STATE_DOT -> {
-                                    mobileGroupView.visibility = INVISIBLE
-                                    dotView.visibility = VISIBLE
-                                }
-                                STATE_HIDDEN -> {
-                                    mobileGroupView.visibility = INVISIBLE
-                                    dotView.visibility = INVISIBLE
-                                }
-                            }
+                            ModernStatusBarViewVisibilityHelper.setVisibilityState(
+                                state,
+                                mobileGroupView,
+                                dotView,
+                            )
                         }
                     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt
new file mode 100644
index 0000000..6668cbc
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/ModernStatusBarViewVisibilityHelper.kt
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.pipeline.shared.ui.binder
+
+import android.view.View
+import com.android.systemui.statusbar.StatusBarIconView
+import com.android.systemui.statusbar.pipeline.mobile.ui.binder.MobileIconBinder
+import com.android.systemui.statusbar.pipeline.wifi.ui.binder.WifiViewBinder
+
+/**
+ * The helper to update the groupView and dotView visibility based on given visibility state, only
+ * used for [MobileIconBinder] and [WifiViewBinder] now.
+ */
+class ModernStatusBarViewVisibilityHelper {
+    companion object {
+
+        fun setVisibilityState(
+            @StatusBarIconView.VisibleState state: Int,
+            groupView: View,
+            dotView: View,
+        ) {
+            when (state) {
+                StatusBarIconView.STATE_ICON -> {
+                    groupView.visibility = View.VISIBLE
+                    dotView.visibility = View.GONE
+                }
+                StatusBarIconView.STATE_DOT -> {
+                    groupView.visibility = View.INVISIBLE
+                    dotView.visibility = View.VISIBLE
+                }
+                StatusBarIconView.STATE_HIDDEN -> {
+                    groupView.visibility = View.INVISIBLE
+                    dotView.visibility = View.INVISIBLE
+                }
+            }
+        }
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
index 3082a66..e593575 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/binder/WifiViewBinder.kt
@@ -27,10 +27,9 @@
 import com.android.systemui.common.ui.binder.IconViewBinder
 import com.android.systemui.lifecycle.repeatWhenAttached
 import com.android.systemui.statusbar.StatusBarIconView
-import com.android.systemui.statusbar.StatusBarIconView.STATE_DOT
 import com.android.systemui.statusbar.StatusBarIconView.STATE_HIDDEN
-import com.android.systemui.statusbar.StatusBarIconView.STATE_ICON
 import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewBinding
+import com.android.systemui.statusbar.pipeline.shared.ui.binder.ModernStatusBarViewVisibilityHelper
 import com.android.systemui.statusbar.pipeline.wifi.ui.model.WifiIcon
 import com.android.systemui.statusbar.pipeline.wifi.ui.viewmodel.LocationBasedWifiViewModel
 import kotlinx.coroutines.InternalCoroutinesApi
@@ -83,8 +82,18 @@
 
                 launch {
                     visibilityState.collect { visibilityState ->
-                        groupView.isVisible = visibilityState == STATE_ICON
-                        dotView.isVisible = visibilityState == STATE_DOT
+                        // for b/296864006, we can not hide all the child views if visibilityState
+                        // is STATE_HIDDEN. Because hiding all child views would cause the
+                        // getWidth() of this view return 0, and that would cause the translation
+                        // calculation fails in StatusIconContainer. Therefore, like class
+                        // MobileIconBinder, instead of set the child views visibility to View.GONE,
+                        // we set their visibility to View.INVISIBLE to make them invisible but
+                        // keep the width.
+                        ModernStatusBarViewVisibilityHelper.setVisibilityState(
+                            visibilityState,
+                            groupView,
+                            dotView,
+                        )
                     }
                 }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
index ba5fa1d..3d51ab0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AospPolicyModule.java
@@ -45,6 +45,7 @@
             BroadcastDispatcher broadcastDispatcher,
             DemoModeController demoModeController,
             DumpManager dumpManager,
+            BatteryControllerLogger logger,
             @Main Handler mainHandler,
             @Background Handler bgHandler) {
         BatteryController bC = new BatteryControllerImpl(
@@ -54,6 +55,7 @@
                 broadcastDispatcher,
                 demoModeController,
                 dumpManager,
+                logger,
                 mainHandler,
                 bgHandler);
         bC.init();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
index 4b51511..41ed76d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
@@ -20,7 +20,6 @@
 import static android.os.BatteryManager.CHARGING_POLICY_DEFAULT;
 import static android.os.BatteryManager.EXTRA_CHARGING_STATUS;
 import static android.os.BatteryManager.EXTRA_PRESENT;
-
 import static com.android.settingslib.fuelgauge.BatterySaverLogging.SAVER_ENABLED_QS;
 import static com.android.systemui.util.DumpUtilsKt.asIndenting;
 
@@ -85,6 +84,7 @@
     private final PowerManager mPowerManager;
     private final DemoModeController mDemoModeController;
     private final DumpManager mDumpManager;
+    private final BatteryControllerLogger mLogger;
     private final Handler mMainHandler;
     private final Handler mBgHandler;
     protected final Context mContext;
@@ -122,6 +122,7 @@
             BroadcastDispatcher broadcastDispatcher,
             DemoModeController demoModeController,
             DumpManager dumpManager,
+            BatteryControllerLogger logger,
             @Main Handler mainHandler,
             @Background Handler bgHandler) {
         mContext = context;
@@ -132,6 +133,8 @@
         mBroadcastDispatcher = broadcastDispatcher;
         mDemoModeController = demoModeController;
         mDumpManager = dumpManager;
+        mLogger = logger;
+        mLogger.logBatteryControllerInstance(this);
     }
 
     private void registerReceiver() {
@@ -145,6 +148,7 @@
 
     @Override
     public void init() {
+        mLogger.logBatteryControllerInit(this, mHasReceivedBattery);
         registerReceiver();
         if (!mHasReceivedBattery) {
             // Get initial state. Relying on Sticky behavior until API for getting info.
@@ -232,8 +236,13 @@
     @Override
     public void onReceive(final Context context, Intent intent) {
         final String action = intent.getAction();
+        mLogger.logIntentReceived(action);
         if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
-            if (mTestMode && !intent.getBooleanExtra("testmode", false)) return;
+            mLogger.logBatteryChangedIntent(intent);
+            if (mTestMode && !intent.getBooleanExtra("testmode", false)) {
+                mLogger.logBatteryChangedSkipBecauseTest();
+                return;
+            }
             mHasReceivedBattery = true;
             mLevel = (int) (100f
                     * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0)
@@ -275,6 +284,7 @@
                 fireIsIncompatibleChargingChanged();
             }
         } else if (action.equals(ACTION_LEVEL_TEST)) {
+            mLogger.logEnterTestMode();
             mTestMode = true;
             mMainHandler.post(new Runnable() {
                 int mCurrentLevel = 0;
@@ -286,6 +296,7 @@
                 @Override
                 public void run() {
                     if (mCurrentLevel < 0) {
+                        mLogger.logExitTestMode();
                         mTestMode = false;
                         mTestIntent.putExtra("level", mSavedLevel);
                         mTestIntent.putExtra("plugged", mSavedPluggedIn);
@@ -438,6 +449,7 @@
     }
 
     protected void fireBatteryLevelChanged() {
+        mLogger.logBatteryLevelChangedCallback(mLevel, mPluggedIn, mCharging);
         synchronized (mChangeCallbacks) {
             final int N = mChangeCallbacks.size();
             for (int i = 0; i < N; i++) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt
new file mode 100644
index 0000000..4a2a2db
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerLogger.kt
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.Intent
+import android.os.BatteryManager.EXTRA_LEVEL
+import android.os.BatteryManager.EXTRA_SCALE
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.statusbar.policy.dagger.BatteryControllerLog
+import javax.inject.Inject
+
+/** Detailed, [LogBuffer]-backed logs for [BatteryControllerImpl] */
+@SysUISingleton
+class BatteryControllerLogger
+@Inject
+constructor(@BatteryControllerLog private val logBuffer: LogBuffer) {
+    fun logBatteryControllerInstance(controller: BatteryController) {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            { int1 = System.identityHashCode(controller) },
+            { "BatteryController CREATE (${Integer.toHexString(int1)})" }
+        )
+    }
+
+    fun logBatteryControllerInit(controller: BatteryController, hasReceivedBattery: Boolean) {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            {
+                int1 = System.identityHashCode(controller)
+                bool1 = hasReceivedBattery
+            },
+            { "BatteryController INIT (${Integer.toHexString(int1)}) hasReceivedBattery=$bool1" }
+        )
+    }
+
+    fun logIntentReceived(action: String) {
+        logBuffer.log(TAG, LogLevel.DEBUG, { str1 = action }, { "Received intent $str1" })
+    }
+
+    fun logBatteryChangedIntent(intent: Intent) {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            {
+                int1 = intent.getIntExtra(EXTRA_LEVEL, DEFAULT)
+                int2 = intent.getIntExtra(EXTRA_SCALE, DEFAULT)
+            },
+            { "Processing BATTERY_CHANGED intent. level=${int1.report()} scale=${int2.report()}" }
+        )
+    }
+
+    fun logBatteryChangedSkipBecauseTest() {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            {},
+            { "Detected test intent. Will not execute battery level callbacks." }
+        )
+    }
+
+    fun logEnterTestMode() {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            {},
+            { "Entering test mode for BATTERY_LEVEL_TEST intent" }
+        )
+    }
+
+    fun logExitTestMode() {
+        logBuffer.log(TAG, LogLevel.DEBUG, {}, { "Exiting test mode" })
+    }
+
+    fun logBatteryLevelChangedCallback(level: Int, plugged: Boolean, charging: Boolean) {
+        logBuffer.log(
+            TAG,
+            LogLevel.DEBUG,
+            {
+                int1 = level
+                bool1 = plugged
+                bool2 = charging
+            },
+            {
+                "Sending onBatteryLevelChanged callbacks " +
+                    "with level=$int1, plugged=$bool1, charging=$bool2"
+            }
+        )
+    }
+
+    private fun Int.report(): String =
+        if (this == DEFAULT) {
+            "(missing)"
+        } else {
+            toString()
+        }
+
+    companion object {
+        const val TAG: String = "BatteryControllerLog"
+    }
+}
+
+// Use a token value so we can determine if we got the default
+private const val DEFAULT = -11
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
index 9b0daca..945cc6b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -38,8 +38,6 @@
 import com.android.systemui.dagger.SysUISingleton;
 import com.android.systemui.dagger.qualifiers.Main;
 import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.flags.Flags;
 import com.android.systemui.settings.UserTracker;
 import com.android.systemui.statusbar.policy.bluetooth.BluetoothRepository;
 import com.android.systemui.statusbar.policy.bluetooth.ConnectionStatusModel;
@@ -64,7 +62,6 @@
         CachedBluetoothDevice.Callback, LocalBluetoothProfileManager.ServiceListener {
     private static final String TAG = "BluetoothController";
 
-    private final FeatureFlags mFeatureFlags;
     private final DumpManager mDumpManager;
     private final BluetoothLogger mLogger;
     private final BluetoothRepository mBluetoothRepository;
@@ -89,7 +86,6 @@
     @Inject
     public BluetoothControllerImpl(
             Context context,
-            FeatureFlags featureFlags,
             UserTracker userTracker,
             DumpManager dumpManager,
             BluetoothLogger logger,
@@ -97,7 +93,6 @@
             @Main Looper mainLooper,
             @Nullable LocalBluetoothManager localBluetoothManager,
             @Nullable BluetoothAdapter bluetoothAdapter) {
-        mFeatureFlags = featureFlags;
         mDumpManager = dumpManager;
         mLogger = logger;
         mBluetoothRepository = bluetoothRepository;
@@ -252,37 +247,8 @@
     }
 
     private void updateConnected() {
-        if (mFeatureFlags.isEnabled(Flags.NEW_BLUETOOTH_REPOSITORY)) {
-            mBluetoothRepository.fetchConnectionStatusInBackground(
-                    getDevices(), this::onConnectionStatusFetched);
-        } else {
-            updateConnectedOld();
-        }
-    }
-
-    /** Used only if {@link Flags.NEW_BLUETOOTH_REPOSITORY} is *not* enabled. */
-    private void updateConnectedOld() {
-        // Make sure our connection state is up to date.
-        int state = mLocalBluetoothManager.getBluetoothAdapter().getConnectionState();
-        List<CachedBluetoothDevice> newList = new ArrayList<>();
-        // If any of the devices are in a higher state than the adapter, move the adapter into
-        // that state.
-        for (CachedBluetoothDevice device : getDevices()) {
-            int maxDeviceState = device.getMaxConnectionState();
-            if (maxDeviceState > state) {
-                state = maxDeviceState;
-            }
-            if (device.isConnected()) {
-                newList.add(device);
-            }
-        }
-
-        if (newList.isEmpty() && state == BluetoothAdapter.STATE_CONNECTED) {
-            // If somehow we think we are connected, but have no connected devices, we aren't
-            // connected.
-            state = BluetoothAdapter.STATE_DISCONNECTED;
-        }
-        onConnectionStatusFetched(new ConnectionStatusModel(state, newList));
+        mBluetoothRepository.fetchConnectionStatusInBackground(
+                getDevices(), this::onConnectionStatusFetched);
     }
 
     private void onConnectionStatusFetched(ConnectionStatusModel status) {
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 f994372..b7ae233 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -37,9 +37,11 @@
 import android.text.style.CharacterStyle;
 import android.text.style.RelativeSizeSpan;
 import android.util.AttributeSet;
+import android.util.TypedValue;
 import android.view.ContextThemeWrapper;
 import android.view.Display;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.TextView;
 
 import com.android.settingslib.Utils;
@@ -143,6 +145,8 @@
         }
         mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
         mUserTracker = Dependency.get(UserTracker.class);
+
+        setIncludeFontPadding(false);
     }
 
     @Override
@@ -389,6 +393,15 @@
                 mContext.getResources().getDimensionPixelSize(
                         R.dimen.status_bar_clock_end_padding),
                 0);
+
+        float fontHeight = getPaint().getFontMetricsInt(null);
+        setLineHeight(TypedValue.COMPLEX_UNIT_PX, fontHeight);
+
+        ViewGroup.LayoutParams lp = getLayoutParams();
+        if (lp != null) {
+            lp.height = (int) Math.ceil(fontHeight);
+            setLayoutParams(lp);
+        }
     }
 
     private void updateShowSeconds() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
index d5f2d21..67a8e3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisabler.kt
@@ -20,7 +20,6 @@
 import android.content.res.Configuration
 import com.android.systemui.dagger.SysUISingleton
 import com.android.systemui.statusbar.CommandQueue
-import com.android.systemui.util.LargeScreenUtils
 import javax.inject.Inject
 
 /**
@@ -30,9 +29,10 @@
  */
 @SysUISingleton
 class RemoteInputQuickSettingsDisabler @Inject constructor(
-    private val context: Context,
-    private val commandQueue: CommandQueue,
-    configController: ConfigurationController
+        private val context: Context,
+        private val commandQueue: CommandQueue,
+        private val splitShadeStateController: SplitShadeStateController,
+        configController: ConfigurationController
 ) : ConfigurationController.ConfigurationListener {
 
     private var remoteInputActive = false
@@ -43,7 +43,7 @@
         isLandscape =
             context.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE
         shouldUseSplitNotificationShade =
-                LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+                splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
         configController.addCallback(this)
     }
 
@@ -74,7 +74,8 @@
             needToRecompute = true
         }
 
-        val newSplitShadeFlag = LargeScreenUtils.shouldUseSplitNotificationShade(context.resources)
+        val newSplitShadeFlag = splitShadeStateController
+                .shouldUseSplitNotificationShade(context.resources)
         if (newSplitShadeFlag != shouldUseSplitNotificationShade) {
             shouldUseSplitNotificationShade = newSplitShadeFlag
             needToRecompute = true
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt
new file mode 100644
index 0000000..e71c972
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ResourcesSplitShadeStateController.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.Resources
+import com.android.systemui.R
+
+/**
+ * Fake SplitShadeStateController
+ *
+ * Identical behaviour to legacy implementation (that used LargeScreenUtils.kt) I.E., behaviour
+ * based solely on resources, no extra flag logic.
+ */
+class ResourcesSplitShadeStateController : SplitShadeStateController {
+    override fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
+        return resources.getBoolean(R.bool.config_use_split_notification_shade)
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
similarity index 63%
copy from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
copy to packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
index df5cefd..f64d4c6 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
@@ -13,17 +13,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package com.android.systemui.statusbar.policy
 
-package com.android.systemui.biometrics.shared.model
+import android.content.res.Resources
 
-import android.hardware.fingerprint.FingerprintSensorProperties
-
-/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
-enum class FingerprintSensorType {
-    UNKNOWN,
-    REAR,
-    UDFPS_ULTRASONIC,
-    UDFPS_OPTICAL,
-    POWER_BUTTON,
-    HOME_BUTTON,
+/** Source of truth for split shade state: should or should not use split shade. */
+interface SplitShadeStateController {
+    /** Returns true if the device should use the split notification shade. */
+    fun shouldUseSplitNotificationShade(resources: Resources): Boolean
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt
new file mode 100644
index 0000000..ab4a8af
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateControllerImpl.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.Resources
+import com.android.systemui.R
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.flags.FeatureFlags
+import com.android.systemui.flags.Flags
+import javax.inject.Inject
+
+/**
+ * Source of truth for split shade state: should or should not use split shade based on orientation,
+ * screen width, and flags.
+ */
+@SysUISingleton
+class SplitShadeStateControllerImpl @Inject constructor(private val featureFlags: FeatureFlags) :
+    SplitShadeStateController {
+    /**
+     * Returns true if the device should use the split notification shade. Based on orientation,
+     * screen width, and flags.
+     */
+    override fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
+        return (resources.getBoolean(R.bool.config_use_split_notification_shade) ||
+            (featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE) &&
+                resources.getBoolean(R.bool.force_config_use_split_notification_shade)))
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt
similarity index 64%
copy from packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
copy to packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt
index df5cefd..5322b38 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/shared/model/FingerprintSensorType.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/BatteryControllerLog.kt
@@ -14,16 +14,12 @@
  * limitations under the License.
  */
 
-package com.android.systemui.biometrics.shared.model
+package com.android.systemui.statusbar.policy.dagger
 
-import android.hardware.fingerprint.FingerprintSensorProperties
+import javax.inject.Qualifier
 
-/** Fingerprint sensor types. Represents [FingerprintSensorProperties.SensorType]. */
-enum class FingerprintSensorType {
-    UNKNOWN,
-    REAR,
-    UDFPS_ULTRASONIC,
-    UDFPS_OPTICAL,
-    POWER_BUTTON,
-    HOME_BUTTON,
-}
+/** Logs for Battery events. See [BatteryControllerImpl] */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class BatteryControllerLog
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
index c2a8e70..927024f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
@@ -24,6 +24,8 @@
 import com.android.settingslib.devicestate.DeviceStateRotationLockSettingsManager;
 import com.android.systemui.dagger.SysUISingleton;
 import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.log.LogBuffer;
+import com.android.systemui.log.LogBufferFactory;
 import com.android.systemui.settings.UserTracker;
 import com.android.systemui.statusbar.connectivity.AccessPointController;
 import com.android.systemui.statusbar.connectivity.AccessPointControllerImpl;
@@ -31,6 +33,7 @@
 import com.android.systemui.statusbar.connectivity.NetworkControllerImpl;
 import com.android.systemui.statusbar.connectivity.WifiPickerTrackerFactory;
 import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
+import com.android.systemui.statusbar.policy.BatteryControllerLogger;
 import com.android.systemui.statusbar.policy.BluetoothController;
 import com.android.systemui.statusbar.policy.BluetoothControllerImpl;
 import com.android.systemui.statusbar.policy.CastController;
@@ -57,6 +60,8 @@
 import com.android.systemui.statusbar.policy.RotationLockControllerImpl;
 import com.android.systemui.statusbar.policy.SecurityController;
 import com.android.systemui.statusbar.policy.SecurityControllerImpl;
+import com.android.systemui.statusbar.policy.SplitShadeStateController;
+import com.android.systemui.statusbar.policy.SplitShadeStateControllerImpl;
 import com.android.systemui.statusbar.policy.UserInfoController;
 import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
 import com.android.systemui.statusbar.policy.WalletController;
@@ -110,6 +115,11 @@
 
     /** */
     @Binds
+    SplitShadeStateController provideSplitShadeStateController(
+            SplitShadeStateControllerImpl splitShadeStateControllerImpl);
+
+    /** */
+    @Binds
     HotspotController provideHotspotController(HotspotControllerImpl controllerImpl);
 
     /** */
@@ -202,4 +212,13 @@
     static DataSaverController provideDataSaverController(NetworkController networkController) {
         return networkController.getDataSaverController();
     }
+
+    /** Provides a log bufffer for BatteryControllerImpl */
+    @Provides
+    @SysUISingleton
+    @BatteryControllerLog
+    //TODO(b/300147438): reduce the size of this log buffer
+    static LogBuffer provideBatteryControllerLog(LogBufferFactory factory) {
+        return factory.create(BatteryControllerLogger.TAG, 300);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java
index 24987ab..f4cc0ed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowController.java
@@ -21,7 +21,6 @@
 import static android.view.WindowInsets.Type.tappableElement;
 import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
 
 import static com.android.systemui.util.leak.RotationUtils.ROTATION_LANDSCAPE;
 import static com.android.systemui.util.leak.RotationUtils.ROTATION_NONE;
@@ -44,6 +43,7 @@
 import android.view.Surface;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowInsets;
 import android.view.WindowManager;
 
 import com.android.internal.policy.SystemBarUtils;
@@ -361,9 +361,9 @@
                 || state.mIsLaunchAnimationRunning
                 // Don't force-show the status bar if the user has already dismissed it.
                 || state.mOngoingProcessRequiresStatusBarVisible) {
-            mLpChanged.privateFlags |= PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
+            mLpChanged.forciblyShownTypes |= WindowInsets.Type.statusBars();
         } else {
-            mLpChanged.privateFlags &= ~PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
+            mLpChanged.forciblyShownTypes &= ~WindowInsets.Type.statusBars();
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt b/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
index 8b29310..9b241a7 100644
--- a/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/LargeScreenUtils.kt
@@ -4,16 +4,6 @@
 import com.android.systemui.R
 
 object LargeScreenUtils {
-
-    /**
-     * Returns true if the device should use the split notification shade, based on orientation and
-     * screen width.
-     */
-    @JvmStatic
-    fun shouldUseSplitNotificationShade(resources: Resources): Boolean {
-        return resources.getBoolean(R.bool.config_use_split_notification_shade)
-    }
-
     /**
      * Returns true if we should use large screen shade header:
      * [com.android.systemui.statusbar.phone.LargeScreenShadeHeaderController]
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
index 61acacd..33d4097 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt
@@ -113,6 +113,7 @@
         // For posture tests:
         `when`(mockKeyguardPinView.buttons).thenReturn(arrayOf())
         `when`(lockPatternUtils.getPinLength(anyInt())).thenReturn(6)
+        `when`(featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE)).thenReturn(false)
 
         objectKeyguardPINView =
             View.inflate(mContext, R.layout.keyguard_pin_view, null)
@@ -122,6 +123,7 @@
     private fun constructPinViewController(
         mKeyguardPinView: KeyguardPINView
     ): KeyguardPinViewController {
+        mKeyguardPinView.setIsLockScreenLandscapeEnabled(false)
         return KeyguardPinViewController(
             mKeyguardPinView,
             keyguardUpdateMonitor,
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
index 5da919b..7c1861e 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
@@ -43,6 +43,7 @@
 import com.android.systemui.biometrics.FaceAuthAccessibilityDelegate
 import com.android.systemui.biometrics.SideFpsController
 import com.android.systemui.biometrics.SideFpsUiRequestSource
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants
 import com.android.systemui.classifier.FalsingA11yDelegate
 import com.android.systemui.classifier.FalsingCollector
@@ -72,6 +73,7 @@
 import com.android.systemui.util.mockito.whenever
 import com.android.systemui.util.settings.GlobalSettings
 import com.google.common.truth.Truth
+import dagger.Lazy
 import java.util.Optional
 import junit.framework.Assert
 import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -154,6 +156,7 @@
     private lateinit var sceneInteractor: SceneInteractor
     private lateinit var keyguardTransitionInteractor: KeyguardTransitionInteractor
     private lateinit var authenticationInteractor: AuthenticationInteractor
+    @Mock private lateinit var primaryBouncerInteractor: Lazy<PrimaryBouncerInteractor>
     private lateinit var sceneTransitionStateFlow: MutableStateFlow<ObservableTransitionState>
 
     private lateinit var underTest: KeyguardSecurityContainerController
@@ -193,6 +196,7 @@
         featureFlags.set(Flags.REVAMPED_BOUNCER_MESSAGES, true)
         featureFlags.set(Flags.BOUNCER_USER_SWITCHER, false)
         featureFlags.set(Flags.KEYGUARD_WM_STATE_REFACTOR, false)
+        featureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
 
         keyguardPasswordViewController =
             KeyguardPasswordViewController(
@@ -257,7 +261,8 @@
                 userInteractor,
                 deviceProvisionedController,
                 faceAuthAccessibilityDelegate,
-                keyguardTransitionInteractor
+                keyguardTransitionInteractor,
+                primaryBouncerInteractor,
             ) {
                 authenticationInteractor
             }
@@ -381,6 +386,36 @@
     }
 
     @Test
+    fun showSecurityScreen_oneHandedMode_flagEnabled_oneHandedMode_simpin() {
+        testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
+        setupGetSecurityView(SecurityMode.SimPin)
+        verify(view)
+            .initMode(
+                eq(KeyguardSecurityContainer.MODE_ONE_HANDED),
+                eq(globalSettings),
+                eq(falsingManager),
+                eq(userSwitcherController),
+                any(),
+                eq(falsingA11yDelegate)
+            )
+    }
+
+    @Test
+    fun showSecurityScreen_oneHandedMode_flagEnabled_oneHandedMode_simpuk() {
+        testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
+        setupGetSecurityView(SecurityMode.SimPuk)
+        verify(view)
+            .initMode(
+                eq(KeyguardSecurityContainer.MODE_ONE_HANDED),
+                eq(globalSettings),
+                eq(falsingManager),
+                eq(userSwitcherController),
+                any(),
+                eq(falsingA11yDelegate)
+            )
+    }
+
+    @Test
     fun showSecurityScreen_twoHandedMode_flagEnabled_noOneHandedMode() {
         testableResources.addOverride(R.bool.can_use_one_handed_bouncer, true)
         setupGetSecurityView(SecurityMode.Password)
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 0cd82f0..562d3a5 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -29,7 +29,6 @@
 import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UDFPS_OPTICAL;
 import static android.telephony.SubscriptionManager.DATA_ROAMING_DISABLE;
 import static android.telephony.SubscriptionManager.NAME_SOURCE_CARRIER_ID;
-
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST;
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT;
 import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
@@ -39,16 +38,11 @@
 import static com.android.keyguard.KeyguardUpdateMonitor.DEFAULT_CANCEL_SIGNAL_TIMEOUT;
 import static com.android.keyguard.KeyguardUpdateMonitor.HAL_POWER_PRESS_TIMEOUT;
 import static com.android.keyguard.KeyguardUpdateMonitor.getCurrentUser;
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
-import static com.android.systemui.flags.Flags.STOP_FACE_AUTH_ON_DISPLAY_OFF;
 import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
 import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_OPENED;
 import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_UNKNOWN;
-
 import static com.google.common.truth.Truth.assertThat;
-
 import static junit.framework.Assert.assertEquals;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -145,7 +139,6 @@
 import com.android.systemui.biometrics.FingerprintInteractiveToAuthProvider;
 import com.android.systemui.broadcast.BroadcastDispatcher;
 import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FakeFeatureFlags;
 import com.android.systemui.log.SessionTracker;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.settings.FakeDisplayTracker;
@@ -299,7 +292,6 @@
     private final Executor mBackgroundExecutor = Runnable::run;
     private final Executor mMainExecutor = Runnable::run;
     private TestableLooper mTestableLooper;
-    private FakeFeatureFlags mFeatureFlags;
     private Handler mHandler;
     private TestableKeyguardUpdateMonitor mKeyguardUpdateMonitor;
     private MockitoSession mMockitoSession;
@@ -354,9 +346,6 @@
 
         mTestableLooper = TestableLooper.get(this);
         allowTestableLooperAsMainThread();
-        mFeatureFlags = new FakeFeatureFlags();
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
-        mFeatureFlags.set(STOP_FACE_AUTH_ON_DISPLAY_OFF, false);
 
         when(mSecureSettings.getUriFor(anyString())).thenReturn(mURI);
 
@@ -1593,8 +1582,6 @@
     @Test
     public void listenForFingerprint_whenOccludingAppPkgOnAllowlist()
             throws RemoteException {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
         // GIVEN keyguard isn't visible (app occluding)
         mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
         mKeyguardUpdateMonitor.setKeyguardShowing(true, true);
@@ -1616,8 +1603,6 @@
     @Test
     public void doNotListenForFingerprint_whenOccludingAppPkgNotOnAllowlist()
             throws RemoteException {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
         // GIVEN keyguard isn't visible (app occluding)
         mKeyguardUpdateMonitor.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
         mKeyguardUpdateMonitor.setKeyguardShowing(true, true);
@@ -2979,11 +2964,6 @@
     }
 
     @Test
-    public void stopFaceAuthOnDisplayOffFlagNotEnabled_doNotRegisterForDisplayCallback() {
-        assertThat(mDisplayTracker.getDisplayCallbacks().size()).isEqualTo(0);
-    }
-
-    @Test
     public void onDisplayOn_nothingHappens() throws RemoteException {
         // GIVEN
         keyguardIsVisible();
@@ -3325,7 +3305,6 @@
         clearInvocations(mFingerprintManager);
         clearInvocations(mBiometricManager);
         clearInvocations(mStatusBarStateController);
-        mFeatureFlags.set(STOP_FACE_AUTH_ON_DISPLAY_OFF, true);
         mKeyguardUpdateMonitor = new TestableKeyguardUpdateMonitor(mContext);
         setupBiometrics(mKeyguardUpdateMonitor);
         assertThat(mDisplayTracker.getDisplayCallbacks().size()).isEqualTo(1);
@@ -3407,7 +3386,7 @@
                     mDreamManager, mDevicePolicyManager, mSensorPrivacyManager, mTelephonyManager,
                     mPackageManager, mFaceManager, mFingerprintManager, mBiometricManager,
                     mFaceWakeUpTriggersConfig, mDevicePostureController,
-                    Optional.of(mInteractiveToAuthProvider), mFeatureFlags,
+                    Optional.of(mInteractiveToAuthProvider),
                     mTaskStackChangeListeners, mActivityTaskManager, mDisplayTracker);
             setStrongAuthTracker(KeyguardUpdateMonitorTest.this.mStrongAuthTracker);
         }
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
index 09ff546..0e4b3c9 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerBaseTest.java
@@ -19,6 +19,7 @@
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
 import static com.android.systemui.flags.Flags.DOZING_MIGRATION_1;
 import static com.android.systemui.flags.Flags.FACE_AUTH_REFACTOR;
+import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;
 import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED;
 import static com.android.systemui.flags.Flags.MIGRATE_LOCK_ICON;
 
@@ -146,6 +147,7 @@
         mFeatureFlags.set(FACE_AUTH_REFACTOR, false);
         mFeatureFlags.set(MIGRATE_LOCK_ICON, false);
         mFeatureFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false);
+        mFeatureFlags.set(LOCKSCREEN_ENABLE_LANDSCAPE, false);
         mUnderTest = new LockIconViewController(
                 mStatusBarStateController,
                 mKeyguardUpdateMonitor,
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
index 979fc83..a2dc776 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LockIconViewControllerTest.java
@@ -17,11 +17,9 @@
 package com.android.keyguard;
 
 import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
-
 import static com.android.keyguard.LockIconView.ICON_LOCK;
 import static com.android.keyguard.LockIconView.ICON_UNLOCK;
 import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
@@ -40,8 +38,8 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.settingslib.udfps.UdfpsOverlayParams;
 import com.android.systemui.biometrics.UdfpsController;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
 import com.android.systemui.doze.util.BurnInHelperKt;
 
 import org.junit.Test;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
index 576f689..b478d5c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/SystemActionsTest.java
@@ -17,7 +17,6 @@
 package com.android.systemui.accessibility;
 
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.doAnswer;
@@ -41,9 +40,7 @@
 import com.android.systemui.shade.ShadeController;
 import com.android.systemui.shade.ShadeViewController;
 import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
-
-import dagger.Lazy;
+import com.android.systemui.statusbar.policy.KeyguardStateController;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -64,12 +61,12 @@
     @Mock
     private NotificationShadeWindowController mNotificationShadeController;
     @Mock
+    private KeyguardStateController mKeyguardStateController;
+    @Mock
     private ShadeController mShadeController;
     @Mock
     private ShadeViewController mShadeViewController;
     @Mock
-    private Lazy<Optional<CentralSurfaces>> mCentralSurfacesOptionalLazy;
-    @Mock
     private Optional<Recents> mRecentsOptional;
     @Mock
     private TelecomManager mTelecomManager;
@@ -84,9 +81,15 @@
         MockitoAnnotations.initMocks(this);
         mContext.addMockSystemService(TelecomManager.class, mTelecomManager);
         mContext.addMockSystemService(InputManager.class, mInputManager);
-        mSystemActions = new SystemActions(mContext, mUserTracker, mNotificationShadeController,
-                mShadeController, () -> mShadeViewController, mCentralSurfacesOptionalLazy,
-                mRecentsOptional, mDisplayTracker);
+        mSystemActions = new SystemActions(
+                mContext,
+                mUserTracker,
+                mNotificationShadeController,
+                mKeyguardStateController,
+                mShadeController,
+                () -> mShadeViewController,
+                mRecentsOptional,
+                mDisplayTracker);
     }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerTest.java
index 0fb0b03..39fe6fb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerTest.java
@@ -751,6 +751,245 @@
     }
 
     @Test
+    public void windowWidthIsNotMax_performA11yActionIncreaseWidth_windowWidthIncreased() {
+        final Rect windowBounds = mWindowManager.getCurrentWindowMetrics().getBounds();
+        final int startingWidth = (int) (windowBounds.width() * 0.8);
+        final int startingHeight = (int) (windowBounds.height() * 0.8);
+        final float changeWindowSizeAmount = mContext.getResources().getFraction(
+                R.fraction.magnification_resize_window_size_amount,
+                /* base= */ 1,
+                /* pbase= */ 1);
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingWidth, startingHeight);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AtomicInteger actualWindowHeight = new AtomicInteger();
+        final AtomicInteger actualWindowWidth = new AtomicInteger();
+
+        mInstrumentation.runOnMainSync(
+                () -> {
+                    mirrorView.performAccessibilityAction(
+                            R.id.accessibility_action_increase_window_width, null);
+                    actualWindowHeight.set(mWindowManager.getLayoutParamsFromAttachedView().height);
+                    actualWindowWidth.set(mWindowManager.getLayoutParamsFromAttachedView().width);
+                });
+
+        final int mirrorSurfaceMargin = mResources.getDimensionPixelSize(
+                R.dimen.magnification_mirror_surface_margin);
+        // Window width includes the magnifier frame and the margin. Increasing the window size
+        // will be increasing the amount of the frame size only.
+        int newWindowWidth =
+                (int) ((startingWidth - 2 * mirrorSurfaceMargin) * (1 + changeWindowSizeAmount))
+                        + 2 * mirrorSurfaceMargin;
+        assertEquals(newWindowWidth, actualWindowWidth.get());
+        assertEquals(startingHeight, actualWindowHeight.get());
+    }
+
+    @Test
+    public void windowHeightIsNotMax_performA11yActionIncreaseHeight_windowHeightIncreased() {
+        final Rect windowBounds = mWindowManager.getCurrentWindowMetrics().getBounds();
+        final int startingWidth = (int) (windowBounds.width() * 0.8);
+        final int startingHeight = (int) (windowBounds.height() * 0.8);
+        final float changeWindowSizeAmount = mContext.getResources().getFraction(
+                R.fraction.magnification_resize_window_size_amount,
+                /* base= */ 1,
+                /* pbase= */ 1);
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingWidth, startingHeight);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AtomicInteger actualWindowHeight = new AtomicInteger();
+        final AtomicInteger actualWindowWidth = new AtomicInteger();
+
+        mInstrumentation.runOnMainSync(
+                () -> {
+                    mirrorView.performAccessibilityAction(
+                            R.id.accessibility_action_increase_window_height, null);
+                    actualWindowHeight.set(mWindowManager.getLayoutParamsFromAttachedView().height);
+                    actualWindowWidth.set(mWindowManager.getLayoutParamsFromAttachedView().width);
+                });
+
+        final int mirrorSurfaceMargin = mResources.getDimensionPixelSize(
+                R.dimen.magnification_mirror_surface_margin);
+        // Window height includes the magnifier frame and the margin. Increasing the window size
+        // will be increasing the amount of the frame size only.
+        int newWindowHeight =
+                (int) ((startingHeight - 2 * mirrorSurfaceMargin) * (1 + changeWindowSizeAmount))
+                        + 2 * mirrorSurfaceMargin;
+        assertEquals(startingWidth, actualWindowWidth.get());
+        assertEquals(newWindowHeight, actualWindowHeight.get());
+    }
+
+    @Test
+    public void windowWidthIsMax_noIncreaseWindowWidthA11yAction() {
+        final Rect windowBounds = mWindowManager.getCurrentWindowMetrics().getBounds();
+        final int startingWidth = windowBounds.width();
+        final int startingHeight = windowBounds.height();
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingWidth, startingHeight);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AccessibilityNodeInfo accessibilityNodeInfo =
+                mirrorView.createAccessibilityNodeInfo();
+        assertFalse(accessibilityNodeInfo.getActionList().contains(
+                new AccessibilityAction(R.id.accessibility_action_increase_window_width, null)));
+    }
+
+    @Test
+    public void windowHeightIsMax_noIncreaseWindowHeightA11yAction() {
+        final Rect windowBounds = mWindowManager.getCurrentWindowMetrics().getBounds();
+        final int startingWidth = windowBounds.width();
+        final int startingHeight = windowBounds.height();
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingWidth, startingHeight);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AccessibilityNodeInfo accessibilityNodeInfo =
+                mirrorView.createAccessibilityNodeInfo();
+        assertFalse(accessibilityNodeInfo.getActionList().contains(
+                new AccessibilityAction(R.id.accessibility_action_increase_window_height, null)));
+    }
+
+    @Test
+    public void windowWidthIsNotMin_performA11yActionDecreaseWidth_windowWidthDecreased() {
+        int mMinWindowSize = mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.accessibility_window_magnifier_min_size);
+        final int startingSize = (int) (mMinWindowSize * 1.1);
+        final float changeWindowSizeAmount = mContext.getResources().getFraction(
+                R.fraction.magnification_resize_window_size_amount,
+                /* base= */ 1,
+                /* pbase= */ 1);
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingSize, startingSize);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AtomicInteger actualWindowHeight = new AtomicInteger();
+        final AtomicInteger actualWindowWidth = new AtomicInteger();
+
+        mInstrumentation.runOnMainSync(
+                () -> {
+                    mirrorView.performAccessibilityAction(
+                            R.id.accessibility_action_decrease_window_width, null);
+                    actualWindowHeight.set(mWindowManager.getLayoutParamsFromAttachedView().height);
+                    actualWindowWidth.set(mWindowManager.getLayoutParamsFromAttachedView().width);
+                });
+
+        final int mirrorSurfaceMargin = mResources.getDimensionPixelSize(
+                R.dimen.magnification_mirror_surface_margin);
+        // Window width includes the magnifier frame and the margin. Decreasing the window size
+        // will be decreasing the amount of the frame size only.
+        int newWindowWidth =
+                (int) ((startingSize - 2 * mirrorSurfaceMargin) * (1 - changeWindowSizeAmount))
+                        + 2 * mirrorSurfaceMargin;
+        assertEquals(newWindowWidth, actualWindowWidth.get());
+        assertEquals(startingSize, actualWindowHeight.get());
+    }
+
+    @Test
+    public void windowHeightIsNotMin_performA11yActionDecreaseHeight_windowHeightDecreased() {
+        int mMinWindowSize = mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.accessibility_window_magnifier_min_size);
+        final int startingSize = (int) (mMinWindowSize * 1.1);
+        final float changeWindowSizeAmount = mContext.getResources().getFraction(
+                R.fraction.magnification_resize_window_size_amount,
+                /* base= */ 1,
+                /* pbase= */ 1);
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingSize, startingSize);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AtomicInteger actualWindowHeight = new AtomicInteger();
+        final AtomicInteger actualWindowWidth = new AtomicInteger();
+
+        mInstrumentation.runOnMainSync(
+                () -> {
+                    mirrorView.performAccessibilityAction(
+                            R.id.accessibility_action_decrease_window_height, null);
+                    actualWindowHeight.set(mWindowManager.getLayoutParamsFromAttachedView().height);
+                    actualWindowWidth.set(mWindowManager.getLayoutParamsFromAttachedView().width);
+                });
+
+        final int mirrorSurfaceMargin = mResources.getDimensionPixelSize(
+                R.dimen.magnification_mirror_surface_margin);
+        // Window height includes the magnifier frame and the margin. Decreasing the window size
+        // will be decreasing the amount of the frame size only.
+        int newWindowHeight =
+                (int) ((startingSize - 2 * mirrorSurfaceMargin) * (1 - changeWindowSizeAmount))
+                        + 2 * mirrorSurfaceMargin;
+        assertEquals(startingSize, actualWindowWidth.get());
+        assertEquals(newWindowHeight, actualWindowHeight.get());
+    }
+
+    @Test
+    public void windowWidthIsMin_noDecreaseWindowWidthA11yAction() {
+        int mMinWindowSize = mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.accessibility_window_magnifier_min_size);
+        final int startingSize = mMinWindowSize;
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingSize, startingSize);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AccessibilityNodeInfo accessibilityNodeInfo =
+                mirrorView.createAccessibilityNodeInfo();
+        assertFalse(accessibilityNodeInfo.getActionList().contains(
+                new AccessibilityAction(R.id.accessibility_action_decrease_window_width, null)));
+    }
+
+    @Test
+    public void windowHeightIsMin_noDecreaseWindowHeightA11yAcyion() {
+        int mMinWindowSize = mResources.getDimensionPixelSize(
+                com.android.internal.R.dimen.accessibility_window_magnifier_min_size);
+        final int startingSize = mMinWindowSize;
+
+        mInstrumentation.runOnMainSync(() -> {
+            mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
+                    Float.NaN);
+            mWindowMagnificationController.setWindowSize(startingSize, startingSize);
+            mWindowMagnificationController.setEditMagnifierSizeMode(true);
+        });
+
+        final View mirrorView = mWindowManager.getAttachedView();
+        final AccessibilityNodeInfo accessibilityNodeInfo =
+                mirrorView.createAccessibilityNodeInfo();
+        assertFalse(accessibilityNodeInfo.getActionList().contains(
+                new AccessibilityAction(R.id.accessibility_action_decrease_window_height, null)));
+    }
+
+    @Test
     public void enableWindowMagnification_hasA11yWindowTitle() {
         mInstrumentation.runOnMainSync(() -> {
             mWindowMagnificationController.enableWindowMagnificationInternal(Float.NaN, Float.NaN,
@@ -1210,4 +1449,5 @@
         when(mContext.getDisplay()).thenReturn(display);
         return newRotation;
     }
+
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt
deleted file mode 100644
index a93af7d..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE
-import android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT
-import android.hardware.biometrics.BiometricConstants
-import android.hardware.face.FaceManager
-import android.testing.TestableLooper
-import android.testing.TestableLooper.RunWithLooper
-import android.view.View
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import com.android.systemui.R
-import com.android.systemui.RoboPilotTest
-import com.android.systemui.SysuiTestCase
-import com.google.common.truth.Truth.assertThat
-import org.junit.After
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.Mock
-import org.mockito.Mockito.never
-import org.mockito.Mockito.verify
-import org.mockito.Mockito.times
-import org.mockito.junit.MockitoJUnit
-
-
-@RunWith(AndroidJUnit4::class)
-@RunWithLooper(setAsMainLooper = true)
-@SmallTest
-@RoboPilotTest
-class AuthBiometricFingerprintAndFaceViewTest : SysuiTestCase() {
-
-    @JvmField
-    @Rule
-    var mockitoRule = MockitoJUnit.rule()
-
-    @Mock
-    private lateinit var callback: AuthBiometricView.Callback
-
-    @Mock
-    private lateinit var panelController: AuthPanelController
-
-    private lateinit var biometricView: AuthBiometricFingerprintAndFaceView
-
-    @Before
-    fun setup() {
-        biometricView = R.layout.auth_biometric_fingerprint_and_face_view
-                .asTestAuthBiometricView(mContext, callback, panelController)
-        waitForIdleSync()
-    }
-
-    @After
-    fun tearDown() {
-        biometricView.destroyDialog()
-    }
-
-    @Test
-    fun fingerprintSuccessDoesNotRequireExplicitConfirmation() {
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.onAuthenticationSucceeded(TYPE_FINGERPRINT)
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticated).isTrue()
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
-    }
-
-    @Test
-    fun faceSuccessRequiresExplicitConfirmation() {
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.onAuthenticationSucceeded(TYPE_FACE)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticated).isFalse()
-        assertThat(biometricView.isAuthenticating).isFalse()
-        assertThat(biometricView.mConfirmButton.visibility).isEqualTo(View.GONE)
-        verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
-
-        // icon acts as confirm button
-        biometricView.mIconView.performClick()
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticated).isTrue()
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED_AND_CONFIRMED)
-    }
-
-    @Test
-    fun ignoresFaceErrors_faceIsNotClass3_notLockoutError() {
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.onError(TYPE_FACE, "not a face")
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticating).isTrue()
-        verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
-        biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-    }
-
-    @Test
-    fun doNotIgnoresFaceErrors_faceIsClass3_notLockoutError() {
-        biometricView.isFaceClass3 = true
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.onError(TYPE_FACE, "not a face")
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticating).isTrue()
-        verify(callback, never()).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
-        biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-    }
-
-    @Test
-    fun doNotIgnoresFaceErrors_faceIsClass3_lockoutError() {
-        biometricView.isFaceClass3 = true
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.onError(
-            TYPE_FACE,
-            FaceManager.getErrorString(
-                biometricView.context,
-                BiometricConstants.BIOMETRIC_ERROR_LOCKOUT_PERMANENT,
-                0 /*vendorCode */
-            )
-        )
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticating).isTrue()
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-
-        biometricView.onError(TYPE_FINGERPRINT, "that's a nope")
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback, times(2)).onAction(AuthBiometricView.Callback.ACTION_ERROR)
-    }
-
-
-    override fun waitForIdleSync() = TestableLooper.get(this).processAllMessages()
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
index cac618b..52bf350 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconControllerTest.kt
@@ -27,6 +27,7 @@
 import com.airbnb.lottie.LottieAnimationView
 import com.android.systemui.R
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
 import com.google.common.truth.Truth.assertThat
 import org.junit.Before
 import org.junit.Rule
@@ -63,7 +64,7 @@
         setupFingerprintSensorProperties(FingerprintSensorProperties.TYPE_POWER_BUTTON)
         controller = AuthBiometricFingerprintIconController(context, iconView, iconViewOverlay)
 
-        assertThat(controller.getIconContentDescription(AuthBiometricView.STATE_AUTHENTICATING))
+        assertThat(controller.getIconContentDescription(BiometricState.STATE_AUTHENTICATING))
             .isEqualTo(
                 context.resources.getString(
                     R.string.security_settings_sfps_enroll_find_sensor_message
@@ -76,7 +77,7 @@
         setupFingerprintSensorProperties(FingerprintSensorProperties.TYPE_UDFPS_OPTICAL)
         controller = AuthBiometricFingerprintIconController(context, iconView, iconViewOverlay)
 
-        assertThat(controller.getIconContentDescription(AuthBiometricView.STATE_AUTHENTICATING))
+        assertThat(controller.getIconContentDescription(BiometricState.STATE_AUTHENTICATING))
             .isEqualTo(context.resources.getString(R.string.fingerprint_dialog_touch_sensor))
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt
deleted file mode 100644
index 8e5d96b..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.hardware.biometrics.BiometricAuthenticator
-import android.os.Bundle
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import android.testing.TestableLooper
-import android.testing.TestableLooper.RunWithLooper
-import android.view.View
-import androidx.test.filters.SmallTest
-import com.android.systemui.R
-import com.android.systemui.RoboPilotTest
-import com.android.systemui.SysuiTestCase
-import com.google.common.truth.Truth.assertThat
-import org.junit.After
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentMatchers
-import org.mockito.ArgumentMatchers.eq
-import org.mockito.Mock
-import org.mockito.Mockito.never
-import org.mockito.Mockito.verify
-import org.mockito.junit.MockitoJUnit
-
-@RunWith(AndroidJUnit4::class)
-@RunWithLooper(setAsMainLooper = true)
-@SmallTest
-@RoboPilotTest
-class AuthBiometricFingerprintViewTest : SysuiTestCase() {
-
-    @JvmField
-    @Rule
-    val mockitoRule = MockitoJUnit.rule()
-
-    @Mock
-    private lateinit var callback: AuthBiometricView.Callback
-
-    @Mock
-    private lateinit var panelController: AuthPanelController
-
-    private lateinit var biometricView: AuthBiometricView
-
-    private fun createView(allowDeviceCredential: Boolean = false): AuthBiometricFingerprintView {
-        val view: AuthBiometricFingerprintView =
-                R.layout.auth_biometric_fingerprint_view.asTestAuthBiometricView(
-                mContext, callback, panelController, allowDeviceCredential = allowDeviceCredential
-        )
-        waitForIdleSync()
-        return view
-    }
-
-    @Before
-    fun setup() {
-        biometricView = createView()
-    }
-
-    @After
-    fun tearDown() {
-        biometricView.destroyDialog()
-    }
-
-    @Test
-    fun testOnAuthenticationSucceeded_noConfirmationRequired_sendsActionAuthenticated() {
-        biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticated).isTrue()
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
-    }
-
-    @Test
-    fun testOnAuthenticationSucceeded_confirmationRequired_updatesDialogContents() {
-        biometricView.setRequireConfirmation(true)
-        biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        // TODO: this should be tested in the subclasses
-        if (biometricView.supportsRequireConfirmation()) {
-            verify(callback, never()).onAction(ArgumentMatchers.anyInt())
-            assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
-            assertThat(biometricView.mCancelButton.visibility).isEqualTo(View.VISIBLE)
-            assertThat(biometricView.mCancelButton.isEnabled).isTrue()
-            assertThat(biometricView.mConfirmButton.isEnabled).isTrue()
-            assertThat(biometricView.mIndicatorView.text)
-                    .isEqualTo(mContext.getText(R.string.biometric_dialog_tap_confirm))
-            assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
-        } else {
-            assertThat(biometricView.isAuthenticated).isTrue()
-            verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_AUTHENTICATED))
-        }
-    }
-
-    @Test
-    fun testPositiveButton_sendsActionAuthenticated() {
-        biometricView.mConfirmButton.performClick()
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_AUTHENTICATED)
-        assertThat(biometricView.isAuthenticated).isTrue()
-    }
-
-    @Test
-    fun testNegativeButton_beforeAuthentication_sendsActionButtonNegative() {
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        biometricView.mNegativeButton.performClick()
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE)
-    }
-
-    @Test
-    fun testCancelButton_whenPendingConfirmation_sendsActionUserCanceled() {
-        biometricView.setRequireConfirmation(true)
-        biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
-
-        assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
-        biometricView.mCancelButton.performClick()
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_USER_CANCELED)
-    }
-
-    @Test
-    fun testTryAgainButton_sendsActionTryAgain() {
-        biometricView.mTryAgainButton.performClick()
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN)
-        assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
-        assertThat(biometricView.isAuthenticating).isTrue()
-    }
-
-    @Test
-    fun testOnErrorSendsActionError() {
-        biometricView.onError(BiometricAuthenticator.TYPE_FACE, "testError")
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_ERROR))
-    }
-
-    @Test
-    fun testOnErrorShowsMessage() {
-        // prevent error state from instantly returning to authenticating in the test
-        biometricView.mAnimationDurationHideDialog = 10_000
-
-        val message = "another error"
-        biometricView.onError(BiometricAuthenticator.TYPE_FACE, message)
-        TestableLooper.get(this).moveTimeForward(1000)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticating).isFalse()
-        assertThat(biometricView.isAuthenticated).isFalse()
-        assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
-        assertThat(biometricView.mIndicatorView.text).isEqualTo(message)
-    }
-
-    @Test
-    fun testBackgroundClicked_sendsActionUserCanceled() {
-        val view = View(mContext)
-        biometricView.setBackgroundView(view)
-        view.performClick()
-
-        verify(callback).onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
-    }
-
-    @Test
-    fun testBackgroundClicked_afterAuthenticated_neverSendsUserCanceled() {
-        val view = View(mContext)
-        biometricView.setBackgroundView(view)
-        biometricView.onAuthenticationSucceeded(BiometricAuthenticator.TYPE_FINGERPRINT)
-        waitForIdleSync()
-        view.performClick()
-
-        verify(callback, never())
-                .onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
-    }
-
-    @Test
-    fun testBackgroundClicked_whenSmallDialog_neverSendsUserCanceled() {
-        biometricView.mLayoutParams = AuthDialog.LayoutParams(0, 0)
-        biometricView.updateSize(AuthDialog.SIZE_SMALL)
-        val view = View(mContext)
-        biometricView.setBackgroundView(view)
-        view.performClick()
-
-        verify(callback, never()).onAction(eq(AuthBiometricView.Callback.ACTION_USER_CANCELED))
-    }
-
-    @Test
-    fun testIgnoresUselessHelp() {
-        biometricView.mAnimationDurationHideDialog = 10_000
-        biometricView.onDialogAnimatedIn(fingerprintWasStarted = true)
-        waitForIdleSync()
-
-        assertThat(biometricView.isAuthenticating).isTrue()
-
-        val helpText = biometricView.mIndicatorView.text
-        biometricView.onHelp(BiometricAuthenticator.TYPE_FINGERPRINT, "")
-        waitForIdleSync()
-
-        // text should not change
-        assertThat(biometricView.mIndicatorView.text).isEqualTo(helpText)
-        verify(callback, never()).onAction(eq(AuthBiometricView.Callback.ACTION_ERROR))
-    }
-
-    @Test
-    fun testRestoresState() {
-        val requireConfirmation = true
-        biometricView.mAnimationDurationHideDialog = 10_000
-        val failureMessage = "testFailureMessage"
-        biometricView.setRequireConfirmation(requireConfirmation)
-        biometricView.onAuthenticationFailed(BiometricAuthenticator.TYPE_FACE, failureMessage)
-        waitForIdleSync()
-
-        val state = Bundle()
-        biometricView.onSaveState(state)
-        assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
-        assertThat(state.getInt(AuthDialog.KEY_BIOMETRIC_TRY_AGAIN_VISIBILITY))
-                .isEqualTo(View.GONE)
-        assertThat(state.getInt(AuthDialog.KEY_BIOMETRIC_STATE))
-                .isEqualTo(AuthBiometricView.STATE_ERROR)
-        assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
-        assertThat(state.getBoolean(AuthDialog.KEY_BIOMETRIC_INDICATOR_ERROR_SHOWING)).isTrue()
-        assertThat(biometricView.mIndicatorView.text).isEqualTo(failureMessage)
-        assertThat(state.getString(AuthDialog.KEY_BIOMETRIC_INDICATOR_STRING))
-                .isEqualTo(failureMessage)
-
-        // TODO: Test dialog size. Should move requireConfirmation to buildBiometricPromptBundle
-
-        // Create new dialog and restore the previous state into it
-        biometricView.destroyDialog()
-        biometricView = createView()
-        biometricView.restoreState(state)
-        biometricView.mAnimationDurationHideDialog = 10_000
-        biometricView.setRequireConfirmation(requireConfirmation)
-        waitForIdleSync()
-
-        assertThat(biometricView.mTryAgainButton.visibility).isEqualTo(View.GONE)
-        assertThat(biometricView.mIndicatorView.visibility).isEqualTo(View.VISIBLE)
-
-        // TODO: Test restored text. Currently cannot test this, since it gets restored only after
-        // dialog size is known.
-    }
-
-    @Test
-    fun testCredentialButton_whenDeviceCredentialAllowed() {
-        biometricView.destroyDialog()
-        biometricView = createView(allowDeviceCredential = true)
-
-        assertThat(biometricView.mUseCredentialButton.visibility).isEqualTo(View.VISIBLE)
-        assertThat(biometricView.mNegativeButton.visibility).isEqualTo(View.GONE)
-
-        biometricView.mUseCredentialButton.performClick()
-        waitForIdleSync()
-
-        verify(callback).onAction(AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL)
-    }
-
-    override fun waitForIdleSync() = TestableLooper.get(this).processAllMessages()
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
index 9584d88..969a011 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt
@@ -41,13 +41,15 @@
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
 import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.FakeCredentialInteractor
 import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
 import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel
 import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel
+import com.android.systemui.display.data.repository.FakeDisplayRepository
 import com.android.systemui.flags.FakeFeatureFlags
 import com.android.systemui.flags.Flags
 import com.android.systemui.keyguard.WakefulnessLifecycle
@@ -103,14 +105,11 @@
     @Mock
     lateinit var vibrator: VibratorHelper
 
-    // TODO(b/278622168): remove with flag
-    open val useNewBiometricPrompt = false
-
     private val testScope = TestScope(StandardTestDispatcher())
     private val fakeExecutor = FakeExecutor(FakeSystemClock())
     private val biometricPromptRepository = FakePromptRepository()
     private val fingerprintRepository = FakeFingerprintPropertyRepository()
-    private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+    private val displayStateRepository = FakeDisplayStateRepository()
     private val credentialInteractor = FakeCredentialInteractor()
     private val bpCredentialInteractor = PromptCredentialInteractor(
         Dispatchers.Main.immediate,
@@ -125,13 +124,8 @@
         )
     }
 
-    private val displayStateInteractor = DisplayStateInteractorImpl(
-        testScope.backgroundScope,
-        mContext,
-        fakeExecutor,
-        rearDisplayStateRepository
-    )
-
+    private lateinit var displayRepository: FakeDisplayRepository
+    private lateinit var displayStateInteractor: DisplayStateInteractor
 
     private val credentialViewModel = CredentialViewModel(mContext, bpCredentialInteractor)
 
@@ -139,8 +133,17 @@
 
     @Before
     fun setup() {
-        featureFlags.set(Flags.BIOMETRIC_BP_STRONG, useNewBiometricPrompt)
+        displayRepository = FakeDisplayRepository()
         featureFlags.set(Flags.ONE_WAY_HAPTICS_API_MIGRATION, false)
+
+        displayStateInteractor =
+            DisplayStateInteractorImpl(
+                    testScope.backgroundScope,
+                    mContext,
+                    fakeExecutor,
+                    displayStateRepository,
+                    displayRepository,
+            )
     }
 
     @After
@@ -228,9 +231,7 @@
     @Test
     fun testActionCancel_panelInteractionDetectorDisable() {
         val container = initializeFingerprintContainer()
-        container.mBiometricCallback.onAction(
-                AuthBiometricView.Callback.ACTION_USER_CANCELED
-        )
+        container.mBiometricCallback.onUserCanceled()
         waitForIdleSync()
         verify(panelInteractionDetector).disable()
     }
@@ -239,9 +240,7 @@
     @Test
     fun testActionAuthenticated_sendsDismissedAuthenticated() {
         val container = initializeFingerprintContainer()
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_AUTHENTICATED
-        )
+        container.mBiometricCallback.onAuthenticated()
         waitForIdleSync()
 
         verify(callback).onDismissed(
@@ -255,9 +254,7 @@
     @Test
     fun testActionUserCanceled_sendsDismissedUserCanceled() {
         val container = initializeFingerprintContainer()
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_USER_CANCELED
-        )
+        container.mBiometricCallback.onUserCanceled()
         waitForIdleSync()
 
         verify(callback).onSystemEvent(
@@ -275,9 +272,7 @@
     @Test
     fun testActionButtonNegative_sendsDismissedButtonNegative() {
         val container = initializeFingerprintContainer()
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_BUTTON_NEGATIVE
-        )
+        container.mBiometricCallback.onButtonNegative()
         waitForIdleSync()
 
         verify(callback).onDismissed(
@@ -293,9 +288,7 @@
         val container = initializeFingerprintContainer(
             authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK
         )
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_BUTTON_TRY_AGAIN
-        )
+        container.mBiometricCallback.onButtonTryAgain()
         waitForIdleSync()
 
         verify(callback).onTryAgainPressed(authContainer?.requestId ?: 0L)
@@ -304,9 +297,7 @@
     @Test
     fun testActionError_sendsDismissedError() {
         val container = initializeFingerprintContainer()
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_ERROR
-        )
+        container.mBiometricCallback.onError()
         waitForIdleSync()
 
         verify(callback).onDismissed(
@@ -324,9 +315,7 @@
             authenticators = BiometricManager.Authenticators.BIOMETRIC_WEAK or
                     BiometricManager.Authenticators.DEVICE_CREDENTIAL
         )
-        container.mBiometricCallback.onAction(
-            AuthBiometricView.Callback.ACTION_USE_DEVICE_CREDENTIAL
-        )
+        container.mBiometricCallback.onUseDeviceCredential()
         waitForIdleSync()
 
         verify(callback).onDeviceCredentialPressed(authContainer?.requestId ?: 0L)
@@ -531,6 +520,7 @@
             displayStateInteractor,
             promptSelectorInteractor,
             vibrator,
+            context,
             featureFlags
         ),
         { credentialViewModel },
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt
deleted file mode 100644
index b56d055..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest2.kt
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.biometrics
-
-import android.testing.TestableLooper
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import org.junit.runner.RunWith
-
-// TODO(b/278622168): remove with flag
-@RunWith(AndroidJUnit4::class)
-@TestableLooper.RunWithLooper(setAsMainLooper = true)
-@SmallTest
-class AuthContainerViewTest2 : AuthContainerViewTest() {
-    override val useNewBiometricPrompt = true
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
index 6d71dd5..d0b3833 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthControllerTest.java
@@ -17,22 +17,17 @@
 package com.android.systemui.biometrics;
 
 import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
-import static android.hardware.biometrics.BiometricManager.Authenticators;
-
 import static com.google.common.truth.Truth.assertThat;
-
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertNotSame;
 import static junit.framework.Assert.assertNull;
 import static junit.framework.Assert.assertTrue;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -48,7 +43,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
-import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Point;
 import android.hardware.biometrics.BiometricAuthenticator;
@@ -69,7 +63,6 @@
 import android.hardware.fingerprint.FingerprintSensorProperties;
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
 import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.RemoteException;
 import android.os.UserManager;
@@ -86,7 +79,6 @@
 import com.android.internal.R;
 import com.android.internal.jank.InteractionJankMonitor;
 import com.android.internal.widget.LockPatternUtils;
-import com.android.settingslib.udfps.UdfpsUtils;
 import com.android.systemui.RoboPilotTest;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.biometrics.domain.interactor.LogContextInteractor;
@@ -95,7 +87,6 @@
 import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel;
 import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel;
 import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
 import com.android.systemui.keyguard.WakefulnessLifecycle;
 import com.android.systemui.statusbar.CommandQueue;
 import com.android.systemui.statusbar.VibratorHelper;
@@ -207,10 +198,6 @@
 
     @Before
     public void setup() throws RemoteException {
-        // TODO(b/278622168): remove with flag
-        // AuthController simply passes this through to AuthContainerView (does not impact test)
-        mFeatureFlags.set(Flags.BIOMETRIC_BP_STRONG, false);
-
         mContextSpy = spy(mContext);
         mExecution = new FakeExecution();
         mTestableLooper = TestableLooper.get(this);
@@ -463,7 +450,7 @@
     @Test
     public void testShowInvoked_whenSystemRequested() {
         showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
-        verify(mDialog1).show(any(), any());
+        verify(mDialog1).show(any());
     }
 
     @Test
@@ -664,7 +651,7 @@
         // 2) Client cancels authentication
 
         showDialog(new int[0] /* sensorIds */, true /* credentialAllowed */);
-        verify(mDialog1).show(any(), any());
+        verify(mDialog1).show(any());
 
         final byte[] credentialAttestation = generateRandomHAT();
 
@@ -680,7 +667,7 @@
     @Test
     public void testShowNewDialog_beforeOldDialogDismissed_SkipsAnimations() {
         showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
-        verify(mDialog1).show(any(), any());
+        verify(mDialog1).show(any());
 
         showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
 
@@ -688,59 +675,7 @@
         verify(mDialog1).dismissWithoutCallback(eq(false) /* animate */);
 
         // Second dialog should be shown without animation
-        verify(mDialog2).show(any(), any());
-    }
-
-    @Test
-    public void testConfigurationPersists_whenOnConfigurationChanged() {
-        showDialog(new int[] {1} /* sensorIds */, false /* credentialAllowed */);
-        verify(mDialog1).show(any(), any());
-
-        // Return that the UI is in "showing" state
-        doAnswer(invocation -> {
-            Object[] args = invocation.getArguments();
-            Bundle savedState = (Bundle) args[0];
-            savedState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false);
-            return null; // onSaveState returns void
-        }).when(mDialog1).onSaveState(any());
-
-        mAuthController.onConfigurationChanged(new Configuration());
-
-        ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class);
-        verify(mDialog1).onSaveState(captor.capture());
-
-        // Old dialog doesn't animate
-        verify(mDialog1).dismissWithoutCallback(eq(false /* animate */));
-
-        // Saved state is restored into new dialog
-        ArgumentCaptor<Bundle> captor2 = ArgumentCaptor.forClass(Bundle.class);
-        verify(mDialog2).show(any(), captor2.capture());
-
-        // TODO: This should check all values we want to save/restore
-        assertEquals(captor.getValue(), captor2.getValue());
-    }
-
-    @Test
-    public void testConfigurationPersists_whenBiometricFallbackToCredential() {
-        showDialog(new int[] {1} /* sensorIds */, true /* credentialAllowed */);
-        verify(mDialog1).show(any(), any());
-
-        // Pretend that the UI is now showing device credential UI.
-        doAnswer(invocation -> {
-            Object[] args = invocation.getArguments();
-            Bundle savedState = (Bundle) args[0];
-            savedState.putBoolean(AuthDialog.KEY_CONTAINER_GOING_AWAY, false);
-            savedState.putBoolean(AuthDialog.KEY_CREDENTIAL_SHOWING, true);
-            return null; // onSaveState returns void
-        }).when(mDialog1).onSaveState(any());
-
-        mAuthController.onConfigurationChanged(new Configuration());
-
-        // Check that the new dialog was initialized to the credential UI.
-        ArgumentCaptor<Bundle> captor = ArgumentCaptor.forClass(Bundle.class);
-        verify(mDialog2).show(any(), captor.capture());
-        assertEquals(Authenticators.DEVICE_CREDENTIAL,
-                mAuthController.mLastBiometricPromptInfo.getAuthenticators());
+        verify(mDialog2).show(any());
     }
 
     @Test
@@ -1010,7 +945,7 @@
                 REQUEST_ID);
 
         assertNull(mAuthController.mCurrentDialog);
-        verify(mDialog1, never()).show(any(), any());
+        verify(mDialog1, never()).show(any());
     }
 
     private void showDialog(int[] sensorIds, boolean credentialAllowed) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
index 9751fad..8fc63b2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt
@@ -28,12 +28,15 @@
 import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
 import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory
 import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.scene.SceneTestUtils
+import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags
 import com.android.systemui.shade.data.repository.FakeShadeRepository
 import com.android.systemui.shade.domain.interactor.ShadeInteractor
 import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository
 import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
 import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
 import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
 import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
 import com.android.systemui.user.data.repository.FakeUserRepository
@@ -42,8 +45,6 @@
 import com.android.systemui.user.domain.interactor.RefreshUsersScheduler
 import com.android.systemui.user.domain.interactor.UserInteractor
 import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
 import org.junit.Before
@@ -56,12 +57,15 @@
 @SmallTest
 @OptIn(ExperimentalCoroutinesApi::class)
 class AuthDialogPanelInteractionDetectorTest : SysuiTestCase() {
+    private val utils = SceneTestUtils(this)
+    private val testScope = utils.testScope
+    private val testDispatcher = utils.testDispatcher
     private val disableFlagsRepository = FakeDisableFlagsRepository()
     private val featureFlags = FakeFeatureFlags()
     private val keyguardRepository = FakeKeyguardRepository()
     private val shadeRepository = FakeShadeRepository()
-    private val testDispatcher = StandardTestDispatcher()
-    private val testScope = TestScope(testDispatcher)
+    private val sceneContainerFlags = FakeSceneContainerFlags()
+    private val sceneInteractor = utils.sceneInteractor()
     private val userSetupRepository = FakeUserSetupRepository()
     private val userRepository = FakeUserRepository()
     private val configurationRepository = FakeConfigurationRepository()
@@ -69,6 +73,7 @@
         SharedNotificationContainerInteractor(
             configurationRepository,
             mContext,
+            ResourcesSplitShadeStateController()
         )
 
     private lateinit var detector: AuthDialogPanelInteractionDetector
@@ -126,6 +131,8 @@
             ShadeInteractor(
                 testScope.backgroundScope,
                 disableFlagsRepository,
+                sceneContainerFlags,
+                { sceneInteractor },
                 keyguardRepository,
                 userSetupRepository,
                 deviceProvisionedController,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
index 94244cd..9f24a9f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt
@@ -16,8 +16,6 @@
 
 package com.android.systemui.biometrics
 
-import android.annotation.IdRes
-import android.content.Context
 import android.hardware.biometrics.BiometricManager.Authenticators
 import android.hardware.biometrics.ComponentInfoInternal
 import android.hardware.biometrics.PromptInfo
@@ -27,57 +25,6 @@
 import android.hardware.face.FaceSensorPropertiesInternal
 import android.hardware.fingerprint.FingerprintSensorProperties
 import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
-import android.os.Bundle
-import android.testing.ViewUtils
-import android.view.LayoutInflater
-
-/**
- * Inflate the given BiometricPrompt layout and initialize it with test parameters.
- *
- * This attaches the view so be sure to call [destroyDialog] at the end of the test.
- */
-@IdRes
-internal fun <T : AuthBiometricView> Int.asTestAuthBiometricView(
-    context: Context,
-    callback: AuthBiometricView.Callback,
-    panelController: AuthPanelController,
-    allowDeviceCredential: Boolean = false,
-    savedState: Bundle? = null,
-    hideDelay: Int = 0
-): T {
-    val view = LayoutInflater.from(context).inflate(this, null, false) as T
-    view.mAnimationDurationLong = 0
-    view.mAnimationDurationShort = 0
-    view.mAnimationDurationHideDialog = hideDelay
-    view.setPromptInfo(buildPromptInfo(allowDeviceCredential))
-    view.setCallback(callback)
-    view.restoreState(savedState)
-    view.setPanelController(panelController)
-
-    ViewUtils.attachView(view)
-
-    return view
-}
-
-private fun buildPromptInfo(allowDeviceCredential: Boolean): PromptInfo {
-    val promptInfo = PromptInfo()
-    promptInfo.title = "Title"
-    var authenticators = Authenticators.BIOMETRIC_WEAK
-    if (allowDeviceCredential) {
-        authenticators = authenticators or Authenticators.DEVICE_CREDENTIAL
-    } else {
-        promptInfo.negativeButtonText = "Negative"
-    }
-    promptInfo.authenticators = authenticators
-    return promptInfo
-}
-
-/** Detach the view, if needed. */
-internal fun AuthBiometricView?.destroyDialog() {
-    if (this != null && isAttachedToWindow) {
-        ViewUtils.detachView(this)
-    }
-}
 
 /** Create [FingerprintSensorPropertiesInternal] for a test. */
 internal fun fingerprintSensorPropertiesInternal(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
index 994db46..17928a3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt
@@ -56,11 +56,12 @@
 import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.SysuiTestableContext
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.display.data.repository.FakeDisplayRepository
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository
 import com.android.systemui.plugins.statusbar.StatusBarStateController
@@ -115,12 +116,13 @@
     @Captor lateinit var overlayCaptor: ArgumentCaptor<View>
     @Captor lateinit var overlayViewParamsCaptor: ArgumentCaptor<WindowManager.LayoutParams>
 
+    private lateinit var displayRepository: FakeDisplayRepository
+    private lateinit var displayStateRepository: FakeDisplayStateRepository
     private lateinit var keyguardBouncerRepository: FakeKeyguardBouncerRepository
     private lateinit var alternateBouncerInteractor: AlternateBouncerInteractor
     private lateinit var displayStateInteractor: DisplayStateInteractor
 
     private val executor = FakeExecutor(FakeSystemClock())
-    private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
     private val testScope = TestScope(StandardTestDispatcher())
 
     private lateinit var overlayController: ISidefpsController
@@ -142,6 +144,8 @@
 
     @Before
     fun setup() {
+        displayRepository = FakeDisplayRepository()
+        displayStateRepository = FakeDisplayStateRepository()
         keyguardBouncerRepository = FakeKeyguardBouncerRepository()
         alternateBouncerInteractor =
             AlternateBouncerInteractor(
@@ -157,7 +161,8 @@
                 testScope.backgroundScope,
                 context,
                 executor,
-                rearDisplayStateRepository
+                displayStateRepository,
+                displayRepository,
             )
 
         context.addMockSystemService(DisplayManager::class.java, displayManager)
@@ -268,7 +273,7 @@
                 TestCoroutineScope(),
                 dumpManager
             )
-        rearDisplayStateRepository.setIsInRearDisplayMode(inRearDisplayMode)
+        displayStateRepository.setIsInRearDisplayMode(inRearDisplayMode)
 
         overlayController =
             ArgumentCaptor.forClass(ISidefpsController::class.java)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
index 7de78a6..469f65a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsBpViewControllerTest.kt
@@ -21,6 +21,7 @@
 import androidx.test.filters.SmallTest
 import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.statusbar.StatusBarStateController
 import com.android.systemui.shade.ShadeExpansionStateManager
@@ -44,6 +45,7 @@
     @Mock lateinit var udfpsBpView: UdfpsBpView
     @Mock lateinit var statusBarStateController: StatusBarStateController
     @Mock lateinit var shadeExpansionStateManager: ShadeExpansionStateManager
+    @Mock lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor
     @Mock lateinit var systemUIDialogManager: SystemUIDialogManager
     @Mock lateinit var dumpManager: DumpManager
 
@@ -55,12 +57,13 @@
             UdfpsBpViewController(
                 udfpsBpView,
                 statusBarStateController,
-                shadeExpansionStateManager,
+                primaryBouncerInteractor,
                 systemUIDialogManager,
                 dumpManager
             )
     }
 
+    @TestableLooper.RunWithLooper(setAsMainLooper = true)
     @Test
     fun testShouldNeverPauseAuth() {
         assertFalse(udfpsBpViewController.shouldPauseAuth())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
index 0e0d0e3..c735419 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt
@@ -37,12 +37,11 @@
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
 import com.android.keyguard.KeyguardUpdateMonitor
-import com.android.settingslib.udfps.UdfpsOverlayParams
-import com.android.settingslib.udfps.UdfpsUtils
 import com.android.systemui.R
 import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.animation.ActivityLaunchAnimator
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.dump.DumpManager
@@ -50,7 +49,6 @@
 import com.android.systemui.flags.Flags
 import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels
 import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.LockscreenShadeTransitionController
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
 import com.android.systemui.statusbar.phone.SystemUIDialogManager
@@ -97,7 +95,6 @@
     @Mock private lateinit var windowManager: WindowManager
     @Mock private lateinit var accessibilityManager: AccessibilityManager
     @Mock private lateinit var statusBarStateController: StatusBarStateController
-    @Mock private lateinit var shadeExpansionStateManager: ShadeExpansionStateManager
     @Mock private lateinit var statusBarKeyguardViewManager: StatusBarKeyguardViewManager
     @Mock private lateinit var keyguardUpdateMonitor: KeyguardUpdateMonitor
     @Mock private lateinit var dialogManager: SystemUIDialogManager
@@ -145,13 +142,32 @@
         block: () -> Unit
     ) {
         controllerOverlay = UdfpsControllerOverlay(
-            context, fingerprintManager, inflater, windowManager, accessibilityManager,
-            statusBarStateController, shadeExpansionStateManager, statusBarKeyguardViewManager,
-            keyguardUpdateMonitor, dialogManager, dumpManager, transitionController,
-            configurationController, keyguardStateController, unlockedScreenOffAnimationController,
-            udfpsDisplayMode, secureSettings, REQUEST_ID, reason,
-            controllerCallback, onTouch, activityLaunchAnimator, featureFlags,
-            primaryBouncerInteractor, alternateBouncerInteractor, isDebuggable, udfpsUtils,
+            context,
+            fingerprintManager,
+            inflater,
+            windowManager,
+            accessibilityManager,
+            statusBarStateController,
+            statusBarKeyguardViewManager,
+            keyguardUpdateMonitor,
+            dialogManager,
+            dumpManager,
+            transitionController,
+            configurationController,
+            keyguardStateController,
+            unlockedScreenOffAnimationController,
+            udfpsDisplayMode,
+            secureSettings,
+            REQUEST_ID,
+            reason,
+            controllerCallback,
+            onTouch,
+            activityLaunchAnimator,
+            featureFlags,
+            primaryBouncerInteractor,
+            alternateBouncerInteractor,
+            isDebuggable,
+            udfpsUtils,
             udfpsKeyguardAccessibilityDelegate,
             udfpsKeyguardViewModels,
         )
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
index e01b5af..b6bc7af 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java
@@ -20,15 +20,12 @@
 import static android.view.MotionEvent.ACTION_DOWN;
 import static android.view.MotionEvent.ACTION_MOVE;
 import static android.view.MotionEvent.ACTION_UP;
-
 import static com.android.internal.util.FunctionalUtils.ThrowingConsumer;
 import static com.android.systemui.classifier.Classifier.UDFPS_AUTHENTICATION;
 import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
-
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertTrue;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyFloat;
@@ -77,12 +74,11 @@
 import com.android.internal.logging.InstanceIdSequence;
 import com.android.internal.util.LatencyTracker;
 import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.settingslib.udfps.UdfpsOverlayParams;
-import com.android.settingslib.udfps.UdfpsUtils;
 import com.android.systemui.R;
 import com.android.systemui.RoboPilotTest;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.animation.ActivityLaunchAnimator;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
 import com.android.systemui.biometrics.udfps.InteractionEvent;
 import com.android.systemui.biometrics.udfps.NormalizedTouchData;
 import com.android.systemui.biometrics.udfps.SinglePointerTouchProcessor;
@@ -98,7 +94,6 @@
 import com.android.systemui.log.SessionTracker;
 import com.android.systemui.plugins.FalsingManager;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.shade.ShadeExpansionStateManager;
 import com.android.systemui.statusbar.LockscreenShadeTransitionController;
 import com.android.systemui.statusbar.VibratorHelper;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -314,19 +309,48 @@
                         (Provider<AlternateUdfpsTouchProvider>) () -> mAlternateTouchProvider)
                         : Optional.empty();
 
-        mUdfpsController = new UdfpsController(mContext, new FakeExecution(), mLayoutInflater,
-                mFingerprintManager, mWindowManager, mStatusBarStateController, mFgExecutor,
-                new ShadeExpansionStateManager(), mStatusBarKeyguardViewManager, mDumpManager,
-                mKeyguardUpdateMonitor, mFeatureFlags, mFalsingManager, mPowerManager,
-                mAccessibilityManager, mLockscreenShadeTransitionController, mScreenLifecycle,
-                mVibrator, mUdfpsHapticsSimulator, mUdfpsShell, mKeyguardStateController,
-                mDisplayManager, mHandler, mConfigurationController, mSystemClock,
-                mUnlockedScreenOffAnimationController, mSystemUIDialogManager, mLatencyTracker,
-                mActivityLaunchAnimator, alternateTouchProvider, mBiometricExecutor,
-                mPrimaryBouncerInteractor, mSinglePointerTouchProcessor, mSessionTracker,
-                mAlternateBouncerInteractor, mSecureSettings, mInputManager, mUdfpsUtils,
+        mUdfpsController = new UdfpsController(
+                mContext,
+                new FakeExecution(),
+                mLayoutInflater,
+                mFingerprintManager,
+                mWindowManager,
+                mStatusBarStateController,
+                mFgExecutor,
+                mStatusBarKeyguardViewManager,
+                mDumpManager,
+                mKeyguardUpdateMonitor,
+                mFeatureFlags,
+                mFalsingManager,
+                mPowerManager,
+                mAccessibilityManager,
+                mLockscreenShadeTransitionController,
+                mScreenLifecycle,
+                mVibrator,
+                mUdfpsHapticsSimulator,
+                mUdfpsShell,
+                mKeyguardStateController,
+                mDisplayManager,
+                mHandler,
+                mConfigurationController,
+                mSystemClock,
+                mUnlockedScreenOffAnimationController,
+                mSystemUIDialogManager,
+                mLatencyTracker,
+                mActivityLaunchAnimator,
+                alternateTouchProvider,
+                mBiometricExecutor,
+                mPrimaryBouncerInteractor,
+                mSinglePointerTouchProcessor,
+                mSessionTracker,
+                mAlternateBouncerInteractor,
+                mSecureSettings,
+                mInputManager,
+                mUdfpsUtils,
                 mock(KeyguardFaceAuthInteractor.class),
-                mUdfpsKeyguardAccessibilityDelegate, mUdfpsKeyguardViewModels);
+                mUdfpsKeyguardAccessibilityDelegate,
+                mUdfpsKeyguardViewModels
+        );
         verify(mFingerprintManager).setUdfpsOverlayController(mOverlayCaptor.capture());
         mOverlayController = mOverlayCaptor.getValue();
         verify(mScreenLifecycle).addObserver(mScreenObserverCaptor.capture());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
index 032753a..3276e66 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java
@@ -18,7 +18,6 @@
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -27,15 +26,14 @@
 import com.android.keyguard.KeyguardUpdateMonitor;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.animation.ActivityLaunchAnimator;
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
 import com.android.systemui.dump.DumpManager;
 import com.android.systemui.flags.FakeFeatureFlags;
 import com.android.systemui.flags.Flags;
 import com.android.systemui.keyguard.KeyguardViewMediator;
-import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
-import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.shade.ShadeExpansionChangeEvent;
-import com.android.systemui.shade.ShadeExpansionListener;
 import com.android.systemui.shade.ShadeExpansionStateManager;
 import com.android.systemui.statusbar.LockscreenShadeTransitionController;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -51,8 +49,6 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import java.util.List;
-
 public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase {
     // Dependencies
     protected @Mock UdfpsKeyguardViewLegacy mView;
@@ -83,9 +79,6 @@
     private @Captor ArgumentCaptor<StatusBarStateController.StateListener> mStateListenerCaptor;
     protected StatusBarStateController.StateListener mStatusBarStateListener;
 
-    private @Captor ArgumentCaptor<ShadeExpansionListener> mExpansionListenerCaptor;
-    protected List<ShadeExpansionListener> mExpansionListeners;
-
     private @Captor ArgumentCaptor<KeyguardStateController.Callback>
             mKeyguardStateControllerCallbackCaptor;
     protected KeyguardStateController.Callback mKeyguardStateControllerCallback;
@@ -116,23 +109,6 @@
         mStatusBarStateListener = mStateListenerCaptor.getValue();
     }
 
-    protected void captureStatusBarExpansionListeners() {
-        verify(mShadeExpansionStateManager, times(2))
-                .addExpansionListener(mExpansionListenerCaptor.capture());
-        // first (index=0) is from super class, UdfpsAnimationViewController.
-        // second (index=1) is from UdfpsKeyguardViewController
-        mExpansionListeners = mExpansionListenerCaptor.getAllValues();
-    }
-
-    protected void updateStatusBarExpansion(float fraction, boolean expanded) {
-        ShadeExpansionChangeEvent event =
-                new ShadeExpansionChangeEvent(
-                        fraction, expanded, /* tracking= */ false, /* dragDownPxAmount= */ 0f);
-        for (ShadeExpansionListener listener : mExpansionListeners) {
-            listener.onPanelExpansionChanged(event);
-        }
-    }
-
     protected void captureKeyguardStateControllerCallback() {
         verify(mKeyguardStateController).addCallback(
                 mKeyguardStateControllerCallbackCaptor.capture());
@@ -155,7 +131,6 @@
         UdfpsKeyguardViewControllerLegacy controller = new UdfpsKeyguardViewControllerLegacy(
                 mView,
                 mStatusBarStateController,
-                mShadeExpansionStateManager,
                 mStatusBarKeyguardViewManager,
                 mKeyguardUpdateMonitor,
                 mDumpManager,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
index d24290f..8508f45 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java
@@ -21,9 +21,7 @@
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.atLeast;
-import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -34,7 +32,6 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.systemui.RoboPilotTest;
-import com.android.systemui.shade.ShadeExpansionListener;
 import com.android.systemui.statusbar.StatusBarState;
 
 import org.junit.Test;
@@ -66,12 +63,6 @@
     }
 
     @Test
-    public void testRegistersExpansionChangedListenerOnAttached() {
-        mController.onViewAttached();
-        captureStatusBarExpansionListeners();
-    }
-
-    @Test
     public void testRegistersStatusBarStateListenersOnAttached() {
         mController.onViewAttached();
         captureStatusBarStateListeners();
@@ -98,14 +89,10 @@
     public void testListenersUnregisteredOnDetached() {
         mController.onViewAttached();
         captureStatusBarStateListeners();
-        captureStatusBarExpansionListeners();
         captureKeyguardStateControllerCallback();
         mController.onViewDetached();
 
         verify(mStatusBarStateController).removeCallback(mStatusBarStateListener);
-        for (ShadeExpansionListener listener : mExpansionListeners) {
-            verify(mShadeExpansionStateManager).removeExpansionListener(listener);
-        }
         verify(mKeyguardStateController).removeCallback(mKeyguardStateControllerCallback);
     }
 
@@ -134,23 +121,6 @@
     }
 
     @Test
-    public void testFadeFromDialogSuggestedAlpha() {
-        // GIVEN view is attached and status bar expansion is 1f
-        mController.onViewAttached();
-        captureStatusBarStateListeners();
-        captureStatusBarExpansionListeners();
-        updateStatusBarExpansion(1f, true);
-        reset(mView);
-
-        // WHEN dialog suggested alpha is .6f
-        when(mView.getDialogSuggestedAlpha()).thenReturn(.6f);
-        sendStatusBarStateChanged(StatusBarState.KEYGUARD);
-
-        // THEN alpha is updated based on dialog suggested alpha
-        verify(mView).setUnpausedAlpha((int) (.6f * 255));
-    }
-
-    @Test
     public void testShouldNotPauseAuthOnKeyguard() {
         mController.onViewAttached();
         captureStatusBarStateListeners();
@@ -250,72 +220,6 @@
     }
 
     @Test
-    public void testFadeInWithStatusBarExpansion() {
-        // GIVEN view is attached
-        mController.onViewAttached();
-        captureStatusBarExpansionListeners();
-        captureKeyguardStateControllerCallback();
-        reset(mView);
-
-        // WHEN status bar expansion is 0
-        updateStatusBarExpansion(0, true);
-
-        // THEN alpha is 0
-        verify(mView).setUnpausedAlpha(0);
-    }
-
-    @Test
-    public void testTransitionToFullShadeProgress() {
-        // GIVEN view is attached and status bar expansion is 1f
-        mController.onViewAttached();
-        captureStatusBarExpansionListeners();
-        updateStatusBarExpansion(1f, true);
-        reset(mView);
-        when(mView.getDialogSuggestedAlpha()).thenReturn(1f);
-
-        // WHEN we're transitioning to the full shade
-        float transitionProgress = .6f;
-        mController.setTransitionToFullShadeProgress(transitionProgress);
-
-        // THEN alpha is between 0 and 255
-        verify(mView).setUnpausedAlpha((int) ((1f - transitionProgress) * 255));
-    }
-
-    @Test
-    public void testUpdatePanelExpansion_pauseAuth() {
-        // GIVEN view is attached + on the keyguard
-        mController.onViewAttached();
-        captureStatusBarStateListeners();
-        captureStatusBarExpansionListeners();
-        sendStatusBarStateChanged(StatusBarState.KEYGUARD);
-        reset(mView);
-
-        // WHEN panelViewExpansion changes to hide
-        when(mView.getUnpausedAlpha()).thenReturn(0);
-        updateStatusBarExpansion(0f, false);
-
-        // THEN pause auth is updated to PAUSE
-        verify(mView, atLeastOnce()).setPauseAuth(true);
-    }
-
-    @Test
-    public void testUpdatePanelExpansion_unpauseAuth() {
-        // GIVEN view is attached + on the keyguard + panel expansion is 0f
-        mController.onViewAttached();
-        captureStatusBarStateListeners();
-        captureStatusBarExpansionListeners();
-        sendStatusBarStateChanged(StatusBarState.KEYGUARD);
-        reset(mView);
-
-        // WHEN panelViewExpansion changes to expanded
-        when(mView.getUnpausedAlpha()).thenReturn(255);
-        updateStatusBarExpansion(1f, true);
-
-        // THEN pause auth is updated to NOT pause
-        verify(mView, atLeastOnce()).setPauseAuth(false);
-    }
-
-    @Test
     // TODO(b/259264861): Tracking Bug
     public void testUdfpsExpandedOverlayOn() {
         // GIVEN view is attached and useExpandedOverlay is true
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
index 8dfeb3b..1885f64 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt
@@ -39,8 +39,10 @@
 import com.android.systemui.plugins.statusbar.StatusBarStateController
 import com.android.systemui.statusbar.StatusBarState
 import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.util.mockito.whenever
 import com.android.systemui.util.time.FakeSystemClock
 import com.android.systemui.util.time.SystemClock
+import kotlinx.coroutines.test.StandardTestDispatcher
 import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
@@ -51,6 +53,7 @@
 import org.junit.runner.RunWith
 import org.mockito.ArgumentMatchers.any
 import org.mockito.Mock
+import org.mockito.Mockito
 import org.mockito.Mockito.mock
 import org.mockito.Mockito.verify
 import org.mockito.MockitoAnnotations
@@ -62,15 +65,15 @@
 @kotlinx.coroutines.ExperimentalCoroutinesApi
 class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest :
     UdfpsKeyguardViewLegacyControllerBaseTest() {
-    lateinit var keyguardBouncerRepository: KeyguardBouncerRepository
-    @Mock private lateinit var bouncerLogger: TableLogBuffer
+    private val testDispatcher = StandardTestDispatcher()
+    private val testScope = TestScope(testDispatcher)
 
-    private lateinit var testScope: TestScope
+    private lateinit var keyguardBouncerRepository: KeyguardBouncerRepository
+
+    @Mock private lateinit var bouncerLogger: TableLogBuffer
 
     @Before
     override fun setUp() {
-        testScope = TestScope()
-
         allowTestableLooperAsMainThread() // repeatWhenAttached requires the main thread
         MockitoAnnotations.initMocks(this)
         keyguardBouncerRepository =
@@ -82,7 +85,7 @@
         super.setUp()
     }
 
-    override fun createUdfpsKeyguardViewController(): UdfpsKeyguardViewControllerLegacy? {
+    override fun createUdfpsKeyguardViewController(): UdfpsKeyguardViewControllerLegacy {
         mPrimaryBouncerInteractor =
             PrimaryBouncerInteractor(
                 keyguardBouncerRepository,
@@ -115,6 +118,70 @@
     }
 
     @Test
+    fun bouncerExpansionChange_fadeIn() =
+        testScope.runTest {
+            // GIVEN view is attached
+            mController.onViewAttached()
+            captureKeyguardStateControllerCallback()
+            Mockito.reset(mView)
+
+            // WHEN status bar expansion is 0
+            val job = mController.listenForBouncerExpansion(this)
+            keyguardBouncerRepository.setPrimaryShow(true)
+            keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
+            runCurrent()
+
+            // THEN alpha is 0
+            verify(mView).unpausedAlpha = 0
+
+            job.cancel()
+        }
+
+    @Test
+    fun bouncerExpansionChange_pauseAuth() =
+        testScope.runTest {
+            // GIVEN view is attached + on the keyguard
+            mController.onViewAttached()
+            captureStatusBarStateListeners()
+            sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+            Mockito.reset(mView)
+
+            // WHEN panelViewExpansion changes to hide
+            whenever(mView.unpausedAlpha).thenReturn(0)
+            val job = mController.listenForBouncerExpansion(this)
+            keyguardBouncerRepository.setPrimaryShow(true)
+            keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
+            runCurrent()
+
+            // THEN pause auth is updated to PAUSE
+            verify(mView, Mockito.atLeastOnce()).setPauseAuth(true)
+
+            job.cancel()
+        }
+
+    @Test
+    fun bouncerExpansionChange_unpauseAuth() =
+        testScope.runTest {
+            // GIVEN view is attached + on the keyguard + panel expansion is 0f
+            mController.onViewAttached()
+            captureStatusBarStateListeners()
+            sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+            Mockito.reset(mView)
+
+            // WHEN panelViewExpansion changes to expanded
+            whenever(mView.unpausedAlpha).thenReturn(255)
+            val job = mController.listenForBouncerExpansion(this)
+            keyguardBouncerRepository.setPrimaryShow(true)
+            keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+            runCurrent()
+
+            // THEN pause auth is updated to NOT pause
+            verify(mView, Mockito.atLeastOnce()).setPauseAuth(false)
+
+            job.cancel()
+        }
+
+    @Test
     fun shadeLocked_showAlternateBouncer_unpauseAuth() =
         testScope.runTest {
             // GIVEN view is attached + on the SHADE_LOCKED (udfps view not showing)
@@ -154,4 +221,48 @@
 
             job.cancel()
         }
+
+    @Test
+    fun fadeFromDialogSuggestedAlpha() =
+        testScope.runTest {
+            // GIVEN view is attached and status bar expansion is 1f
+            mController.onViewAttached()
+            captureStatusBarStateListeners()
+            val job = mController.listenForBouncerExpansion(this)
+            keyguardBouncerRepository.setPrimaryShow(true)
+            keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+            runCurrent()
+            Mockito.reset(mView)
+
+            // WHEN dialog suggested alpha is .6f
+            whenever(mView.dialogSuggestedAlpha).thenReturn(.6f)
+            sendStatusBarStateChanged(StatusBarState.KEYGUARD)
+
+            // THEN alpha is updated based on dialog suggested alpha
+            verify(mView).unpausedAlpha = (.6f * 255).toInt()
+
+            job.cancel()
+        }
+
+    @Test
+    fun transitionToFullShadeProgress() =
+        testScope.runTest {
+            // GIVEN view is attached and status bar expansion is 1f
+            mController.onViewAttached()
+            val job = mController.listenForBouncerExpansion(this)
+            keyguardBouncerRepository.setPrimaryShow(true)
+            keyguardBouncerRepository.setPanelExpansion(KeyguardBouncerConstants.EXPANSION_HIDDEN)
+            runCurrent()
+            Mockito.reset(mView)
+            whenever(mView.dialogSuggestedAlpha).thenReturn(1f)
+
+            // WHEN we're transitioning to the full shade
+            val transitionProgress = .6f
+            mController.setTransitionToFullShadeProgress(transitionProgress)
+
+            // THEN alpha is between 0 and 255
+            verify(mView).unpausedAlpha = ((1f - transitionProgress) * 255).toInt()
+
+            job.cancel()
+        }
 }
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java
similarity index 84%
rename from packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java
rename to packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java
index f4f0ef9..2aeba9a 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/udfps/UdfpsUtilsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsUtilsTest.java
@@ -14,40 +14,45 @@
  * limitations under the License.
  */
 
-package com.android.settingslib.udfps;
+package com.android.systemui.biometrics;
 
 import static com.google.common.truth.Truth.assertThat;
 
-import android.content.Context;
+import android.content.res.Resources;
 import android.graphics.Rect;
 import android.view.Surface;
 
-import com.android.settingslib.R;
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams;
+import com.android.systemui.shared.biometrics.R;
 
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
 import org.mockito.junit.MockitoJUnit;
 import org.mockito.junit.MockitoRule;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
 
-
-@RunWith(RobolectricTestRunner.class)
-public class UdfpsUtilsTest {
+@RunWith(JUnit4.class)
+@SmallTest
+public class UdfpsUtilsTest extends SysuiTestCase {
     @Rule
     public final MockitoRule rule = MockitoJUnit.rule();
-
-    private Context mContext;
     private String[] mTouchHints;
     private UdfpsUtils mUdfpsUtils;
 
     @Before
     public void setUp() {
-        mContext = RuntimeEnvironment.application;
-        mTouchHints = mContext.getResources().getStringArray(
-                R.array.udfps_accessibility_touch_hints);
+        Resources resources = mContext.getResources();
+        mTouchHints = new String[]{
+                resources.getString(R.string.udfps_accessibility_touch_hints_left),
+                resources.getString(R.string.udfps_accessibility_touch_hints_down),
+                resources.getString(R.string.udfps_accessibility_touch_hints_right),
+                resources.getString(R.string.udfps_accessibility_touch_hints_up),
+        };
         mUdfpsUtils = new UdfpsUtils();
     }
 
@@ -86,7 +91,7 @@
 
 
     @Test
-    public void testTouchOutsideAreaNoRotation90Degrees() {
+    public void testTouchOutsideAreaRotation90Degrees() {
         int rotation = Surface.ROTATION_90;
         // touch at 0 degrees -> 90 degrees
         assertThat(
@@ -120,7 +125,7 @@
 
 
     @Test
-    public void testTouchOutsideAreaNoRotation270Degrees() {
+    public void testTouchOutsideAreaRotation270Degrees() {
         int rotation = Surface.ROTATION_270;
         // touch at 0 degrees -> 270 degrees
         assertThat(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
index d11c965..6d4588d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt
@@ -19,16 +19,16 @@
 import android.graphics.PointF
 import android.graphics.RectF
 import android.hardware.biometrics.SensorLocationInternal
-import androidx.test.ext.junit.runners.AndroidJUnit4
 import android.testing.TestableLooper
 import android.testing.ViewUtils
 import android.view.LayoutInflater
 import android.view.Surface
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.R
 import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.mock
 import com.android.systemui.util.mockito.withArgCaptor
@@ -42,8 +42,8 @@
 import org.mockito.Mockito.never
 import org.mockito.Mockito.nullable
 import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when` as whenever
 import org.mockito.junit.MockitoJUnit
+import org.mockito.Mockito.`when` as whenever
 
 private const val SENSOR_X = 50
 private const val SENSOR_Y = 250
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt
new file mode 100644
index 0000000..c9c46cb
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/DisplayStateRepositoryTest.kt
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.data.repository
+
+import android.hardware.devicestate.DeviceStateManager
+import android.hardware.display.DisplayManager
+import android.os.Handler
+import android.view.Display
+import android.view.DisplayInfo
+import android.view.Surface
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.data.repository.DisplayStateRepository
+import com.android.systemui.biometrics.data.repository.DisplayStateRepositoryImpl
+import com.android.systemui.biometrics.shared.model.DisplayRotation
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.eq
+import com.android.systemui.util.mockito.whenever
+import com.android.systemui.util.mockito.withArgCaptor
+import com.android.systemui.util.time.FakeSystemClock
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.JUnit4
+import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.same
+import org.mockito.Captor
+import org.mockito.Mock
+import org.mockito.Mockito.spy
+import org.mockito.Mockito.verify
+import org.mockito.junit.MockitoJUnit
+import org.mockito.junit.MockitoRule
+
+private const val NORMAL_DISPLAY_MODE_DEVICE_STATE = 2
+private const val REAR_DISPLAY_MODE_DEVICE_STATE = 3
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(JUnit4::class)
+class DisplayStateRepositoryTest : SysuiTestCase() {
+    @JvmField @Rule var mockitoRule: MockitoRule = MockitoJUnit.rule()
+    @Mock private lateinit var deviceStateManager: DeviceStateManager
+    @Mock private lateinit var displayManager: DisplayManager
+    @Mock private lateinit var handler: Handler
+    @Mock private lateinit var display: Display
+    private lateinit var underTest: DisplayStateRepository
+
+    private val testScope = TestScope(StandardTestDispatcher())
+    private val fakeExecutor = FakeExecutor(FakeSystemClock())
+
+    @Captor
+    private lateinit var displayListenerCaptor: ArgumentCaptor<DisplayManager.DisplayListener>
+
+    @Before
+    fun setUp() {
+        val rearDisplayDeviceStates = intArrayOf(REAR_DISPLAY_MODE_DEVICE_STATE)
+        mContext.orCreateTestableResources.addOverride(
+            com.android.internal.R.array.config_rearDisplayDeviceStates,
+            rearDisplayDeviceStates
+        )
+
+        mContext = spy(mContext)
+        whenever(mContext.display).thenReturn(display)
+
+        underTest =
+            DisplayStateRepositoryImpl(
+                testScope.backgroundScope,
+                mContext,
+                deviceStateManager,
+                displayManager,
+                handler,
+                fakeExecutor
+            )
+    }
+
+    @Test
+    fun updatesIsInRearDisplayMode_whenRearDisplayStateChanges() =
+        testScope.runTest {
+            val isInRearDisplayMode by collectLastValue(underTest.isInRearDisplayMode)
+            runCurrent()
+
+            val callback = deviceStateManager.captureCallback()
+
+            callback.onStateChanged(NORMAL_DISPLAY_MODE_DEVICE_STATE)
+            assertThat(isInRearDisplayMode).isFalse()
+
+            callback.onStateChanged(REAR_DISPLAY_MODE_DEVICE_STATE)
+            assertThat(isInRearDisplayMode).isTrue()
+        }
+
+    @Test
+    fun updatesCurrentRotation_whenDisplayStateChanges() =
+        testScope.runTest {
+            val currentRotation by collectLastValue(underTest.currentRotation)
+            runCurrent()
+
+            verify(displayManager)
+                .registerDisplayListener(
+                    displayListenerCaptor.capture(),
+                    same(handler),
+                    eq(DisplayManager.EVENT_FLAG_DISPLAY_CHANGED)
+                )
+
+            whenever(display.getDisplayInfo(any())).then {
+                val info = it.getArgument<DisplayInfo>(0)
+                info.rotation = Surface.ROTATION_90
+                return@then true
+            }
+            displayListenerCaptor.value.onDisplayChanged(Surface.ROTATION_90)
+            assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_90)
+
+            whenever(display.getDisplayInfo(any())).then {
+                val info = it.getArgument<DisplayInfo>(0)
+                info.rotation = Surface.ROTATION_180
+                return@then true
+            }
+            displayListenerCaptor.value.onDisplayChanged(Surface.ROTATION_180)
+            assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_180)
+        }
+}
+
+private fun DeviceStateManager.captureCallback() =
+    withArgCaptor<DeviceStateManager.DeviceStateCallback> {
+        verify(this@captureCallback).registerCallback(any(), capture())
+    }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/FingerprintRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/FingerprintRepositoryImplTest.kt
index 239e317..ed9ae5e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/FingerprintRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/FingerprintRepositoryImplTest.kt
@@ -29,6 +29,7 @@
 import com.android.systemui.biometrics.shared.model.SensorStrength
 import com.android.systemui.coroutines.collectLastValue
 import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.test.StandardTestDispatcher
 import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
@@ -44,6 +45,7 @@
 import org.mockito.Mockito.verify
 import org.mockito.junit.MockitoJUnit
 
+@OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
 @RunWith(JUnit4::class)
 class FingerprintRepositoryImplTest : SysuiTestCase() {
@@ -73,10 +75,15 @@
     @Test
     fun initializeProperties() =
         testScope.runTest {
-            val isInitialized = collectLastValue(repository.isInitialized)
+            val sensorId by collectLastValue(repository.sensorId)
+            val strength by collectLastValue(repository.strength)
+            val sensorType by collectLastValue(repository.sensorType)
+            val sensorLocations by collectLastValue(repository.sensorLocations)
 
-            assertDefaultProperties()
-            assertThat(isInitialized()).isFalse()
+            // Assert default properties.
+            assertThat(sensorId).isEqualTo(-1)
+            assertThat(strength).isEqualTo(SensorStrength.CONVENIENCE)
+            assertThat(sensorType).isEqualTo(FingerprintSensorType.UNKNOWN)
 
             val fingerprintProps =
                 listOf(
@@ -115,31 +122,24 @@
 
             fingerprintAuthenticatorsCaptor.value.onAllAuthenticatorsRegistered(fingerprintProps)
 
-            assertThat(repository.sensorId.value).isEqualTo(1)
-            assertThat(repository.strength.value).isEqualTo(SensorStrength.STRONG)
-            assertThat(repository.sensorType.value).isEqualTo(FingerprintSensorType.REAR)
+            assertThat(sensorId).isEqualTo(1)
+            assertThat(strength).isEqualTo(SensorStrength.STRONG)
+            assertThat(sensorType).isEqualTo(FingerprintSensorType.REAR)
 
-            assertThat(repository.sensorLocations.value.size).isEqualTo(2)
-            assertThat(repository.sensorLocations.value).containsKey("display_id_1")
-            with(repository.sensorLocations.value["display_id_1"]!!) {
+            assertThat(sensorLocations?.size).isEqualTo(2)
+            assertThat(sensorLocations).containsKey("display_id_1")
+            with(sensorLocations?.get("display_id_1")!!) {
                 assertThat(displayId).isEqualTo("display_id_1")
                 assertThat(sensorLocationX).isEqualTo(100)
                 assertThat(sensorLocationY).isEqualTo(300)
                 assertThat(sensorRadius).isEqualTo(20)
             }
-            assertThat(repository.sensorLocations.value).containsKey("")
-            with(repository.sensorLocations.value[""]!!) {
+            assertThat(sensorLocations).containsKey("")
+            with(sensorLocations?.get("")!!) {
                 assertThat(displayId).isEqualTo("")
                 assertThat(sensorLocationX).isEqualTo(540)
                 assertThat(sensorLocationY).isEqualTo(1636)
                 assertThat(sensorRadius).isEqualTo(130)
             }
-            assertThat(isInitialized()).isTrue()
         }
-
-    private fun assertDefaultProperties() {
-        assertThat(repository.sensorId.value).isEqualTo(-1)
-        assertThat(repository.strength.value).isEqualTo(SensorStrength.CONVENIENCE)
-        assertThat(repository.sensorType.value).isEqualTo(FingerprintSensorType.UNKNOWN)
-    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt
deleted file mode 100644
index dfe8d36..0000000
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/RearDisplayStateRepositoryTest.kt
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.data.repository
-
-import android.hardware.devicestate.DeviceStateManager
-import androidx.test.filters.SmallTest
-import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepository
-import com.android.systemui.biometrics.data.repository.RearDisplayStateRepositoryImpl
-import com.android.systemui.coroutines.collectLastValue
-import com.android.systemui.util.concurrency.FakeExecutor
-import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.withArgCaptor
-import com.android.systemui.util.time.FakeSystemClock
-import com.google.common.truth.Truth.assertThat
-import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
-import kotlinx.coroutines.test.runCurrent
-import kotlinx.coroutines.test.runTest
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mock
-import org.mockito.Mockito.verify
-import org.mockito.junit.MockitoJUnit
-import org.mockito.junit.MockitoRule
-
-private const val NORMAL_DISPLAY_MODE_DEVICE_STATE = 2
-private const val REAR_DISPLAY_MODE_DEVICE_STATE = 3
-
-@OptIn(ExperimentalCoroutinesApi::class)
-@SmallTest
-@RunWith(JUnit4::class)
-class RearDisplayStateRepositoryTest : SysuiTestCase() {
-    @JvmField @Rule var mockitoRule: MockitoRule = MockitoJUnit.rule()
-    @Mock private lateinit var deviceStateManager: DeviceStateManager
-    private lateinit var underTest: RearDisplayStateRepository
-
-    private val testScope = TestScope(StandardTestDispatcher())
-    private val fakeExecutor = FakeExecutor(FakeSystemClock())
-
-    @Captor
-    private lateinit var callbackCaptor: ArgumentCaptor<DeviceStateManager.DeviceStateCallback>
-
-    @Before
-    fun setUp() {
-        val rearDisplayDeviceStates = intArrayOf(REAR_DISPLAY_MODE_DEVICE_STATE)
-        mContext.orCreateTestableResources.addOverride(
-            com.android.internal.R.array.config_rearDisplayDeviceStates,
-            rearDisplayDeviceStates
-        )
-
-        underTest =
-            RearDisplayStateRepositoryImpl(
-                testScope.backgroundScope,
-                mContext,
-                deviceStateManager,
-                fakeExecutor
-            )
-    }
-
-    @Test
-    fun updatesIsInRearDisplayMode_whenRearDisplayStateChanges() =
-        testScope.runTest {
-            val isInRearDisplayMode = collectLastValue(underTest.isInRearDisplayMode)
-            runCurrent()
-
-            val callback = deviceStateManager.captureCallback()
-
-            callback.onStateChanged(NORMAL_DISPLAY_MODE_DEVICE_STATE)
-            assertThat(isInRearDisplayMode()).isFalse()
-
-            callback.onStateChanged(REAR_DISPLAY_MODE_DEVICE_STATE)
-            assertThat(isInRearDisplayMode()).isTrue()
-        }
-}
-
-private fun DeviceStateManager.captureCallback() =
-    withArgCaptor<DeviceStateManager.DeviceStateCallback> {
-        verify(this@captureCallback).registerCallback(any(), capture())
-    }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
index 2217c5c..bf6caad 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/DisplayStateInteractorImplTest.kt
@@ -1,9 +1,13 @@
 package com.android.systemui.biometrics.domain.interactor
 
+import android.view.Display
 import androidx.test.filters.SmallTest
 import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
+import com.android.systemui.biometrics.shared.model.DisplayRotation
 import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.FakeDisplayRepository
+import com.android.systemui.display.data.repository.display
 import com.android.systemui.unfold.compat.ScreenSizeFoldProvider
 import com.android.systemui.unfold.updates.FoldProvider
 import com.android.systemui.util.concurrency.FakeExecutor
@@ -34,19 +38,23 @@
 
     private val fakeExecutor = FakeExecutor(FakeSystemClock())
     private val testScope = TestScope(StandardTestDispatcher())
-    private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+    private lateinit var displayStateRepository: FakeDisplayStateRepository
+    private lateinit var displayRepository: FakeDisplayRepository
 
     @Mock private lateinit var screenSizeFoldProvider: ScreenSizeFoldProvider
     private lateinit var interactor: DisplayStateInteractorImpl
 
     @Before
     fun setup() {
+        displayStateRepository = FakeDisplayStateRepository()
+        displayRepository = FakeDisplayRepository()
         interactor =
             DisplayStateInteractorImpl(
                 testScope.backgroundScope,
                 mContext,
                 fakeExecutor,
-                rearDisplayStateRepository
+                displayStateRepository,
+                displayRepository,
             )
         interactor.setScreenSizeFoldProvider(screenSizeFoldProvider)
     }
@@ -54,27 +62,54 @@
     @Test
     fun isInRearDisplayModeChanges() =
         testScope.runTest {
-            val isInRearDisplayMode = collectLastValue(interactor.isInRearDisplayMode)
+            val isInRearDisplayMode by collectLastValue(interactor.isInRearDisplayMode)
 
-            rearDisplayStateRepository.setIsInRearDisplayMode(false)
-            assertThat(isInRearDisplayMode()).isFalse()
+            displayStateRepository.setIsInRearDisplayMode(false)
+            assertThat(isInRearDisplayMode).isFalse()
 
-            rearDisplayStateRepository.setIsInRearDisplayMode(true)
-            assertThat(isInRearDisplayMode()).isTrue()
+            displayStateRepository.setIsInRearDisplayMode(true)
+            assertThat(isInRearDisplayMode).isTrue()
+        }
+
+    @Test
+    fun currentRotationChanges() =
+        testScope.runTest {
+            val currentRotation by collectLastValue(interactor.currentRotation)
+
+            displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_180)
+            assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_180)
+
+            displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_90)
+            assertThat(currentRotation).isEqualTo(DisplayRotation.ROTATION_90)
         }
 
     @Test
     fun isFoldedChanges() =
         testScope.runTest {
-            val isFolded = collectLastValue(interactor.isFolded)
+            val isFolded by collectLastValue(interactor.isFolded)
             runCurrent()
             val callback = screenSizeFoldProvider.captureCallback()
 
             callback.onFoldUpdated(isFolded = true)
-            assertThat(isFolded()).isTrue()
+            assertThat(isFolded).isTrue()
 
             callback.onFoldUpdated(isFolded = false)
-            assertThat(isFolded()).isFalse()
+            assertThat(isFolded).isFalse()
+        }
+
+    @Test
+    fun isDefaultDisplayOffChanges() =
+        testScope.runTest {
+            val isDefaultDisplayOff by collectLastValue(interactor.isDefaultDisplayOff)
+            runCurrent()
+
+            displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF)))
+            displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+            assertThat(isDefaultDisplayOff).isTrue()
+
+            displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_ON)))
+            displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+            assertThat(isDefaultDisplayOff).isFalse()
         }
 }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
index 4d5e1b7..f15b738 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/PromptSelectorInteractorImplTest.kt
@@ -25,9 +25,9 @@
 import com.android.systemui.biometrics.Utils
 import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
 import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.domain.model.BiometricModalities
 import com.android.systemui.biometrics.faceSensorPropertiesInternal
 import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.PromptKind
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.util.mockito.any
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractorTest.kt
index fd96cf4..712eef1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/SideFpsOverlayInteractorTest.kt
@@ -22,6 +22,7 @@
 import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
 import com.android.systemui.biometrics.shared.model.FingerprintSensorType
 import com.android.systemui.biometrics.shared.model.SensorStrength
+import com.android.systemui.coroutines.collectLastValue
 import com.google.common.truth.Truth.assertThat
 import kotlinx.coroutines.test.StandardTestDispatcher
 import kotlinx.coroutines.test.TestScope
@@ -51,7 +52,7 @@
     }
 
     @Test
-    fun testGetOverlayOffsets() =
+    fun testOverlayOffsetUpdates() =
         testScope.runTest {
             fingerprintRepository.setProperties(
                 sensorId = 1,
@@ -76,16 +77,32 @@
                     )
             )
 
-            var offsets = interactor.getOverlayOffsets("display_id_1")
-            assertThat(offsets.displayId).isEqualTo("display_id_1")
-            assertThat(offsets.sensorLocationX).isEqualTo(100)
-            assertThat(offsets.sensorLocationY).isEqualTo(300)
-            assertThat(offsets.sensorRadius).isEqualTo(20)
+            val displayId by collectLastValue(interactor.displayId)
+            val offsets by collectLastValue(interactor.overlayOffsets)
 
-            offsets = interactor.getOverlayOffsets("invalid_display_id")
-            assertThat(offsets.displayId).isEqualTo("")
-            assertThat(offsets.sensorLocationX).isEqualTo(540)
-            assertThat(offsets.sensorLocationY).isEqualTo(1636)
-            assertThat(offsets.sensorRadius).isEqualTo(130)
+            // Assert offsets of empty displayId.
+            assertThat(displayId).isEqualTo("")
+            assertThat(offsets?.displayId).isEqualTo("")
+            assertThat(offsets?.sensorLocationX).isEqualTo(540)
+            assertThat(offsets?.sensorLocationY).isEqualTo(1636)
+            assertThat(offsets?.sensorRadius).isEqualTo(130)
+
+            // Offsets should be updated correctly.
+            interactor.onDisplayChanged("display_id_1")
+            assertThat(displayId).isEqualTo("display_id_1")
+            assertThat(offsets?.displayId).isEqualTo("display_id_1")
+            assertThat(offsets?.sensorLocationX).isEqualTo(100)
+            assertThat(offsets?.sensorLocationY).isEqualTo(300)
+            assertThat(offsets?.sensorRadius).isEqualTo(20)
+
+            // Should return default offset when the displayId is invalid.
+            interactor.onDisplayChanged("invalid_display_id")
+            assertThat(displayId).isEqualTo("invalid_display_id")
+            assertThat(offsets?.displayId).isEqualTo(SensorLocationInternal.DEFAULT.displayId)
+            assertThat(offsets?.sensorLocationX)
+                .isEqualTo(SensorLocationInternal.DEFAULT.sensorLocationX)
+            assertThat(offsets?.sensorLocationY)
+                .isEqualTo(SensorLocationInternal.DEFAULT.sensorLocationY)
+            assertThat(offsets?.sensorRadius).isEqualTo(SensorLocationInternal.DEFAULT.sensorRadius)
         }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
index 9431d86..6b9c34b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/UdfpsOverlayInteractorTest.kt
@@ -20,9 +20,9 @@
 import android.test.suitebuilder.annotation.SmallTest
 import android.view.MotionEvent
 import android.view.Surface
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.biometrics.AuthController
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.android.systemui.coroutines.collectLastValue
 import com.google.common.truth.Truth.assertThat
 import kotlinx.coroutines.test.StandardTestDispatcher
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
index be0276a..9e3c576 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricPromptRequestTest.kt
@@ -4,6 +4,7 @@
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
 import com.android.systemui.biometrics.promptInfo
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricUserInfo
 import com.google.common.truth.Truth.assertThat
 import org.junit.Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt
similarity index 98%
rename from packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt
rename to packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt
index 526b833..22e3e7f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/model/BiometricModalitiesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/shared/model/BiometricModalitiesTest.kt
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.systemui.biometrics.domain.model
+package com.android.systemui.biometrics.shared.model
 
 import androidx.test.filters.SmallTest
 import com.android.systemui.SysuiTestCase
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
index ec2c1bc..99c2c40 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/udfps/SinglePointerTouchProcessorTest.kt
@@ -23,8 +23,8 @@
 import android.view.Surface
 import android.view.Surface.Rotation
 import androidx.test.filters.SmallTest
-import com.android.settingslib.udfps.UdfpsOverlayParams
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
 import com.google.common.truth.Truth.assertThat
 import org.junit.Test
 import org.junit.runner.RunWith
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
index 7697c09..fd86486 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptFingerprintIconViewModelTest.kt
@@ -4,9 +4,9 @@
 import androidx.test.filters.SmallTest
 import com.android.internal.widget.LockPatternUtils
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
 import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
 import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
@@ -14,6 +14,7 @@
 import com.android.systemui.biometrics.shared.model.FingerprintSensorType
 import com.android.systemui.biometrics.shared.model.SensorStrength
 import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.FakeDisplayRepository
 import com.android.systemui.util.concurrency.FakeExecutor
 import com.android.systemui.util.time.FakeSystemClock
 import com.google.common.truth.Truth.assertThat
@@ -39,9 +40,10 @@
 
     @Mock private lateinit var lockPatternUtils: LockPatternUtils
 
-    private val fingerprintRepository = FakeFingerprintPropertyRepository()
-    private val promptRepository = FakePromptRepository()
-    private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
+    private lateinit var displayRepository: FakeDisplayRepository
+    private lateinit var fingerprintRepository: FakeFingerprintPropertyRepository
+    private lateinit var promptRepository: FakePromptRepository
+    private lateinit var displayStateRepository: FakeDisplayStateRepository
 
     private val testScope = TestScope(StandardTestDispatcher())
     private val fakeExecutor = FakeExecutor(FakeSystemClock())
@@ -52,6 +54,11 @@
 
     @Before
     fun setup() {
+        displayRepository = FakeDisplayRepository()
+        fingerprintRepository = FakeFingerprintPropertyRepository()
+        promptRepository = FakePromptRepository()
+        displayStateRepository = FakeDisplayStateRepository()
+
         promptSelectorInteractor =
             PromptSelectorInteractorImpl(fingerprintRepository, promptRepository, lockPatternUtils)
         displayStateInteractor =
@@ -59,7 +66,8 @@
                 testScope.backgroundScope,
                 mContext,
                 fakeExecutor,
-                rearDisplayStateRepository
+                displayStateRepository,
+                displayRepository,
             )
         viewModel = PromptFingerprintIconViewModel(displayStateInteractor, promptSelectorInteractor)
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
index 0ed46da..ca6df40 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
@@ -24,20 +24,22 @@
 import androidx.test.filters.SmallTest
 import com.android.internal.widget.LockPatternUtils
 import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.AuthBiometricView
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
 import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository
 import com.android.systemui.biometrics.data.repository.FakePromptRepository
-import com.android.systemui.biometrics.data.repository.FakeRearDisplayStateRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
 import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractor
 import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteractorImpl
-import com.android.systemui.biometrics.domain.model.BiometricModalities
 import com.android.systemui.biometrics.extractAuthenticatorTypes
 import com.android.systemui.biometrics.faceSensorPropertiesInternal
 import com.android.systemui.biometrics.fingerprintSensorPropertiesInternal
+import com.android.systemui.biometrics.shared.model.BiometricModalities
 import com.android.systemui.biometrics.shared.model.BiometricModality
+import com.android.systemui.biometrics.ui.binder.Spaghetti.BiometricState
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.coroutines.collectValues
+import com.android.systemui.display.data.repository.FakeDisplayRepository
 import com.android.systemui.flags.FakeFeatureFlags
 import com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION
 import com.android.systemui.statusbar.VibratorHelper
@@ -77,17 +79,12 @@
 
     private val fakeExecutor = FakeExecutor(FakeSystemClock())
     private val testScope = TestScope()
-    private val fingerprintRepository = FakeFingerprintPropertyRepository()
-    private val promptRepository = FakePromptRepository()
-    private val rearDisplayStateRepository = FakeRearDisplayStateRepository()
 
-    private val displayStateInteractor =
-        DisplayStateInteractorImpl(
-            testScope.backgroundScope,
-            mContext,
-            fakeExecutor,
-            rearDisplayStateRepository
-        )
+    private lateinit var fingerprintRepository: FakeFingerprintPropertyRepository
+    private lateinit var promptRepository: FakePromptRepository
+    private lateinit var displayStateRepository: FakeDisplayStateRepository
+    private lateinit var displayRepository: FakeDisplayRepository
+    private lateinit var displayStateInteractor: DisplayStateInteractor
 
     private lateinit var selector: PromptSelectorInteractor
     private lateinit var viewModel: PromptViewModel
@@ -95,11 +92,24 @@
 
     @Before
     fun setup() {
+        fingerprintRepository = FakeFingerprintPropertyRepository()
+        promptRepository = FakePromptRepository()
+        displayStateRepository = FakeDisplayStateRepository()
+        displayRepository = FakeDisplayRepository()
+        displayStateInteractor =
+            DisplayStateInteractorImpl(
+                testScope.backgroundScope,
+                mContext,
+                fakeExecutor,
+                displayStateRepository,
+                displayRepository,
+            )
         selector =
             PromptSelectorInteractorImpl(fingerprintRepository, promptRepository, lockPatternUtils)
         selector.resetPrompt()
 
-        viewModel = PromptViewModel(displayStateInteractor, selector, vibrator, featureFlags)
+        viewModel =
+            PromptViewModel(displayStateInteractor, selector, vibrator, mContext, featureFlags)
         featureFlags.set(ONE_WAY_HAPTICS_API_MIGRATION, false)
     }
 
@@ -123,7 +133,7 @@
             }
             assertThat(message).isEqualTo(PromptMessage.Empty)
             assertThat(size).isEqualTo(expectedSize)
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_IDLE)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_IDLE)
 
             val startMessage = "here we go"
             viewModel.showAuthenticating(startMessage, isRetry = false)
@@ -133,7 +143,7 @@
             assertThat(authenticated?.isNotAuthenticated).isTrue()
             assertThat(size).isEqualTo(expectedSize)
             assertButtonsVisible(negative = expectedSize != PromptSize.SMALL)
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATING)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATING)
         }
 
     @Test
@@ -211,7 +221,7 @@
         assertThat(authenticating).isTrue()
         assertThat(authenticated?.isNotAuthenticated).isTrue()
         assertThat(size).isEqualTo(if (authWithSmallPrompt) PromptSize.SMALL else PromptSize.MEDIUM)
-        assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATING)
+        assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATING)
         assertButtonsVisible(negative = !authWithSmallPrompt)
 
         val delay = 1000L
@@ -231,9 +241,9 @@
         assertThat(legacyState)
             .isEqualTo(
                 if (expectConfirmation) {
-                    AuthBiometricView.STATE_PENDING_CONFIRMATION
+                    BiometricState.STATE_PENDING_CONFIRMATION
                 } else {
-                    AuthBiometricView.STATE_AUTHENTICATED
+                    BiometricState.STATE_AUTHENTICATED
                 }
             )
         assertButtonsVisible(
@@ -302,7 +312,7 @@
         assertThat(size).isEqualTo(PromptSize.MEDIUM)
         assertThat(message).isEqualTo(PromptMessage.Error(errorMessage))
         assertThat(messageVisible).isTrue()
-        assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_ERROR)
+        assertThat(legacyState).isEqualTo(BiometricState.STATE_ERROR)
 
         // temporary error should disappear after a delay
         errorJob.join()
@@ -317,11 +327,11 @@
         assertThat(legacyState)
             .isEqualTo(
                 if (restart) {
-                    AuthBiometricView.STATE_AUTHENTICATING
+                    BiometricState.STATE_AUTHENTICATING
                 } else if (clearIconError) {
-                    AuthBiometricView.STATE_IDLE
+                    BiometricState.STATE_IDLE
                 } else {
-                    AuthBiometricView.STATE_HELP
+                    BiometricState.STATE_HELP
                 }
             )
 
@@ -496,7 +506,7 @@
 
         assertThat(authenticating).isFalse()
         assertThat(authenticated?.isAuthenticated).isTrue()
-        assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+        assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
         assertThat(canTryAgain).isFalse()
     }
 
@@ -522,7 +532,7 @@
         assertThat(authenticated?.isAuthenticated).isTrue()
 
         if (testCase.isFaceOnly && expectConfirmation) {
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_PENDING_CONFIRMATION)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_PENDING_CONFIRMATION)
 
             assertThat(size).isEqualTo(PromptSize.MEDIUM)
             assertButtonsVisible(
@@ -534,7 +544,7 @@
             assertThat(message).isEqualTo(PromptMessage.Empty)
             assertButtonsVisible()
         } else {
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
         }
     }
 
@@ -571,7 +581,7 @@
 
         assertThat(authenticating).isFalse()
         assertThat(authenticated?.isAuthenticated).isTrue()
-        assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+        assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
         assertThat(canTryAgain).isFalse()
     }
 
@@ -605,7 +615,7 @@
         viewModel.showHelp(helpMessage)
 
         assertThat(size).isEqualTo(PromptSize.MEDIUM)
-        assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_HELP)
+        assertThat(legacyState).isEqualTo(BiometricState.STATE_HELP)
         assertThat(message).isEqualTo(PromptMessage.Help(helpMessage))
         assertThat(messageVisible).isTrue()
 
@@ -633,9 +643,9 @@
 
         assertThat(size).isEqualTo(PromptSize.MEDIUM)
         if (confirmationRequired == true) {
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_PENDING_CONFIRMATION)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_PENDING_CONFIRMATION)
         } else {
-            assertThat(legacyState).isEqualTo(AuthBiometricView.STATE_AUTHENTICATED)
+            assertThat(legacyState).isEqualTo(BiometricState.STATE_AUTHENTICATED)
         }
         assertThat(message).isEqualTo(PromptMessage.Help(helpMessage))
         assertThat(messageVisible).isTrue()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
index f892453..420fdba 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
@@ -115,7 +115,7 @@
     @Test
     fun testShow_isScrimmed() {
         underTest.show(true)
-        verify(repository).setKeyguardAuthenticated(null)
+        verify(repository).setKeyguardAuthenticatedBiometrics(null)
         verify(repository).setPrimaryStartingToHide(false)
         verify(repository).setPrimaryScrimmed(true)
         verify(repository).setPanelExpansion(EXPANSION_VISIBLE)
@@ -222,8 +222,8 @@
 
     @Test
     fun testNotifyKeyguardAuthenticated() {
-        underTest.notifyKeyguardAuthenticated(true)
-        verify(repository).setKeyguardAuthenticated(true)
+        underTest.notifyKeyguardAuthenticatedBiometrics(true)
+        verify(repository).setKeyguardAuthenticatedBiometrics(true)
     }
 
     @Test
@@ -241,7 +241,7 @@
     @Test
     fun testNotifyKeyguardAuthenticatedHandled() {
         underTest.notifyKeyguardAuthenticatedHandled()
-        verify(repository).setKeyguardAuthenticated(null)
+        verify(repository).setKeyguardAuthenticatedBiometrics(null)
     }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
index 4380af8..12090e5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
@@ -185,6 +185,41 @@
             assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone))
         }
 
+    @Test
+    fun onShown_againAfterSceneChange_resetsPassword() =
+        testScope.runTest {
+            val currentScene by collectLastValue(sceneInteractor.desiredScene)
+            val password by collectLastValue(underTest.password)
+            utils.authenticationRepository.setAuthenticationMethod(
+                AuthenticationMethodModel.Password
+            )
+            utils.authenticationRepository.setUnlocked(false)
+            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            underTest.onShown()
+
+            // The user types a password.
+            underTest.onPasswordInputChanged("password")
+            assertThat(password).isEqualTo("password")
+
+            // The user doesn't confirm the password, but navigates back to the lockscreen instead.
+            sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason")
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen))
+
+            // The user navigates to the bouncer again.
+            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+
+            underTest.onShown()
+
+            // Ensure the previously-entered password is not shown.
+            assertThat(password).isEmpty()
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+        }
+
     companion object {
         private const val ENTER_YOUR_PASSWORD = "Enter your password"
         private const val WRONG_PASSWORD = "Wrong password"
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
index ea2cad2..8ce738c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
@@ -21,6 +21,7 @@
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.authentication.data.model.AuthenticationMethodModel
 import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
+import com.android.systemui.authentication.shared.model.AuthenticationPatternCoordinate as Point
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.scene.SceneTestUtils
 import com.android.systemui.scene.shared.model.SceneKey
@@ -30,6 +31,7 @@
 import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.asStateFlow
+import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
 import org.junit.Before
@@ -67,6 +69,9 @@
             isInputEnabled = MutableStateFlow(true).asStateFlow(),
         )
 
+    private val containerSize = 90 // px
+    private val dotSize = 30 // px
+
     @Before
     fun setUp() {
         overrideResource(R.string.keyguard_enter_your_pattern, ENTER_YOUR_PATTERN)
@@ -80,13 +85,7 @@
             val message by collectLastValue(bouncerViewModel.message)
             val selectedDots by collectLastValue(underTest.selectedDots)
             val currentDot by collectLastValue(underTest.currentDot)
-            utils.authenticationRepository.setAuthenticationMethod(
-                AuthenticationMethodModel.Pattern
-            )
-            utils.authenticationRepository.setUnlocked(false)
-            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
-            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
-            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            transitionToPatternBouncer()
 
             underTest.onShown()
 
@@ -103,13 +102,7 @@
             val message by collectLastValue(bouncerViewModel.message)
             val selectedDots by collectLastValue(underTest.selectedDots)
             val currentDot by collectLastValue(underTest.currentDot)
-            utils.authenticationRepository.setAuthenticationMethod(
-                AuthenticationMethodModel.Pattern
-            )
-            utils.authenticationRepository.setUnlocked(false)
-            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
-            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
-            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            transitionToPatternBouncer()
             underTest.onShown()
             runCurrent()
 
@@ -127,23 +120,12 @@
             val currentScene by collectLastValue(sceneInteractor.desiredScene)
             val selectedDots by collectLastValue(underTest.selectedDots)
             val currentDot by collectLastValue(underTest.currentDot)
-            utils.authenticationRepository.setAuthenticationMethod(
-                AuthenticationMethodModel.Pattern
-            )
-            utils.authenticationRepository.setUnlocked(false)
-            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
-            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
-            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            transitionToPatternBouncer()
             underTest.onShown()
             underTest.onDragStart()
             assertThat(currentDot).isNull()
             CORRECT_PATTERN.forEachIndexed { index, coordinate ->
-                underTest.onDrag(
-                    xPx = 30f * coordinate.x + 15,
-                    yPx = 30f * coordinate.y + 15,
-                    containerSizePx = 90,
-                    verticalOffsetPx = 0f,
-                )
+                dragToCoordinate(coordinate)
                 assertWithMessage("Wrong selected dots for index $index")
                     .that(selectedDots)
                     .isEqualTo(
@@ -176,23 +158,10 @@
             val message by collectLastValue(bouncerViewModel.message)
             val selectedDots by collectLastValue(underTest.selectedDots)
             val currentDot by collectLastValue(underTest.currentDot)
-            utils.authenticationRepository.setAuthenticationMethod(
-                AuthenticationMethodModel.Pattern
-            )
-            utils.authenticationRepository.setUnlocked(false)
-            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
-            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
-            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            transitionToPatternBouncer()
             underTest.onShown()
             underTest.onDragStart()
-            CORRECT_PATTERN.subList(0, 3).forEach { coordinate ->
-                underTest.onDrag(
-                    xPx = 30f * coordinate.x + 15,
-                    yPx = 30f * coordinate.y + 15,
-                    containerSizePx = 90,
-                    verticalOffsetPx = 0f,
-                )
-            }
+            CORRECT_PATTERN.subList(0, 3).forEach { coordinate -> dragToCoordinate(coordinate) }
 
             underTest.onDragEnd()
 
@@ -203,12 +172,155 @@
         }
 
     @Test
-    fun onDragEnd_correctAfterWrong() =
+    fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheSameRow() =
+        testScope.runTest {
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            transitionToPatternBouncer()
+            underTest.onShown()
+
+            /*
+             * Pattern setup, coordinates are (column, row)
+             *   0  1  2
+             * 0 x  x  x
+             * 1 x  x  x
+             * 2 x  x  x
+             */
+            // Select (0,0), Skip over (1,0) and select (2,0)
+            dragOverCoordinates(Point(0, 0), Point(2, 0))
+
+            assertThat(selectedDots)
+                .isEqualTo(
+                    listOf(
+                        PatternDotViewModel(0, 0),
+                        PatternDotViewModel(1, 0),
+                        PatternDotViewModel(2, 0)
+                    )
+                )
+        }
+
+    @Test
+    fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheSameColumn() =
+        testScope.runTest {
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            transitionToPatternBouncer()
+            underTest.onShown()
+
+            /*
+             * Pattern setup, coordinates are (column, row)
+             *   0  1  2
+             * 0 x  x  x
+             * 1 x  x  x
+             * 2 x  x  x
+             */
+            // Select (1,0), Skip over (1,1) and select (1, 2)
+            dragOverCoordinates(Point(1, 0), Point(1, 2))
+
+            assertThat(selectedDots)
+                .isEqualTo(
+                    listOf(
+                        PatternDotViewModel(1, 0),
+                        PatternDotViewModel(1, 1),
+                        PatternDotViewModel(1, 2)
+                    )
+                )
+        }
+
+    @Test
+    fun onDrag_shouldIncludeDotsThatWereSkippedOverAlongTheDiagonal() =
+        testScope.runTest {
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            transitionToPatternBouncer()
+            underTest.onShown()
+
+            /*
+             * Pattern setup
+             *   0  1  2
+             * 0 x  x  x
+             * 1 x  x  x
+             * 2 x  x  x
+             *
+             * Coordinates are (column, row)
+             * Select (2,0), Skip over (1,1) and select (0, 2)
+             */
+            dragOverCoordinates(Point(2, 0), Point(0, 2))
+
+            assertThat(selectedDots)
+                .isEqualTo(
+                    listOf(
+                        PatternDotViewModel(2, 0),
+                        PatternDotViewModel(1, 1),
+                        PatternDotViewModel(0, 2)
+                    )
+                )
+        }
+
+    @Test
+    fun onDrag_shouldNotIncludeDotIfItIsNotOnTheLine() =
+        testScope.runTest {
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            transitionToPatternBouncer()
+            underTest.onShown()
+
+            /*
+             * Pattern setup
+             *   0  1  2
+             * 0 x  x  x
+             * 1 x  x  x
+             * 2 x  x  x
+             *
+             * Coordinates are (column, row)
+             */
+            dragOverCoordinates(Point(0, 0), Point(1, 0), Point(2, 0), Point(0, 1))
+
+            assertThat(selectedDots)
+                .isEqualTo(
+                    listOf(
+                        PatternDotViewModel(0, 0),
+                        PatternDotViewModel(1, 0),
+                        PatternDotViewModel(2, 0),
+                        PatternDotViewModel(0, 1),
+                    )
+                )
+        }
+
+    @Test
+    fun onDrag_shouldNotIncludeSkippedOverDotsIfTheyAreAlreadySelected() =
+        testScope.runTest {
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            transitionToPatternBouncer()
+            underTest.onShown()
+
+            /*
+             * Pattern setup
+             *   0  1  2
+             * 0 x  x  x
+             * 1 x  x  x
+             * 2 x  x  x
+             *
+             * Coordinates are (column, row)
+             */
+            dragOverCoordinates(Point(1, 0), Point(1, 1), Point(0, 0), Point(2, 0))
+
+            assertThat(selectedDots)
+                .isEqualTo(
+                    listOf(
+                        PatternDotViewModel(1, 0),
+                        PatternDotViewModel(1, 1),
+                        PatternDotViewModel(0, 0),
+                        PatternDotViewModel(2, 0),
+                    )
+                )
+        }
+
+    @Test
+    fun onDragEnd_whenPatternTooShort() =
         testScope.runTest {
             val currentScene by collectLastValue(sceneInteractor.desiredScene)
             val message by collectLastValue(bouncerViewModel.message)
             val selectedDots by collectLastValue(underTest.selectedDots)
             val currentDot by collectLastValue(underTest.currentDot)
+            val throttlingDialogMessage by
+                collectLastValue(bouncerViewModel.throttlingDialogMessage)
             utils.authenticationRepository.setAuthenticationMethod(
                 AuthenticationMethodModel.Pattern
             )
@@ -217,15 +329,43 @@
             sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
             assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
             underTest.onShown()
-            underTest.onDragStart()
-            CORRECT_PATTERN.subList(2, 7).forEach { coordinate ->
-                underTest.onDrag(
-                    xPx = 30f * coordinate.x + 15,
-                    yPx = 30f * coordinate.y + 15,
-                    containerSizePx = 90,
-                    verticalOffsetPx = 0f,
-                )
+
+            // Enter a pattern that's too short more than enough times that would normally trigger
+            // throttling if the pattern were not too short and wrong:
+            val attempts = FakeAuthenticationRepository.MAX_FAILED_AUTH_TRIES_BEFORE_THROTTLING + 1
+            repeat(attempts) { attempt ->
+                underTest.onDragStart()
+                CORRECT_PATTERN.subList(
+                        0,
+                        authenticationInteractor.minPatternLength - 1,
+                    )
+                    .forEach { coordinate ->
+                        underTest.onDrag(
+                            xPx = 30f * coordinate.x + 15,
+                            yPx = 30f * coordinate.y + 15,
+                            containerSizePx = 90,
+                            verticalOffsetPx = 0f,
+                        )
+                    }
+
+                underTest.onDragEnd()
+
+                assertWithMessage("Attempt #$attempt").that(message?.text).isEqualTo(WRONG_PATTERN)
+                assertWithMessage("Attempt #$attempt").that(throttlingDialogMessage).isNull()
             }
+        }
+
+    @Test
+    fun onDragEnd_correctAfterWrong() =
+        testScope.runTest {
+            val currentScene by collectLastValue(sceneInteractor.desiredScene)
+            val message by collectLastValue(bouncerViewModel.message)
+            val selectedDots by collectLastValue(underTest.selectedDots)
+            val currentDot by collectLastValue(underTest.currentDot)
+            transitionToPatternBouncer()
+            underTest.onShown()
+            underTest.onDragStart()
+            CORRECT_PATTERN.subList(2, 7).forEach { coordinate -> dragToCoordinate(coordinate) }
             underTest.onDragEnd()
             assertThat(selectedDots).isEmpty()
             assertThat(currentDot).isNull()
@@ -233,20 +373,36 @@
             assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
 
             // Enter the correct pattern:
-            CORRECT_PATTERN.forEach { coordinate ->
-                underTest.onDrag(
-                    xPx = 30f * coordinate.x + 15,
-                    yPx = 30f * coordinate.y + 15,
-                    containerSizePx = 90,
-                    verticalOffsetPx = 0f,
-                )
-            }
+            CORRECT_PATTERN.forEach { coordinate -> dragToCoordinate(coordinate) }
 
             underTest.onDragEnd()
 
             assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Gone))
         }
 
+    private fun dragOverCoordinates(vararg coordinatesDragged: Point) {
+        underTest.onDragStart()
+        coordinatesDragged.forEach { dragToCoordinate(it) }
+    }
+
+    private fun dragToCoordinate(coordinate: Point) {
+        underTest.onDrag(
+            xPx = dotSize * coordinate.x + 15f,
+            yPx = dotSize * coordinate.y + 15f,
+            containerSizePx = containerSize,
+            verticalOffsetPx = 0f,
+        )
+    }
+
+    private fun TestScope.transitionToPatternBouncer() {
+        utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pattern)
+        utils.authenticationRepository.setUnlocked(false)
+        sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+        sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+        assertThat(collectLastValue(sceneInteractor.desiredScene).invoke())
+            .isEqualTo(SceneModel(SceneKey.Bouncer))
+    }
+
     companion object {
         private const val ENTER_YOUR_PATTERN = "Enter your pattern"
         private const val WRONG_PATTERN = "Wrong pattern"
diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
index 531f86a..a684221 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
@@ -314,6 +314,42 @@
         }
 
     @Test
+    fun onShown_againAfterSceneChange_resetsPin() =
+        testScope.runTest {
+            val currentScene by collectLastValue(sceneInteractor.desiredScene)
+            val pin by collectLastValue(underTest.pinInput.map { it.getPin() })
+            utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin)
+            utils.authenticationRepository.setUnlocked(false)
+            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+            underTest.onShown()
+
+            // The user types a PIN.
+            FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit ->
+                underTest.onPinButtonClicked(digit)
+            }
+            assertThat(pin).isNotEmpty()
+
+            // The user doesn't confirm the PIN, but navigates back to the lockscreen instead.
+            sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason")
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen))
+
+            // The user navigates to the bouncer again.
+            sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason")
+            sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason")
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+
+            underTest.onShown()
+
+            // Ensure the previously-entered PIN is not shown.
+            assertThat(pin).isEmpty()
+            assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer))
+        }
+
+    @Test
     fun backspaceButtonAppearance_withoutAutoConfirm_alwaysShown() =
         testScope.runTest {
             val backspaceButtonAppearance by collectLastValue(underTest.backspaceButtonAppearance)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
index 90076fd..ffcaeee 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/dreams/touch/BouncerSwipeTouchHandlerTest.java
@@ -17,7 +17,6 @@
 package com.android.systemui.dreams.touch;
 
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyFloat;
 import static org.mockito.ArgumentMatchers.eq;
@@ -295,7 +294,8 @@
     }
 
     /**
-     * Makes sure the expansion amount is proportional to (1 - scroll).
+     * Verifies that swiping up when the lock pattern is not secure does not consume the scroll
+     * gesture or expand.
      */
     @Test
     public void testSwipeUp_keyguardNotSecure_doesNotExpand() {
@@ -314,8 +314,10 @@
                 0, SCREEN_HEIGHT_PX - distanceY, 0);
 
         reset(mScrimController);
+
+        // Scroll gesture is not consumed.
         assertThat(gestureListener.onScroll(event1, event2, 0, distanceY))
-                .isTrue();
+                .isFalse();
         // We should not expand since the keyguard is not secure
         verify(mScrimController, never()).expand(any());
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
index ec15416..a76c885 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
@@ -29,6 +29,7 @@
 import android.hardware.face.FaceSensorProperties
 import android.hardware.face.FaceSensorPropertiesInternal
 import android.os.CancellationSignal
+import android.view.Display
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
 import com.android.internal.logging.InstanceId.fakeInstanceId
@@ -40,12 +41,17 @@
 import com.android.systemui.R
 import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository
 import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor
+import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl
 import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
 import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
 import com.android.systemui.coroutines.FlowValue
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.coroutines.collectValues
+import com.android.systemui.display.data.repository.FakeDisplayRepository
+import com.android.systemui.display.data.repository.display
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.dump.logcatLogBuffer
 import com.android.systemui.flags.FakeFeatureFlags
@@ -73,6 +79,7 @@
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.user.data.model.SelectionStatus
 import com.android.systemui.user.data.repository.FakeUserRepository
+import com.android.systemui.util.concurrency.FakeExecutor
 import com.android.systemui.util.mockito.KotlinArgumentCaptor
 import com.android.systemui.util.mockito.captureMany
 import com.android.systemui.util.mockito.mock
@@ -151,7 +158,9 @@
     private lateinit var keyguardRepository: FakeKeyguardRepository
     private lateinit var keyguardInteractor: KeyguardInteractor
     private lateinit var alternateBouncerInteractor: AlternateBouncerInteractor
+    private lateinit var displayStateInteractor: DisplayStateInteractor
     private lateinit var bouncerRepository: FakeKeyguardBouncerRepository
+    private lateinit var displayRepository: FakeDisplayRepository
     private lateinit var fakeCommandQueue: FakeCommandQueue
     private lateinit var featureFlags: FakeFeatureFlags
     private lateinit var fakeFacePropertyRepository: FakeFacePropertyRepository
@@ -162,9 +171,10 @@
     @Before
     fun setup() {
         MockitoAnnotations.initMocks(this)
+        testDispatcher = StandardTestDispatcher()
+        testScope = TestScope(testDispatcher)
         fakeUserRepository = FakeUserRepository()
         fakeUserRepository.setUserInfos(listOf(primaryUser, secondaryUser))
-        testDispatcher = StandardTestDispatcher()
         biometricSettingsRepository = FakeBiometricSettingsRepository()
         deviceEntryFingerprintAuthRepository = FakeDeviceEntryFingerprintAuthRepository()
         trustRepository = FakeTrustRepository()
@@ -192,9 +202,18 @@
                 keyguardUpdateMonitor = keyguardUpdateMonitor,
             )
 
+        displayRepository = FakeDisplayRepository()
+        displayStateInteractor =
+            DisplayStateInteractorImpl(
+                applicationScope = testScope.backgroundScope,
+                context = context,
+                mainExecutor = FakeExecutor(FakeSystemClock()),
+                displayStateRepository = FakeDisplayStateRepository(),
+                displayRepository = displayRepository,
+            )
+
         bypassStateChangedListener =
             KotlinArgumentCaptor(KeyguardBypassController.OnBypassStateChangedListener::class.java)
-        testScope = TestScope(testDispatcher)
         whenever(sessionTracker.getSessionId(SESSION_KEYGUARD)).thenReturn(keyguardSessionId)
         whenever(faceManager.sensorPropertiesInternal)
             .thenReturn(listOf(createFaceSensorProperties(supportsFaceDetection = true)))
@@ -253,6 +272,7 @@
             faceDetectBuffer,
             faceAuthBuffer,
             keyguardTransitionInteractor,
+            displayStateInteractor,
             featureFlags,
             dumpManager,
         )
@@ -683,6 +703,44 @@
         }
 
     @Test
+    fun authenticateCanRunWhenDisplayIsOffAndWakingUp() =
+        testScope.runTest {
+            initCollectors()
+            allPreconditionsToRunFaceAuthAreTrue()
+
+            displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF)))
+            displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+            keyguardRepository.setWakefulnessModel(
+                WakefulnessModel(
+                    WakefulnessState.STARTING_TO_WAKE,
+                    lastWakeReason = WakeSleepReason.POWER_BUTTON,
+                    lastSleepReason = WakeSleepReason.POWER_BUTTON
+                )
+            )
+
+            assertThat(canFaceAuthRun()).isTrue()
+        }
+
+    @Test
+    fun authenticateDoesNotRunWhenDisplayIsOffAndAwake() =
+        testScope.runTest {
+            testGatingCheckForFaceAuth {
+                keyguardRepository.setWakefulnessModel(
+                    WakefulnessModel(
+                        WakefulnessState.AWAKE,
+                        lastWakeReason = WakeSleepReason.POWER_BUTTON,
+                        lastSleepReason = WakeSleepReason.POWER_BUTTON
+                    )
+                )
+
+                displayRepository.emit(
+                    setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_OFF))
+                )
+                displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
+            }
+        }
+
+    @Test
     fun everythingWorksWithFaceAuthRefactorFlagDisabled() =
         testScope.runTest {
             featureFlags.set(FACE_AUTH_REFACTOR, false)
@@ -1017,7 +1075,9 @@
             faceAuthenticateIsCalled()
         }
 
-    private suspend fun TestScope.testGatingCheckForFaceAuth(gatingCheckModifier: () -> Unit) {
+    private suspend fun TestScope.testGatingCheckForFaceAuth(
+        gatingCheckModifier: suspend () -> Unit
+    ) {
         initCollectors()
         allPreconditionsToRunFaceAuthAreTrue()
 
@@ -1108,6 +1168,8 @@
         faceLockoutResetCallback.value.onLockoutReset(0)
         bouncerRepository.setAlternateVisible(true)
         keyguardRepository.setKeyguardShowing(true)
+        displayRepository.emit(setOf(display(0, 0, Display.DEFAULT_DISPLAY, Display.STATE_ON)))
+        displayRepository.emitDisplayChangeEvent(Display.DEFAULT_DISPLAY)
         runCurrent()
     }
 
@@ -1120,6 +1182,7 @@
         authenticated = collectLastValue(underTest.isAuthenticated)
         bypassEnabled = collectLastValue(underTest.isBypassEnabled)
         fakeUserRepository.setSelectedUserInfo(primaryUser)
+        runCurrent()
     }
 
     private fun successResult() = FaceManager.AuthenticationResult(null, null, primaryUserId, false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
new file mode 100644
index 0000000..181cc88
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
@@ -0,0 +1,265 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.domain.interactor
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.TransitionState
+import com.android.systemui.keyguard.shared.model.TransitionStep
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+class KeyguardDismissActionInteractorTest : SysuiTestCase() {
+    private lateinit var keyguardRepository: FakeKeyguardRepository
+    private lateinit var transitionRepository: FakeKeyguardTransitionRepository
+
+    private lateinit var dispatcher: TestDispatcher
+    private lateinit var testScope: TestScope
+
+    private lateinit var dismissInteractorWithDependencies:
+        KeyguardDismissInteractorFactory.WithDependencies
+    private lateinit var underTest: KeyguardDismissActionInteractor
+
+    @Before
+    fun setUp() {
+        MockitoAnnotations.initMocks(this)
+        dispatcher = StandardTestDispatcher()
+        testScope = TestScope(dispatcher)
+
+        dismissInteractorWithDependencies =
+            KeyguardDismissInteractorFactory.create(
+                context = context,
+                testScope = testScope,
+                broadcastDispatcher = fakeBroadcastDispatcher,
+                dispatcher = dispatcher,
+            )
+        keyguardRepository = dismissInteractorWithDependencies.keyguardRepository
+        transitionRepository = FakeKeyguardTransitionRepository()
+
+        underTest =
+            KeyguardDismissActionInteractor(
+                keyguardRepository,
+                KeyguardTransitionInteractorFactory.create(
+                        scope = testScope.backgroundScope,
+                        repository = transitionRepository,
+                    )
+                    .keyguardTransitionInteractor,
+                dismissInteractorWithDependencies.interactor,
+                testScope.backgroundScope,
+            )
+    }
+
+    @Test
+    fun updateDismissAction_onRepoChange() =
+        testScope.runTest {
+            val dismissAction by collectLastValue(underTest.dismissAction)
+
+            val newDismissAction =
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "",
+                    willAnimateOnLockscreen = true,
+                )
+            keyguardRepository.setDismissAction(newDismissAction)
+            assertThat(dismissAction).isEqualTo(newDismissAction)
+        }
+
+    @Test
+    fun messageUpdate() =
+        testScope.runTest {
+            val message by collectLastValue(underTest.message)
+            keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            assertThat(message).isEqualTo("message")
+        }
+
+    @Test
+    fun runDismissAnimationOnKeyguard_defaultStateFalse() =
+        testScope.runTest { assertThat(underTest.runDismissAnimationOnKeyguard()).isFalse() }
+
+    @Test
+    fun runDismissAnimationOnKeyguardUpdates() =
+        testScope.runTest {
+            val animate by collectLastValue(underTest.willAnimateDismissActionOnLockscreen)
+            keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            assertThat(animate).isEqualTo(true)
+
+            keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = false,
+                )
+            )
+            assertThat(animate).isEqualTo(false)
+        }
+
+    @Test
+    fun executeDismissAction_dismissKeyguardRequestWithImmediateDismissAction_biometricAuthed() =
+        testScope.runTest {
+            val executeDismissAction by collectLastValue(underTest.executeDismissAction)
+
+            val onDismissAction = { KeyguardDone.IMMEDIATE }
+            keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = onDismissAction,
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            dismissInteractorWithDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(
+                true
+            )
+            assertThat(executeDismissAction).isEqualTo(onDismissAction)
+        }
+
+    @Test
+    fun executeDismissAction_dismissKeyguardRequestWithoutImmediateDismissAction() =
+        testScope.runTest {
+            val executeDismissAction by collectLastValue(underTest.executeDismissAction)
+
+            // WHEN a keyguard action will run after the keyguard is gone
+            val onDismissAction = {}
+            keyguardRepository.setDismissAction(
+                DismissAction.RunAfterKeyguardGone(
+                    dismissAction = onDismissAction,
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            assertThat(executeDismissAction).isNull()
+
+            // WHEN the keyguard is GONE
+            transitionRepository.sendTransitionStep(
+                TransitionStep(to = KeyguardState.GONE, transitionState = TransitionState.FINISHED)
+            )
+            assertThat(executeDismissAction).isNotNull()
+        }
+
+    @Test
+    fun resetDismissAction() =
+        testScope.runTest {
+            val resetDismissAction by collectLastValue(underTest.resetDismissAction)
+
+            keyguardRepository.setDismissAction(
+                DismissAction.RunAfterKeyguardGone(
+                    dismissAction = {},
+                    onCancelAction = {},
+                    message = "message",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            transitionRepository.sendTransitionStep(
+                TransitionStep(
+                    to = KeyguardState.AOD,
+                    transitionState = TransitionState.FINISHED,
+                )
+            )
+            assertThat(resetDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun setDismissAction_callsCancelRunnableOnPreviousDismissAction() =
+        testScope.runTest {
+            val dismissAction by collectLastValue(underTest.dismissAction)
+            var previousDismissActionCancelCalled = false
+            keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = { previousDismissActionCancelCalled = true },
+                    message = "",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+
+            val newDismissAction =
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "",
+                    willAnimateOnLockscreen = true,
+                )
+            underTest.setDismissAction(newDismissAction)
+
+            // THEN previous dismiss action got its onCancel called
+            assertThat(previousDismissActionCancelCalled).isTrue()
+
+            // THEN dismiss action is updated
+            assertThat(dismissAction).isEqualTo(newDismissAction)
+        }
+
+    @Test
+    fun handleDismissAction() =
+        testScope.runTest {
+            val dismissAction by collectLastValue(underTest.dismissAction)
+            underTest.handleDismissAction()
+            assertThat(dismissAction).isEqualTo(DismissAction.None)
+        }
+
+    @Test
+    fun setKeyguardDone() =
+        testScope.runTest {
+            val keyguardDoneTiming by
+                collectLastValue(dismissInteractorWithDependencies.interactor.keyguardDone)
+            runCurrent()
+
+            underTest.setKeyguardDone(KeyguardDone.LATER)
+            assertThat(keyguardDoneTiming).isEqualTo(KeyguardDone.LATER)
+
+            underTest.setKeyguardDone(KeyguardDone.IMMEDIATE)
+            assertThat(keyguardDoneTiming).isEqualTo(KeyguardDone.IMMEDIATE)
+        }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt
new file mode 100644
index 0000000..c407b14
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorTest.kt
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.domain.interactor
+
+import android.content.pm.UserInfo
+import android.service.trust.TrustAgentService
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.keyguard.TrustGrantFlags
+import com.android.systemui.RoboPilotTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyguard.shared.model.DismissAction
+import com.android.systemui.keyguard.shared.model.KeyguardDone
+import com.android.systemui.keyguard.shared.model.TrustModel
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.MockitoAnnotations
+
+@SmallTest
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+class KeyguardDismissInteractorTest : SysuiTestCase() {
+    private lateinit var dispatcher: TestDispatcher
+    private lateinit var testScope: TestScope
+
+    private lateinit var underTestDependencies: KeyguardDismissInteractorFactory.WithDependencies
+    private lateinit var underTest: KeyguardDismissInteractor
+    private val userInfo = UserInfo(0, "", 0)
+
+    @Before
+    fun setUp() {
+        MockitoAnnotations.initMocks(this)
+        dispatcher = StandardTestDispatcher()
+        testScope = TestScope(dispatcher)
+
+        underTestDependencies =
+            KeyguardDismissInteractorFactory.create(
+                context = context,
+                testScope = testScope,
+                broadcastDispatcher = fakeBroadcastDispatcher,
+                dispatcher = dispatcher,
+            )
+        underTest = underTestDependencies.interactor
+        underTestDependencies.userRepository.setUserInfos(listOf(userInfo))
+    }
+
+    @Test
+    fun biometricAuthenticatedRequestDismissKeyguard_noDismissAction() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithoutImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+
+            underTestDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(null)
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+            underTestDependencies.bouncerRepository.setKeyguardAuthenticatedBiometrics(true)
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun onTrustGrantedRequestDismissKeyguard_noDismissAction() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithoutImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+            underTestDependencies.trustRepository.setRequestDismissKeyguard(
+                TrustModel(
+                    true,
+                    0,
+                    TrustGrantFlags(0),
+                )
+            )
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+            underTestDependencies.powerRepository.setInteractive(true)
+            underTestDependencies.trustRepository.setRequestDismissKeyguard(
+                TrustModel(
+                    true,
+                    0,
+                    TrustGrantFlags(TrustAgentService.FLAG_GRANT_TRUST_DISMISS_KEYGUARD),
+                )
+            )
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun primaryAuthenticated_noDismissAction() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithoutImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+            underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+            runCurrent()
+
+            // authenticated different user
+            underTestDependencies.bouncerRepository.setKeyguardAuthenticatedPrimaryAuth(22)
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+            // authenticated correct user
+            underTestDependencies.bouncerRepository.setKeyguardAuthenticatedPrimaryAuth(userInfo.id)
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun userRequestedBouncerWhenAlreadyAuthenticated_noDismissAction() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithoutImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+            underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+            runCurrent()
+
+            // requested from different user
+            underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+                22
+            )
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+
+            // requested from correct user
+            underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+                userInfo.id
+            )
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun keyguardDone() =
+        testScope.runTest {
+            val keyguardDone by collectLastValue(underTest.keyguardDone)
+            assertThat(keyguardDone).isNull()
+
+            underTest.setKeyguardDone(KeyguardDone.IMMEDIATE)
+            assertThat(keyguardDone).isEqualTo(KeyguardDone.IMMEDIATE)
+
+            underTest.setKeyguardDone(KeyguardDone.LATER)
+            assertThat(keyguardDone).isEqualTo(KeyguardDone.LATER)
+        }
+
+    @Test
+    fun userRequestedBouncerWhenAlreadyAuthenticated_dismissActionRunImmediately() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithoutImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+            val dismissKeyguardRequestWithImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithImmediateDismissAction)
+            underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+            runCurrent()
+
+            underTestDependencies.keyguardRepository.setDismissAction(
+                DismissAction.RunImmediately(
+                    onDismissAction = { KeyguardDone.IMMEDIATE },
+                    onCancelAction = {},
+                    message = "",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+                userInfo.id
+            )
+            assertThat(dismissKeyguardRequestWithoutImmediateDismissAction).isNull()
+            assertThat(dismissKeyguardRequestWithImmediateDismissAction).isEqualTo(Unit)
+        }
+
+    @Test
+    fun userRequestedBouncerWhenAlreadyAuthenticated_dismissActionRunAfterKeyguardGone() =
+        testScope.runTest {
+            val dismissKeyguardRequestWithImmediateWithoutDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithoutImmediateDismissAction)
+            val dismissKeyguardRequestWithImmediateDismissAction by
+                collectLastValue(underTest.dismissKeyguardRequestWithImmediateDismissAction)
+            underTestDependencies.userRepository.setSelectedUserInfo(userInfo)
+            runCurrent()
+
+            underTestDependencies.keyguardRepository.setDismissAction(
+                DismissAction.RunAfterKeyguardGone(
+                    dismissAction = {},
+                    onCancelAction = {},
+                    message = "",
+                    willAnimateOnLockscreen = true,
+                )
+            )
+            underTestDependencies.bouncerRepository.setUserRequestedBouncerWhenAlreadyAuthenticated(
+                userInfo.id
+            )
+            assertThat(dismissKeyguardRequestWithImmediateDismissAction).isNull()
+            assertThat(dismissKeyguardRequestWithImmediateWithoutDismissAction).isEqualTo(Unit)
+        }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
index bdcb9ab..b81a3d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt
@@ -159,7 +159,6 @@
                     screenOffAnimationController = mock(),
                     statusBarStateController = mock(),
                 ),
-                FakeFeatureFlags().apply { set(Flags.FP_LISTEN_OCCLUDING_APPS, true) },
             )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListenerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListenerTest.kt
index bb73dc6..dbf6a29 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListenerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/KeyguardBlueprintCommandListenerTest.kt
@@ -81,4 +81,10 @@
         command().execute(pw, listOf("fake"))
         verify(keyguardBlueprintInteractor).transitionToBlueprint("fake")
     }
+
+    @Test
+    fun testValidArg_Int() {
+        command().execute(pw, listOf("1"))
+        verify(keyguardBlueprintInteractor).transitionToBlueprint(1)
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
index 904662e..da372ea 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
@@ -22,7 +22,10 @@
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
 import com.android.systemui.coroutines.collectValues
+import com.android.systemui.flags.FakeFeatureFlags
+import com.android.systemui.flags.Flags
 import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor
 import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractorFactory
 import com.android.systemui.keyguard.shared.model.KeyguardState
 import com.android.systemui.keyguard.shared.model.ScrimAlpha
@@ -32,6 +35,7 @@
 import com.android.systemui.util.mockito.whenever
 import com.google.common.collect.Range
 import com.google.common.truth.Truth.assertThat
+import dagger.Lazy
 import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.UnconfinedTestDispatcher
 import kotlinx.coroutines.test.runTest
@@ -47,13 +51,21 @@
 class PrimaryBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
     private lateinit var underTest: PrimaryBouncerToGoneTransitionViewModel
     private lateinit var repository: FakeKeyguardTransitionRepository
+    private lateinit var featureFlags: FakeFeatureFlags
     @Mock private lateinit var statusBarStateController: SysuiStatusBarStateController
     @Mock private lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor
+    @Mock
+    private lateinit var keyguardDismissActionInteractor: Lazy<KeyguardDismissActionInteractor>
 
     @Before
     fun setUp() {
         MockitoAnnotations.initMocks(this)
         repository = FakeKeyguardTransitionRepository()
+        val featureFlags =
+            FakeFeatureFlags().apply {
+                set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false)
+                set(Flags.UDFPS_NEW_TOUCH_DETECTION, true)
+            }
         val interactor =
             KeyguardTransitionInteractorFactory.create(
                     scope = TestScope().backgroundScope,
@@ -64,7 +76,9 @@
             PrimaryBouncerToGoneTransitionViewModel(
                 interactor,
                 statusBarStateController,
-                primaryBouncerInteractor
+                primaryBouncerInteractor,
+                keyguardDismissActionInteractor,
+                featureFlags,
             )
 
         whenever(primaryBouncerInteractor.willRunDismissFromKeyguard()).thenReturn(false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
index d1299d4..5939bb5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/pipeline/MediaDataManagerTest.kt
@@ -16,10 +16,12 @@
 
 package com.android.systemui.media.controls.pipeline
 
+import android.app.IUriGrantsManager
 import android.app.Notification
 import android.app.Notification.FLAG_NO_CLEAR
 import android.app.Notification.MediaStyle
 import android.app.PendingIntent
+import android.app.UriGrantsManager
 import android.app.smartspace.SmartspaceAction
 import android.app.smartspace.SmartspaceConfig
 import android.app.smartspace.SmartspaceManager
@@ -27,12 +29,14 @@
 import android.content.Intent
 import android.content.pm.PackageManager
 import android.graphics.Bitmap
+import android.graphics.ImageDecoder
 import android.graphics.drawable.Icon
 import android.media.MediaDescription
 import android.media.MediaMetadata
 import android.media.session.MediaController
 import android.media.session.MediaSession
 import android.media.session.PlaybackState
+import android.net.Uri
 import android.os.Bundle
 import android.provider.Settings
 import android.service.notification.StatusBarNotification
@@ -40,6 +44,7 @@
 import android.testing.TestableLooper.RunWithLooper
 import androidx.media.utils.MediaConstants
 import androidx.test.filters.SmallTest
+import com.android.dx.mockito.inline.extended.ExtendedMockito
 import com.android.internal.logging.InstanceId
 import com.android.keyguard.KeyguardUpdateMonitor
 import com.android.systemui.InstanceIdSequenceFake
@@ -83,7 +88,9 @@
 import org.mockito.Mockito.verify
 import org.mockito.Mockito.verifyNoMoreInteractions
 import org.mockito.Mockito.`when` as whenever
+import org.mockito.MockitoSession
 import org.mockito.junit.MockitoJUnit
+import org.mockito.quality.Strictness
 
 private const val KEY = "KEY"
 private const val KEY_2 = "KEY_2"
@@ -149,6 +156,8 @@
     @Captor lateinit var stateCallbackCaptor: ArgumentCaptor<(String, PlaybackState) -> Unit>
     @Captor lateinit var sessionCallbackCaptor: ArgumentCaptor<(String) -> Unit>
     @Captor lateinit var smartSpaceConfigBuilderCaptor: ArgumentCaptor<SmartspaceConfig>
+    @Mock private lateinit var ugm: IUriGrantsManager
+    @Mock private lateinit var imageSource: ImageDecoder.Source
 
     private val instanceIdSequence = InstanceIdSequenceFake(1 shl 20)
 
@@ -159,8 +168,17 @@
             1
         )
 
+    private lateinit var staticMockSession: MockitoSession
+
     @Before
     fun setup() {
+        staticMockSession =
+            ExtendedMockito.mockitoSession()
+                .mockStatic<UriGrantsManager>(UriGrantsManager::class.java)
+                .mockStatic<ImageDecoder>(ImageDecoder::class.java)
+                .strictness(Strictness.LENIENT)
+                .startMocking()
+        whenever(UriGrantsManager.getService()).thenReturn(ugm)
         foregroundExecutor = FakeExecutor(clock)
         backgroundExecutor = FakeExecutor(clock)
         uiExecutor = FakeExecutor(clock)
@@ -270,6 +288,7 @@
 
     @After
     fun tearDown() {
+        staticMockSession.finishMocking()
         session.release()
         mediaDataManager.destroy()
         Settings.Secure.putInt(
@@ -2198,6 +2217,66 @@
         verify(listener).onMediaDataRemoved(eq(KEY))
     }
 
+    @Test
+    fun testResumeMediaLoaded_hasArtPermission_artLoaded() {
+        // When resume media is loaded and user/app has permission to access the art URI,
+        whenever(
+                ugm.checkGrantUriPermission_ignoreNonSystem(
+                    anyInt(),
+                    any(),
+                    any(),
+                    anyInt(),
+                    anyInt()
+                )
+            )
+            .thenReturn(1)
+        val artwork = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
+        val uri = Uri.parse("content://example")
+        whenever(ImageDecoder.createSource(any(), eq(uri))).thenReturn(imageSource)
+        whenever(ImageDecoder.decodeBitmap(any(), any())).thenReturn(artwork)
+
+        val desc =
+            MediaDescription.Builder().run {
+                setTitle(SESSION_TITLE)
+                setIconUri(uri)
+                build()
+            }
+        addResumeControlAndLoad(desc)
+
+        // Then the artwork is loaded
+        assertThat(mediaDataCaptor.value.artwork).isNotNull()
+    }
+
+    @Test
+    fun testResumeMediaLoaded_noArtPermission_noArtLoaded() {
+        // When resume media is loaded and user/app does not have permission to access the art URI
+        whenever(
+                ugm.checkGrantUriPermission_ignoreNonSystem(
+                    anyInt(),
+                    any(),
+                    any(),
+                    anyInt(),
+                    anyInt()
+                )
+            )
+            .thenThrow(SecurityException("Test no permission"))
+        val artwork = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
+        val uri = Uri.parse("content://example")
+        whenever(ImageDecoder.createSource(any(), eq(uri))).thenReturn(imageSource)
+        whenever(ImageDecoder.decodeBitmap(any(), any())).thenReturn(artwork)
+
+        val desc =
+            MediaDescription.Builder().run {
+                setTitle(SESSION_TITLE)
+                setIconUri(uri)
+                build()
+            }
+        addResumeControlAndLoad(desc)
+
+        // Then the artwork is not loaded
+        assertThat(mediaDataCaptor.value.artwork).isNull()
+    }
+
     /** Helper function to add a basic media notification and capture the resulting MediaData */
     private fun addNotificationAndLoad() {
         addNotificationAndLoad(mediaNotification)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
index 91b0245..7ad2ce8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/KeyguardMediaControllerTest.kt
@@ -30,6 +30,7 @@
 import com.android.systemui.statusbar.notification.stack.MediaContainerView
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.animation.UniqueObjectHostView
 import com.android.systemui.util.mockito.whenever
 import com.android.systemui.util.settings.FakeSettings
@@ -90,6 +91,7 @@
                 settings,
                 fakeHandler,
                 configurationController,
+                ResourcesSplitShadeStateController()
             )
         keyguardMediaController.attachSinglePaneContainer(mediaContainerView)
         keyguardMediaController.useSplitShade = false
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
index 2ce236d..33ed01f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt
@@ -38,6 +38,7 @@
 import com.android.systemui.statusbar.phone.KeyguardBypassController
 import com.android.systemui.statusbar.policy.FakeConfigurationController
 import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.animation.UniqueObjectHostView
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.mock
@@ -120,6 +121,7 @@
                 notifPanelEvents,
                 settings,
                 fakeHandler,
+                ResourcesSplitShadeStateController()
             )
         verify(wakefulnessLifecycle).addObserver(wakefullnessObserver.capture())
         verify(statusBarStateController).addCallback(statusBarCallback.capture())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
index cbfad56..48a36cb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java
@@ -30,6 +30,8 @@
 import static com.android.systemui.navigationbar.NavigationBar.NavBarActionEvent.NAVBAR_ASSIST_LONGPRESS;
 import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -93,7 +95,6 @@
 import com.android.systemui.settings.UserContextProvider;
 import com.android.systemui.settings.UserTracker;
 import com.android.systemui.shade.NotificationShadeWindowView;
-import com.android.systemui.shade.ShadeController;
 import com.android.systemui.shade.ShadeViewController;
 import com.android.systemui.shared.rotation.RotationButtonController;
 import com.android.systemui.shared.system.TaskStackChangeListeners;
@@ -330,6 +331,58 @@
     }
 
     @Test
+    public void onHomeTouch_isRinging_keyguardShowing_touchBlocked() {
+        when(mTelecomManager.isRinging()).thenReturn(true);
+        when(mKeyguardStateController.isShowing()).thenReturn(true);
+
+        boolean result = mNavigationBar.onHomeTouch(
+                mNavigationBar.getView(),
+                    MotionEvent.obtain(
+                    /*downTime=*/SystemClock.uptimeMillis(),
+                    /*eventTime=*/SystemClock.uptimeMillis(),
+                    /*action=*/MotionEvent.ACTION_DOWN,
+                    0, 0, 0));
+
+        assertThat(result).isTrue();
+
+        // Verify subsequent touches are also blocked
+        boolean nextTouchEvent = mNavigationBar.onHomeTouch(
+                mNavigationBar.getView(),
+                MotionEvent.obtain(
+                        /*downTime=*/SystemClock.uptimeMillis(),
+                        /*eventTime=*/SystemClock.uptimeMillis(),
+                        /*action=*/MotionEvent.ACTION_MOVE,
+                        0, 0, 0));
+        assertThat(nextTouchEvent).isTrue();
+    }
+
+    @Test
+    public void onHomeTouch_isRinging_keyguardNotShowing_touchNotBlocked() {
+        when(mTelecomManager.isRinging()).thenReturn(true);
+        when(mKeyguardStateController.isShowing()).thenReturn(false);
+
+        boolean result = mNavigationBar.onHomeTouch(
+                mNavigationBar.getView(),
+                MotionEvent.obtain(
+                        /*downTime=*/SystemClock.uptimeMillis(),
+                        /*eventTime=*/SystemClock.uptimeMillis(),
+                        /*action=*/MotionEvent.ACTION_DOWN,
+                        0, 0, 0));
+
+        assertThat(result).isFalse();
+
+        // Verify subsequent touches are also not blocked
+        boolean nextTouchEvent = mNavigationBar.onHomeTouch(
+                mNavigationBar.getView(),
+                MotionEvent.obtain(
+                        /*downTime=*/SystemClock.uptimeMillis(),
+                        /*eventTime=*/SystemClock.uptimeMillis(),
+                        /*action=*/MotionEvent.ACTION_MOVE,
+                        0, 0, 0));
+        assertThat(nextTouchEvent).isFalse();
+    }
+
+    @Test
     public void testRegisteredWithUserTracker() {
         mNavigationBar.init();
         mNavigationBar.onViewAttached();
@@ -468,7 +521,6 @@
         when(deviceProvisionedController.isDeviceProvisioned()).thenReturn(true);
         return spy(new NavigationBar(
                 mNavigationBarView,
-                mock(ShadeController.class),
                 mNavigationBarFrame,
                 null,
                 context,
@@ -487,6 +539,7 @@
                 Optional.of(mock(Pip.class)),
                 Optional.of(mock(Recents.class)),
                 () -> Optional.of(mCentralSurfaces),
+                mKeyguardStateController,
                 mock(ShadeViewController.class),
                 mock(NotificationRemoteInputManager.class),
                 mock(NotificationShadeDepthController.class),
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 fcda5f5..8afe095 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
@@ -66,6 +66,7 @@
 import com.android.systemui.statusbar.SysuiStatusBarStateController;
 import com.android.systemui.statusbar.phone.KeyguardBypassController;
 import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
 import com.android.systemui.util.animation.UniqueObjectHostView;
 
@@ -524,7 +525,10 @@
 
         return new QSFragment(
                 new RemoteInputQuickSettingsDisabler(
-                        context, commandQueue, mock(ConfigurationController.class)),
+                        context,
+                        commandQueue,
+                        new ResourcesSplitShadeStateController(),
+                        mock(ConfigurationController.class)),
                 mStatusBarStateController,
                 commandQueue,
                 mQSMediaHost,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
index 6720dae..2ac220c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
@@ -50,6 +50,7 @@
 import com.android.systemui.qs.customize.QSCustomizerController;
 import com.android.systemui.qs.logging.QSLogger;
 import com.android.systemui.qs.tileimpl.QSTileImpl;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 import com.android.systemui.util.animation.DisappearParameters;
 
 import org.junit.Before;
@@ -110,7 +111,7 @@
                 MetricsLogger metricsLogger, UiEventLogger uiEventLogger, QSLogger qsLogger,
                 DumpManager dumpManager) {
             super(view, host, qsCustomizerController, true, mediaHost, metricsLogger, uiEventLogger,
-                    qsLogger, dumpManager);
+                    qsLogger, dumpManager, new ResourcesSplitShadeStateController());
         }
 
         @Override
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
index 9d9d0c7..8a530dd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt
@@ -18,6 +18,7 @@
 import com.android.systemui.settings.brightness.BrightnessController
 import com.android.systemui.settings.brightness.BrightnessSliderController
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.tuner.TunerService
 import com.google.common.truth.Truth.assertThat
 import org.junit.After
@@ -91,7 +92,8 @@
             brightnessControllerFactory,
             brightnessSliderFactory,
             falsingManager,
-            statusBarKeyguardViewManager
+            statusBarKeyguardViewManager,
+                ResourcesSplitShadeStateController()
         )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
index 71ea831..f188b4e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
@@ -29,6 +29,7 @@
 import com.android.systemui.plugins.qs.QSTileView
 import com.android.systemui.qs.customize.QSCustomizerController
 import com.android.systemui.qs.logging.QSLogger
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.leak.RotationUtils
 import org.junit.After
 import org.junit.Before
@@ -167,7 +168,8 @@
             metricsLogger,
             uiEventLogger,
             qsLogger,
-            dumpManager) {
+            dumpManager,
+            ResourcesSplitShadeStateController()) {
 
         private var rotation = RotationUtils.ROTATION_NONE
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
index 77b3e69f..9386d71 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/AutoAddSettingsRepositoryTest.kt
@@ -17,8 +17,9 @@
 package com.android.systemui.qs.pipeline.data.repository
 
 import android.provider.Settings
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.shared.TileSpec
@@ -34,7 +35,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class AutoAddSettingsRepositoryTest : SysuiTestCase() {
     private val secureSettings = FakeSettings()
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
index d7ab903..30f5811 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/CustomTileAddedSharedPreferencesRepositoryTest.kt
@@ -18,8 +18,9 @@
 
 import android.content.ComponentName
 import android.content.SharedPreferences
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.settings.UserFileManager
 import com.android.systemui.util.FakeSharedPreferences
@@ -29,7 +30,8 @@
 import org.junit.runner.RunWith
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class CustomTileAddedSharedPreferencesRepositoryTest : SysuiTestCase() {
 
     private lateinit var underTest: CustomTileAddedSharedPrefsRepository
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
index dc0fae5..995de66 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepositoryImplTest.kt
@@ -29,8 +29,10 @@
 import android.content.pm.ServiceInfo
 import android.os.UserHandle
 import android.service.quicksettings.TileService
-import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.util.mockito.any
@@ -60,7 +62,9 @@
 import org.mockito.MockitoAnnotations
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
+@TestableLooper.RunWithLooper
 @OptIn(ExperimentalCoroutinesApi::class)
 class InstalledTilesComponentRepositoryImplTest : SysuiTestCase() {
     private val testDispatcher = StandardTestDispatcher()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
index 72c31b1..aef5faf 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/TileSpecSettingsRepositoryTest.kt
@@ -17,9 +17,10 @@
 package com.android.systemui.qs.pipeline.data.repository
 
 import android.provider.Settings
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
 import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.QSHost
@@ -41,7 +42,8 @@
 import org.mockito.MockitoAnnotations
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 @OptIn(ExperimentalCoroutinesApi::class)
 class TileSpecSettingsRepositoryTest : SysuiTestCase() {
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
index 817ac61..6e579d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingListTest.kt
@@ -17,9 +17,10 @@
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
 import android.content.ComponentName
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
 import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.qs.pipeline.shared.TileSpec
 import com.android.systemui.util.mockito.mock
@@ -28,7 +29,8 @@
 import org.junit.runner.RunWith
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class AutoAddableSettingListTest : SysuiTestCase() {
 
     private val factory =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
index 36c3c9d..7c6dd24 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/AutoAddableSettingTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.coroutines.collectValues
@@ -35,7 +36,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class AutoAddableSettingTest : SysuiTestCase() {
 
     private val testDispatcher = StandardTestDispatcher()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
index afb43c7..469eee3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CallbackControllerAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -35,7 +36,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class CallbackControllerAutoAddableTest : SysuiTestCase() {
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
index a357dad..b6eaa39 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/CastAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -41,7 +42,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class CastAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var castController: CastController
@@ -128,6 +130,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(CastTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(CastTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
index 098ffc3..a755fbb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DataSaverAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class DataSaverAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var dataSaverController: DataSaverController
@@ -80,6 +82,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(DataSaverTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(DataSaverTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
index a2e3538..daacca51 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/DeviceControlsAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -43,7 +44,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class DeviceControlsAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var deviceControlsController: DeviceControlsController
@@ -110,6 +112,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(DeviceControlsTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(DeviceControlsTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
index ee96b47..4b5f7f6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/HotspotAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class HotspotAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var hotspotController: HotspotController
@@ -78,6 +80,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(HotspotTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(HotspotTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
index e03072a..32d9db2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddableTest.kt
@@ -17,8 +17,9 @@
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
 import android.hardware.display.NightDisplayListener
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.dagger.NightDisplayListenerModule
@@ -49,7 +50,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class NightDisplayAutoAddableTest : SysuiTestCase() {
 
     @Mock(answer = Answers.RETURNS_SELF)
@@ -121,6 +123,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(NightDisplayTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(NightDisplayTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
index 7b4a55e..fb513a6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.ReduceBrightColorsController
@@ -43,7 +44,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class ReduceBrightColorsAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var reduceBrightColorsController: ReduceBrightColorsController
@@ -103,6 +105,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(ReduceBrightColorsTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(ReduceBrightColorsTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
index fb35a3a..8036cb4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/SafetyCenterAutoAddableTest.kt
@@ -18,9 +18,10 @@
 
 import android.content.ComponentName
 import android.content.pm.PackageManager
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
 import com.android.systemui.R
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.coroutines.collectValues
@@ -51,7 +52,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class SafetyCenterAutoAddableTest : SysuiTestCase() {
     private val testDispatcher = StandardTestDispatcher()
     private val testScope = TestScope(testDispatcher)
@@ -155,9 +157,10 @@
     companion object {
         private const val SAFETY_TILE_CLASS_NAME = "cls"
         private const val PERMISSION_CONTROLLER_PACKAGE_NAME = "pkg"
-        private val SPEC =
+        private val SPEC by lazy {
             TileSpec.create(
                 ComponentName(PERMISSION_CONTROLLER_PACKAGE_NAME, SAFETY_TILE_CLASS_NAME)
             )
+        }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
index 6b250f4..1c8cb54 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WalletAutoAddableTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.autoaddable
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -37,7 +38,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class WalletAutoAddableTest : SysuiTestCase() {
 
     @Mock private lateinit var walletController: WalletController
@@ -76,6 +78,6 @@
     }
 
     companion object {
-        private val SPEC = TileSpec.create(QuickAccessWalletTile.TILE_SPEC)
+        private val SPEC by lazy { TileSpec.create(QuickAccessWalletTile.TILE_SPEC) }
     }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
index e9f7c8ab..de1d29fd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/autoaddable/WorkTileAutoAddableTest.kt
@@ -21,8 +21,9 @@
 import android.content.pm.UserInfo.FLAG_MANAGED_PROFILE
 import android.content.pm.UserInfo.FLAG_PRIMARY
 import android.content.pm.UserInfo.FLAG_PROFILE
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.qs.pipeline.domain.model.AutoAddSignal
@@ -40,7 +41,8 @@
 
 @OptIn(ExperimentalCoroutinesApi::class)
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class WorkTileAutoAddableTest : SysuiTestCase() {
 
     private lateinit var userTracker: FakeUserTracker
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
index f924b35..bb18115 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/AutoAddInteractorTest.kt
@@ -16,8 +16,9 @@
 
 package com.android.systemui.qs.pipeline.domain.interactor
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.dump.DumpManager
@@ -46,7 +47,8 @@
 import org.mockito.MockitoAnnotations
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 @OptIn(ExperimentalCoroutinesApi::class)
 class AutoAddInteractorTest : SysuiTestCase() {
     private val testScope = TestScope()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
index 54a9360..dc1b9c4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt
@@ -22,8 +22,9 @@
 import android.content.pm.UserInfo
 import android.os.UserHandle
 import android.service.quicksettings.Tile
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.coroutines.collectLastValue
 import com.android.systemui.dump.nano.SystemUIProtoDump
@@ -69,7 +70,8 @@
 import org.mockito.MockitoAnnotations
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 @OptIn(ExperimentalCoroutinesApi::class)
 class CurrentTilesInteractorImplTest : SysuiTestCase() {
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
index 6556cfd..151b256 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/PanelInteractorImplTest.kt
@@ -15,8 +15,9 @@
  */
 package com.android.systemui.qs.pipeline.domain.interactor
 
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.shade.ShadeController
 import org.junit.Before
@@ -26,7 +27,8 @@
 import org.mockito.Mockito.verify
 import org.mockito.MockitoAnnotations
 
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 @SmallTest
 class PanelInteractorImplTest : SysuiTestCase() {
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
index d880172..34c4c98 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/TileSpecTest.kt
@@ -17,15 +17,17 @@
 package com.android.systemui.qs.pipeline.shared
 
 import android.content.ComponentName
-import android.testing.AndroidTestingRunner
+import androidx.test.ext.junit.runners.AndroidJUnit4
 import androidx.test.filters.SmallTest
+import com.android.systemui.RoboPilotTest
 import com.android.systemui.SysuiTestCase
 import com.google.common.truth.Truth.assertThat
 import org.junit.Test
 import org.junit.runner.RunWith
 
 @SmallTest
-@RunWith(AndroidTestingRunner::class)
+@RoboPilotTest
+@RunWith(AndroidJUnit4::class)
 class TileSpecTest : SysuiTestCase() {
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
index 5e7f68c..e5c55d8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/BluetoothTileTest.kt
@@ -168,7 +168,7 @@
         val btDevice = mock<BluetoothDevice>()
         whenever(cachedDevice2.device).thenReturn(btDevice)
         whenever(btDevice.getMetadata(BluetoothDevice.METADATA_MAIN_BATTERY)).thenReturn(null)
-        whenever(cachedDevice2.batteryLevel).thenReturn(25)
+        whenever(cachedDevice2.minBatteryLevelWithMemberDevices).thenReturn(25)
         addConnectedDevice(cachedDevice2)
 
         tile.handleUpdateState(state, /* arg= */ null)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/RequestProcessorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/RequestProcessorTest.kt
index 1e47f78..0d694ee 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/RequestProcessorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/RequestProcessorTest.kt
@@ -51,30 +51,6 @@
 
     /** Tests the Java-compatible function wrapper, ensures callback is invoked. */
     @Test
-    fun testProcessAsync() {
-        val request =
-            ScreenshotRequest.Builder(TAKE_SCREENSHOT_PROVIDED_IMAGE, SCREENSHOT_KEY_OTHER)
-                .setBitmap(Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888))
-                .build()
-        val processor = RequestProcessor(imageCapture, policy, flags, scope)
-
-        var result: ScreenshotRequest? = null
-        var callbackCount = 0
-        val callback: (ScreenshotRequest) -> Unit = { processedRequest: ScreenshotRequest ->
-            result = processedRequest
-            callbackCount++
-        }
-
-        // runs synchronously, using Unconfined Dispatcher
-        processor.processAsync(request, callback)
-
-        // Callback invoked once returning the same request (no changes)
-        assertThat(callbackCount).isEqualTo(1)
-        assertThat(result).isEqualTo(request)
-    }
-
-    /** Tests the Java-compatible function wrapper, ensures callback is invoked. */
-    @Test
     fun testProcessAsync_ScreenshotData() {
         val request =
             ScreenshotData.fromRequest(
@@ -112,13 +88,6 @@
             ScreenshotRequest.Builder(TAKE_SCREENSHOT_FULLSCREEN, SCREENSHOT_OTHER).build()
         val processor = RequestProcessor(imageCapture, policy, flags, scope)
 
-        val processedRequest = processor.process(request)
-
-        // Request has topComponent added, but otherwise unchanged.
-        assertThat(processedRequest.type).isEqualTo(TAKE_SCREENSHOT_FULLSCREEN)
-        assertThat(processedRequest.source).isEqualTo(SCREENSHOT_OTHER)
-        assertThat(processedRequest.topComponent).isEqualTo(component)
-
         val processedData = processor.process(ScreenshotData.fromRequest(request))
 
         // Request has topComponent added, but otherwise unchanged.
@@ -144,18 +113,6 @@
             ScreenshotRequest.Builder(TAKE_SCREENSHOT_FULLSCREEN, SCREENSHOT_KEY_OTHER).build()
         val processor = RequestProcessor(imageCapture, policy, flags, scope)
 
-        val processedRequest = processor.process(request)
-
-        // Expect a task snapshot is taken, overriding the full screen mode
-        assertThat(processedRequest.type).isEqualTo(TAKE_SCREENSHOT_PROVIDED_IMAGE)
-        assertThat(bitmap.equalsHardwareBitmap(processedRequest.bitmap)).isTrue()
-        assertThat(processedRequest.boundsInScreen).isEqualTo(bounds)
-        assertThat(processedRequest.insets).isEqualTo(Insets.NONE)
-        assertThat(processedRequest.taskId).isEqualTo(TASK_ID)
-        assertThat(imageCapture.requestedTaskId).isEqualTo(TASK_ID)
-        assertThat(processedRequest.userId).isEqualTo(USER_ID)
-        assertThat(processedRequest.topComponent).isEqualTo(component)
-
         val processedData = processor.process(ScreenshotData.fromRequest(request))
 
         // Expect a task snapshot is taken, overriding the full screen mode
@@ -165,8 +122,6 @@
         assertThat(processedData.insets).isEqualTo(Insets.NONE)
         assertThat(processedData.taskId).isEqualTo(TASK_ID)
         assertThat(imageCapture.requestedTaskId).isEqualTo(TASK_ID)
-        assertThat(processedRequest.userId).isEqualTo(USER_ID)
-        assertThat(processedRequest.topComponent).isEqualTo(component)
     }
 
     @Test
@@ -186,9 +141,6 @@
         val processor = RequestProcessor(imageCapture, policy, flags, scope)
 
         Assert.assertThrows(IllegalStateException::class.java) {
-            runBlocking { processor.process(request) }
-        }
-        Assert.assertThrows(IllegalStateException::class.java) {
             runBlocking { processor.process(ScreenshotData.fromRequest(request)) }
         }
     }
@@ -212,11 +164,6 @@
                 .setInsets(Insets.NONE)
                 .build()
 
-        val processedRequest = processor.process(request)
-
-        // No changes
-        assertThat(processedRequest).isEqualTo(request)
-
         val screenshotData = ScreenshotData.fromRequest(request)
         val processedData = processor.process(screenshotData)
 
@@ -243,14 +190,10 @@
                 .setInsets(Insets.NONE)
                 .build()
 
-        val processedRequest = processor.process(request)
-
-        // Work profile, but already a task snapshot, so no changes
-        assertThat(processedRequest).isEqualTo(request)
-
         val screenshotData = ScreenshotData.fromRequest(request)
         val processedData = processor.process(screenshotData)
 
+        // Work profile, but already a task snapshot, so no changes
         assertThat(processedData).isEqualTo(screenshotData)
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
index 97c2ed4..cfdf66e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
@@ -1,6 +1,7 @@
 package com.android.systemui.screenshot
 
 import android.content.ComponentName
+import android.graphics.Bitmap
 import android.net.Uri
 import android.testing.AndroidTestingRunner
 import android.view.Display
@@ -10,6 +11,7 @@
 import android.view.Display.TYPE_VIRTUAL
 import android.view.Display.TYPE_WIFI
 import android.view.WindowManager
+import android.view.WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE
 import androidx.test.filters.SmallTest
 import com.android.internal.logging.testing.UiEventLoggerFake
 import com.android.internal.util.ScreenshotRequest
@@ -95,6 +97,35 @@
         }
 
     @Test
+    fun executeScreenshots_providedImageType_callsOnlyDefaultDisplayController() =
+        testScope.runTest {
+            setDisplays(display(TYPE_INTERNAL, id = 0), display(TYPE_EXTERNAL, id = 1))
+            val onSaved = { _: Uri -> }
+            screenshotExecutor.executeScreenshots(
+                createScreenshotRequest(TAKE_SCREENSHOT_PROVIDED_IMAGE),
+                onSaved,
+                callback
+            )
+
+            verify(controllerFactory).create(eq(0))
+            verify(controllerFactory, never()).create(eq(1))
+
+            val capturer = ArgumentCaptor<ScreenshotData>()
+
+            verify(controller0).handleScreenshot(capturer.capture(), any(), any())
+            assertThat(capturer.value.displayId).isEqualTo(0)
+            // OnSaved callback should be different.
+            verify(controller1, never()).handleScreenshot(any(), any(), any())
+
+            assertThat(eventLogger.numLogs()).isEqualTo(1)
+            assertThat(eventLogger.get(0).eventId)
+                .isEqualTo(ScreenshotEvent.SCREENSHOT_REQUESTED_KEY_OTHER.id)
+            assertThat(eventLogger.get(0).packageName).isEqualTo(topComponent.packageName)
+
+            screenshotExecutor.onDestroy()
+        }
+
+    @Test
     fun executeScreenshots_onlyVirtualDisplays_noInteractionsWithControllers() =
         testScope.runTest {
             setDisplays(display(TYPE_VIRTUAL, id = 0), display(TYPE_VIRTUAL, id = 1))
@@ -283,12 +314,14 @@
         runCurrent()
     }
 
-    private fun createScreenshotRequest() =
-        ScreenshotRequest.Builder(
-                WindowManager.TAKE_SCREENSHOT_FULLSCREEN,
-                WindowManager.ScreenshotSource.SCREENSHOT_KEY_OTHER
-            )
+    private fun createScreenshotRequest(type: Int = WindowManager.TAKE_SCREENSHOT_FULLSCREEN) =
+        ScreenshotRequest.Builder(type, WindowManager.ScreenshotSource.SCREENSHOT_KEY_OTHER)
             .setTopComponent(topComponent)
+            .also {
+                if (type == TAKE_SCREENSHOT_PROVIDED_IMAGE) {
+                    it.setBitmap(Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888))
+                }
+            }
             .build()
 
     private class FakeRequestProcessor : ScreenshotRequestProcessor {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotServiceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotServiceTest.kt
index a08cda6..6205d90 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotServiceTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotServiceTest.kt
@@ -20,10 +20,6 @@
 import android.app.admin.DevicePolicyResources.Strings.SystemUi.SCREENSHOT_BLOCKED_BY_ADMIN
 import android.app.admin.DevicePolicyResourcesManager
 import android.content.ComponentName
-import android.graphics.Bitmap
-import android.graphics.Bitmap.Config.HARDWARE
-import android.graphics.ColorSpace
-import android.hardware.HardwareBuffer
 import android.os.UserHandle
 import android.os.UserManager
 import android.testing.AndroidTestingRunner
@@ -94,14 +90,6 @@
 
         // Stub request processor as a synchronous no-op for tests with the flag enabled
         doAnswer {
-                val request: ScreenshotRequest = it.getArgument(0) as ScreenshotRequest
-                val consumer: Consumer<ScreenshotRequest> = it.getArgument(1)
-                consumer.accept(request)
-            }
-            .whenever(requestProcessor)
-            .processAsync(/* request= */ any(ScreenshotRequest::class.java), /* callback= */ any())
-
-        doAnswer {
                 val request: ScreenshotData = it.getArgument(0) as ScreenshotData
                 val consumer: Consumer<ScreenshotData> = it.getArgument(1)
                 consumer.accept(request)
@@ -353,23 +341,3 @@
         return service
     }
 }
-
-private fun Bitmap.equalsHardwareBitmap(other: Bitmap): Boolean {
-    return config == HARDWARE &&
-        other.config == HARDWARE &&
-        hardwareBuffer == other.hardwareBuffer &&
-        colorSpace == other.colorSpace
-}
-
-/** A hardware Bitmap is mandated by use of ScreenshotHelper.HardwareBitmapBundler */
-private fun makeHardwareBitmap(width: Int, height: Int): Bitmap {
-    val buffer =
-        HardwareBuffer.create(
-            width,
-            height,
-            HardwareBuffer.RGBA_8888,
-            1,
-            HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE
-        )
-    return Bitmap.wrapHardwareBuffer(buffer, ColorSpace.get(ColorSpace.Named.SRGB))!!
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
index 1c9ec27..13bf53b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
@@ -65,6 +65,7 @@
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.UiEventLogger;
 import com.android.internal.logging.testing.UiEventLoggerFake;
+import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.util.LatencyTracker;
 import com.android.keyguard.KeyguardClockSwitch;
 import com.android.keyguard.KeyguardClockSwitchController;
@@ -171,6 +172,7 @@
 import com.android.systemui.statusbar.policy.KeyguardStateController;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcherController;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcherView;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 import com.android.systemui.statusbar.window.StatusBarWindowStateController;
 import com.android.systemui.unfold.SysUIUnfoldComponent;
 import com.android.systemui.util.kotlin.JavaAdapter;
@@ -271,6 +273,7 @@
     @Mock protected KeyguardIndicationController mKeyguardIndicationController;
     @Mock protected FragmentService mFragmentService;
     @Mock protected FragmentHostManager mFragmentHostManager;
+    @Mock protected IStatusBarService mStatusBarService;
     @Mock protected NotificationRemoteInputManager mNotificationRemoteInputManager;
     @Mock protected RecordingController mRecordingController;
     @Mock protected LockscreenGestureLogger mLockscreenGestureLogger;
@@ -621,6 +624,7 @@
                 mNavigationBarController,
                 mQsController,
                 mFragmentService,
+                mStatusBarService,
                 mContentResolver,
                 mShadeHeaderController,
                 mScreenOffAnimationController,
@@ -656,7 +660,7 @@
                 mSharedNotificationContainerInteractor,
                 mKeyguardViewConfigurator,
                 mKeyguardFaceAuthInteractor,
-                mKeyguardRootView);
+                new ResourcesSplitShadeStateController());
         mNotificationPanelViewController.initDependencies(
                 mCentralSurfaces,
                 null,
@@ -728,7 +732,8 @@
                 mShadeRepository,
                 mShadeInteractor,
                 mJavaAdapter,
-                mCastController
+                mCastController,
+                new ResourcesSplitShadeStateController()
         );
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
index 7aeafeb..638c266 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -866,37 +866,6 @@
     }
 
     @Test
-    public void testUnlockAnimationDoesNotAffectScrim() {
-        mNotificationPanelViewController.onUnlockHintStarted();
-        verify(mScrimController).setExpansionAffectsAlpha(false);
-        mNotificationPanelViewController.onUnlockHintFinished();
-        verify(mScrimController).setExpansionAffectsAlpha(true);
-    }
-
-    @Test
-    public void testUnlockHintAnimation_runs_whenNotInPowerSaveMode_andDozeAmountIsZero() {
-        when(mPowerManager.isPowerSaveMode()).thenReturn(false);
-        when(mAmbientState.getDozeAmount()).thenReturn(0f);
-        mNotificationPanelViewController.startUnlockHintAnimation();
-        assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isTrue();
-    }
-
-    @Test
-    public void testUnlockHintAnimation_doesNotRun_inPowerSaveMode() {
-        when(mPowerManager.isPowerSaveMode()).thenReturn(true);
-        mNotificationPanelViewController.startUnlockHintAnimation();
-        assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
-    }
-
-    @Test
-    public void testUnlockHintAnimation_doesNotRun_whenDozeAmountNotZero() {
-        when(mPowerManager.isPowerSaveMode()).thenReturn(false);
-        when(mAmbientState.getDozeAmount()).thenReturn(0.5f);
-        mNotificationPanelViewController.startUnlockHintAnimation();
-        assertThat(mNotificationPanelViewController.isHintAnimationRunning()).isFalse();
-    }
-
-    @Test
     public void setKeyguardStatusBarAlpha_setsAlphaOnKeyguardStatusBarController() {
         float statusBarAlpha = 0.5f;
 
@@ -1056,36 +1025,6 @@
     }
 
     @Test
-    public void onEmptySpaceClicked_notDozingAndFaceDetectionIsNotRunning_startsUnlockAnimation() {
-        StatusBarStateController.StateListener statusBarStateListener =
-                mNotificationPanelViewController.getStatusBarStateListener();
-        statusBarStateListener.onStateChanged(KEYGUARD);
-        mNotificationPanelViewController.setDozing(false, false);
-        when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(false);
-
-        // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
-        mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
-        mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
-        verify(mNotificationStackScrollLayoutController).setUnlockHintRunning(true);
-    }
-
-    @Test
-    public void onEmptySpaceClicked_notDozingAndFaceDetectionIsRunning_doesNotStartUnlockHint() {
-        StatusBarStateController.StateListener statusBarStateListener =
-                mNotificationPanelViewController.getStatusBarStateListener();
-        statusBarStateListener.onStateChanged(KEYGUARD);
-        mNotificationPanelViewController.setDozing(false, false);
-        when(mUpdateMonitor.requestFaceAuth(NOTIFICATION_PANEL_CLICKED)).thenReturn(true);
-
-        // This sets the dozing state that is read when onMiddleClicked is eventually invoked.
-        mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
-        mEmptySpaceClickListenerCaptor.getValue().onEmptySpaceClicked(0, 0);
-
-        verify(mNotificationStackScrollLayoutController, never()).setUnlockHintRunning(true);
-    }
-
-    @Test
     public void onEmptySpaceClicked_whenDozingAndOnKeyguard_doesNotRequestFaceAuth() {
         StatusBarStateController.StateListener statusBarStateListener =
                 mNotificationPanelViewController.getStatusBarStateListener();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
index 577b6e0..36cf1d9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerLegacyTest.kt
@@ -39,6 +39,7 @@
 import com.android.systemui.recents.OverviewProxyService
 import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.concurrency.FakeExecutor
 import com.android.systemui.util.mockito.capture
 import com.android.systemui.util.mockito.whenever
@@ -118,6 +119,7 @@
                 delayableExecutor,
                 featureFlags,
                 notificationStackScrollLayoutController,
+                ResourcesSplitShadeStateController()
             )
 
         overrideResource(R.dimen.split_shade_notifications_scrim_margin_bottom, SCRIM_MARGIN)
@@ -474,6 +476,7 @@
                 delayableExecutor,
                 featureFlags,
                 notificationStackScrollLayoutController,
+                ResourcesSplitShadeStateController()
             )
         controller.updateConstraints()
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
index 405199e..090bee2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationsQSContainerControllerTest.kt
@@ -39,6 +39,7 @@
 import com.android.systemui.recents.OverviewProxyService
 import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.concurrency.FakeExecutor
 import com.android.systemui.util.mockito.capture
 import com.android.systemui.util.mockito.whenever
@@ -117,6 +118,7 @@
                 delayableExecutor,
                 featureFlags,
                 notificationStackScrollLayoutController,
+                ResourcesSplitShadeStateController()
             )
 
         overrideResource(R.dimen.split_shade_notifications_scrim_margin_bottom, SCRIM_MARGIN)
@@ -457,6 +459,7 @@
                 delayableExecutor,
                 featureFlags,
                 notificationStackScrollLayoutController,
+                ResourcesSplitShadeStateController()
             )
         controller.updateConstraints()
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
index e42a7a6..849127e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java
@@ -34,7 +34,6 @@
 import com.android.internal.logging.UiEventLogger;
 import com.android.keyguard.KeyguardStatusView;
 import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.keyguard.TestScopeProvider;
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository;
@@ -48,6 +47,8 @@
 import com.android.systemui.plugins.FalsingManager;
 import com.android.systemui.plugins.qs.QS;
 import com.android.systemui.qs.QSFragment;
+import com.android.systemui.scene.SceneTestUtils;
+import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags;
 import com.android.systemui.screenrecord.RecordingController;
 import com.android.systemui.shade.data.repository.FakeShadeRepository;
 import com.android.systemui.shade.domain.interactor.ShadeInteractor;
@@ -74,6 +75,7 @@
 import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository;
 import com.android.systemui.statusbar.policy.CastController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 import com.android.systemui.statusbar.policy.KeyguardStateController;
 import com.android.systemui.user.domain.interactor.UserInteractor;
 import com.android.systemui.util.kotlin.JavaAdapter;
@@ -99,7 +101,8 @@
 
     protected QuickSettingsController mQsController;
 
-    protected TestScope mTestScope = TestScopeProvider.getTestScope();
+    protected SceneTestUtils mUtils = new SceneTestUtils(this);
+    protected TestScope mTestScope = mUtils.getTestScope();
 
     @Mock
     protected Resources mResources;
@@ -172,13 +175,16 @@
                 new ShadeInteractor(
                         mTestScope.getBackgroundScope(),
                         mDisableFlagsRepository,
+                        new FakeSceneContainerFlags(),
+                        () -> mUtils.sceneInteractor(),
                         mKeyguardRepository,
                         new FakeUserSetupRepository(),
                         mDeviceProvisionedController,
                         mUserInteractor,
                         new SharedNotificationContainerInteractor(
                                 new FakeConfigurationRepository(),
-                                mContext),
+                                mContext,
+                                new ResourcesSplitShadeStateController()),
                         mShadeRepository
                 );
 
@@ -256,7 +262,8 @@
                 mShadeRepository,
                 mShadeInteractor,
                 new JavaAdapter(mTestScope.getBackgroundScope()),
-                mCastController
+                mCastController,
+                new ResourcesSplitShadeStateController()
         );
         mQsController.init();
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
index 8f8b840..7d5f68e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
@@ -130,7 +130,7 @@
     var viewVisibility = View.GONE
     var viewAlpha = 1f
 
-    private val systemIcons = LinearLayout(context)
+    private val systemIconsHoverContainer = LinearLayout(context)
     private lateinit var shadeHeaderController: ShadeHeaderController
     private lateinit var carrierIconSlots: List<String>
     private val configurationController = FakeConfigurationController()
@@ -150,7 +150,8 @@
             .thenReturn(batteryMeterView)
 
         whenever<StatusIconContainer>(view.requireViewById(R.id.statusIcons)).thenReturn(statusIcons)
-        whenever<View>(view.requireViewById(R.id.shade_header_system_icons)).thenReturn(systemIcons)
+        whenever<View>(view.requireViewById(R.id.hover_system_icons_container))
+            .thenReturn(systemIconsHoverContainer)
 
         viewContext = Mockito.spy(context)
         whenever(view.context).thenReturn(viewContext)
@@ -457,12 +458,12 @@
     }
 
     @Test
-    fun testLargeScreenActive_collapseActionRun_onSystemIconsClick() {
+    fun testLargeScreenActive_collapseActionRun_onSystemIconsHoverContainerClick() {
         shadeHeaderController.largeScreenActive = true
         var wasRun = false
         shadeHeaderController.shadeCollapseAction = Runnable { wasRun = true }
 
-        systemIcons.performClick()
+        systemIconsHoverContainer.performClick()
 
         assertThat(wasRun).isTrue()
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
index ba5ecce..9275ccb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt
@@ -35,12 +35,17 @@
 import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory
 import com.android.systemui.keyguard.shared.model.StatusBarState
 import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.scene.SceneTestUtils
+import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags
+import com.android.systemui.scene.shared.model.ObservableTransitionState
+import com.android.systemui.scene.shared.model.SceneKey
 import com.android.systemui.shade.domain.interactor.ShadeInteractor
 import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel
 import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository
 import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
 import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
 import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
 import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
 import com.android.systemui.user.data.model.UserSwitcherSettingsModel
@@ -52,9 +57,8 @@
 import com.android.systemui.util.mockito.whenever
 import com.google.common.truth.Truth.assertThat
 import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.runBlocking
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
 import org.junit.Before
@@ -67,9 +71,11 @@
 class ShadeInteractorTest : SysuiTestCase() {
     private lateinit var underTest: ShadeInteractor
 
-    private val testDispatcher = StandardTestDispatcher()
-    private val testScope = TestScope(testDispatcher)
+    private val utils = SceneTestUtils(this)
+    private val testScope = utils.testScope
     private val featureFlags = FakeFeatureFlags()
+    private val sceneContainerFlags = FakeSceneContainerFlags()
+    private val sceneInteractor = utils.sceneInteractor()
     private val userSetupRepository = FakeUserSetupRepository()
     private val userRepository = FakeUserRepository()
     private val disableFlagsRepository = FakeDisableFlagsRepository()
@@ -80,6 +86,7 @@
         SharedNotificationContainerInteractor(
             configurationRepository,
             mContext,
+            ResourcesSplitShadeStateController()
         )
 
     @Mock private lateinit var manager: UserManager
@@ -103,7 +110,7 @@
         val refreshUsersScheduler =
             RefreshUsersScheduler(
                 applicationScope = testScope.backgroundScope,
-                mainDispatcher = testDispatcher,
+                mainDispatcher = utils.testDispatcher,
                 repository = userRepository,
             )
 
@@ -141,7 +148,7 @@
                     ),
                 broadcastDispatcher = fakeBroadcastDispatcher,
                 keyguardUpdateMonitor = keyguardUpdateMonitor,
-                backgroundDispatcher = testDispatcher,
+                backgroundDispatcher = utils.testDispatcher,
                 activityManager = activityManager,
                 refreshUsersScheduler = refreshUsersScheduler,
                 guestUserInteractor = guestInteractor,
@@ -151,6 +158,8 @@
             ShadeInteractor(
                 testScope.backgroundScope,
                 disableFlagsRepository,
+                sceneContainerFlags,
+                { sceneInteractor },
                 keyguardRepository,
                 userSetupRepository,
                 deviceProvisionedController,
@@ -557,4 +566,146 @@
             // THEN anyExpanding is false
             assertThat(actual).isFalse()
         }
+
+    @Test
+    fun lockscreenShadeExpansion_idle_onScene() =
+        testScope.runTest() {
+            // GIVEN an expansion flow based on transitions to and from a scene
+            val key = SceneKey.Shade
+            val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
+            val expansionAmount by collectLastValue(expansion)
+
+            // WHEN transition state is idle on the scene
+            val transitionState =
+                MutableStateFlow<ObservableTransitionState>(ObservableTransitionState.Idle(key))
+            sceneInteractor.setTransitionState(transitionState)
+
+            // THEN expansion is 1
+            assertThat(expansionAmount).isEqualTo(1f)
+        }
+
+    @Test
+    fun lockscreenShadeExpansion_idle_onDifferentScene() =
+        testScope.runTest() {
+            // GIVEN an expansion flow based on transitions to and from a scene
+            val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.Shade)
+            val expansionAmount by collectLastValue(expansion)
+
+            // WHEN transition state is idle on a different scene
+            val transitionState =
+                MutableStateFlow<ObservableTransitionState>(
+                    ObservableTransitionState.Idle(SceneKey.Lockscreen)
+                )
+            sceneInteractor.setTransitionState(transitionState)
+
+            // THEN expansion is 0
+            assertThat(expansionAmount).isEqualTo(0f)
+        }
+
+    @Test
+    fun lockscreenShadeExpansion_transitioning_toScene() =
+        testScope.runTest() {
+            // GIVEN an expansion flow based on transitions to and from a scene
+            val key = SceneKey.QuickSettings
+            val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
+            val expansionAmount by collectLastValue(expansion)
+
+            // WHEN transition state is starting to move to the scene
+            val progress = MutableStateFlow(0f)
+            val transitionState =
+                MutableStateFlow<ObservableTransitionState>(
+                    ObservableTransitionState.Transition(
+                        fromScene = SceneKey.Lockscreen,
+                        toScene = key,
+                        progress = progress,
+                    )
+                )
+            sceneInteractor.setTransitionState(transitionState)
+
+            // THEN expansion is 0
+            assertThat(expansionAmount).isEqualTo(0f)
+
+            // WHEN transition state is partially to the scene
+            progress.value = .4f
+
+            // THEN expansion matches the progress
+            assertThat(expansionAmount).isEqualTo(.4f)
+
+            // WHEN transition completes
+            progress.value = 1f
+
+            // THEN expansion is 1
+            assertThat(expansionAmount).isEqualTo(1f)
+        }
+
+    @Test
+    fun lockscreenShadeExpansion_transitioning_fromScene() =
+        testScope.runTest() {
+            // GIVEN an expansion flow based on transitions to and from a scene
+            val key = SceneKey.QuickSettings
+            val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
+            val expansionAmount by collectLastValue(expansion)
+
+            // WHEN transition state is starting to move to the scene
+            val progress = MutableStateFlow(0f)
+            val transitionState =
+                MutableStateFlow<ObservableTransitionState>(
+                    ObservableTransitionState.Transition(
+                        fromScene = key,
+                        toScene = SceneKey.Lockscreen,
+                        progress = progress,
+                    )
+                )
+            sceneInteractor.setTransitionState(transitionState)
+
+            // THEN expansion is 1
+            assertThat(expansionAmount).isEqualTo(1f)
+
+            // WHEN transition state is partially to the scene
+            progress.value = .4f
+
+            // THEN expansion reflects the progress
+            assertThat(expansionAmount).isEqualTo(.6f)
+
+            // WHEN transition completes
+            progress.value = 1f
+
+            // THEN expansion is 0
+            assertThat(expansionAmount).isEqualTo(0f)
+        }
+
+    @Test
+    fun lockscreenShadeExpansion_transitioning_toAndFromDifferentScenes() =
+        testScope.runTest() {
+            // GIVEN an expansion flow based on transitions to and from a scene
+            val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings)
+            val expansionAmount by collectLastValue(expansion)
+
+            // WHEN transition state is starting to between different scenes
+            val progress = MutableStateFlow(0f)
+            val transitionState =
+                MutableStateFlow<ObservableTransitionState>(
+                    ObservableTransitionState.Transition(
+                        fromScene = SceneKey.Lockscreen,
+                        toScene = SceneKey.Shade,
+                        progress = progress,
+                    )
+                )
+            sceneInteractor.setTransitionState(transitionState)
+
+            // THEN expansion is 0
+            assertThat(expansionAmount).isEqualTo(0f)
+
+            // WHEN transition state is partially complete
+            progress.value = .4f
+
+            // THEN expansion is still 0
+            assertThat(expansionAmount).isEqualTo(0f)
+
+            // WHEN transition completes
+            progress.value = 1f
+
+            // THEN expansion is still 0
+            assertThat(expansionAmount).isEqualTo(0f)
+        }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
index 8309342..36f82c2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorImplTest.kt
@@ -5,6 +5,7 @@
 import com.android.systemui.R
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.google.common.truth.Expect
 import org.junit.Rule
 import org.junit.Test
@@ -23,7 +24,8 @@
             configurationController,
             context,
             splitShadeInterpolator,
-            portraitShadeInterpolator
+            portraitShadeInterpolator,
+            ResourcesSplitShadeStateController()
         )
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
index d5a1f80..7737b43 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
@@ -9,6 +9,7 @@
 import com.android.systemui.shade.ShadeExpansionStateManager
 import com.android.systemui.statusbar.SysuiStatusBarStateController
 import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import org.junit.Before
 import org.junit.Test
 import org.junit.runner.RunWith
@@ -41,6 +42,7 @@
                 context,
                 scrimShadeTransitionController,
                 statusBarStateController,
+                    ResourcesSplitShadeStateController()
             )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
index 7041262..673d63f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerTest.kt
@@ -23,6 +23,7 @@
 import com.android.systemui.dump.DumpManager
 import com.android.systemui.plugins.qs.QS
 import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.google.common.truth.Expect
 import com.google.common.truth.Truth.assertThat
 import org.junit.Before
@@ -59,7 +60,8 @@
                 context,
                 configurationController,
                 dumpManager,
-                qsProvider = { qS }
+                qsProvider = { qS },
+                ResourcesSplitShadeStateController()
             )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
index 6f75880..2c9dfcc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
@@ -20,6 +20,8 @@
 import com.android.systemui.plugins.qs.QS
 import com.android.systemui.power.data.repository.FakePowerRepository
 import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.scene.SceneTestUtils
+import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags
 import com.android.systemui.shade.ShadeViewController
 import com.android.systemui.shade.data.repository.FakeShadeRepository
 import com.android.systemui.shade.domain.interactor.ShadeInteractor
@@ -37,10 +39,9 @@
 import com.android.systemui.statusbar.phone.ScrimController
 import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
 import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.mockito.mock
 import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import org.junit.After
 import org.junit.Assert.assertFalse
@@ -74,8 +75,8 @@
 @RunWith(AndroidTestingRunner::class)
 @OptIn(ExperimentalCoroutinesApi::class)
 class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
-
-    private val testScope = TestScope(StandardTestDispatcher())
+    private val utils = SceneTestUtils(this)
+    private val testScope = utils.testScope
 
     lateinit var transitionController: LockscreenShadeTransitionController
     lateinit var row: ExpandableNotificationRow
@@ -102,17 +103,22 @@
     @Mock lateinit var qsTransitionController: LockscreenShadeQsTransitionController
     @Mock lateinit var activityStarter: ActivityStarter
     @Mock lateinit var transitionControllerCallback: LockscreenShadeTransitionController.Callback
+    private val sceneContainerFlags = FakeSceneContainerFlags()
+    private val sceneInteractor = utils.sceneInteractor()
     private val disableFlagsRepository = FakeDisableFlagsRepository()
     private val keyguardRepository = FakeKeyguardRepository()
     private val configurationRepository = FakeConfigurationRepository()
     private val sharedNotificationContainerInteractor = SharedNotificationContainerInteractor(
         configurationRepository,
         mContext,
+            ResourcesSplitShadeStateController()
     )
     private val shadeInteractor =
         ShadeInteractor(
             testScope.backgroundScope,
             disableFlagsRepository,
+            sceneContainerFlags,
+            { sceneInteractor },
             keyguardRepository,
             userSetupRepository = FakeUserSetupRepository(),
             deviceProvisionedController = mock(),
@@ -168,7 +174,8 @@
                         scrimController,
                         context,
                         configurationController,
-                        dumpManager
+                        dumpManager,
+                            ResourcesSplitShadeStateController()
                     ),
                 keyguardTransitionControllerFactory = { notificationPanelController ->
                     LockscreenShadeKeyguardTransitionController(
@@ -176,7 +183,8 @@
                         notificationPanelController,
                         context,
                         configurationController,
-                        dumpManager
+                        dumpManager,
+                            ResourcesSplitShadeStateController()
                     )
                 },
                 qsTransitionControllerFactory = { qsTransitionController },
@@ -184,6 +192,7 @@
                 shadeRepository = FakeShadeRepository(),
                 shadeInteractor = shadeInteractor,
                 powerInteractor = powerInteractor,
+                splitShadeStateController = ResourcesSplitShadeStateController()
             )
         transitionController.addCallback(transitionControllerCallback)
         whenever(nsslController.view).thenReturn(stackscroller)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
index c49f179..a258f67 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
@@ -33,6 +33,7 @@
 import com.android.systemui.statusbar.phone.DozeParameters
 import com.android.systemui.statusbar.phone.ScrimController
 import com.android.systemui.statusbar.policy.FakeConfigurationController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.statusbar.policy.KeyguardStateController
 import com.android.systemui.util.WallpaperController
 import com.android.systemui.util.mockito.eq
@@ -114,8 +115,9 @@
                 notificationShadeWindowController,
                 dozeParameters,
                 context,
+                    ResourcesSplitShadeStateController(),
                 dumpManager,
-                configurationController)
+                configurationController,)
         notificationShadeDepthController.shadeAnimation = shadeAnimation
         notificationShadeDepthController.brightnessMirrorSpring = brightnessSpring
         notificationShadeDepthController.root = root
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
index 2e5afa4..98315d0c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java
@@ -18,6 +18,8 @@
 
 import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN;
 import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS;
+import static android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_DENIED;
+import static android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_HOME;
 
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertNotNull;
@@ -439,11 +441,29 @@
 
     public void setVoiceRegState(int voiceRegState) {
         when(mServiceState.getState()).thenReturn(voiceRegState);
+        when(mServiceState.getVoiceRegState()).thenReturn(voiceRegState);
         updateServiceState();
     }
 
-    public void setDataRegState(int dataRegState) {
-        when(mServiceState.getDataRegistrationState()).thenReturn(dataRegState);
+    public void setDataRegInService(boolean inService) {
+        // mFakeRegInfo#isInService()
+        // Utils#isInService uses NetworkRegistrationInfo#isInService(). Since we can't
+        // mock the answer here, just set the bit based on what the caller wants
+        NetworkRegistrationInfo.Builder builder = new NetworkRegistrationInfo.Builder()
+                .setTransportType(TRANSPORT_TYPE_WWAN)
+                .setDomain(DOMAIN_PS)
+                .setAccessNetworkTechnology(TelephonyManager.NETWORK_TYPE_LTE);
+
+        if (inService) {
+            builder.setRegistrationState(REGISTRATION_STATE_HOME);
+        } else {
+            builder.setRegistrationState(REGISTRATION_STATE_DENIED);
+        }
+
+        NetworkRegistrationInfo fakeRegInfo = builder.build();
+        when(mServiceState.getNetworkRegistrationInfo(DOMAIN_PS, TRANSPORT_TYPE_WWAN))
+                .thenReturn(fakeRegInfo);
+
         updateServiceState();
     }
 
@@ -658,3 +678,4 @@
         assertEquals("Data network name", expected, mNetworkController.getMobileDataNetworkName());
     }
 }
+
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
index d5689dc..f667b83 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java
@@ -340,7 +340,7 @@
     public void testIsDataInService_notInService_false() {
         setupDefaultSignal();
         setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE);
-        setDataRegState(ServiceState.STATE_OUT_OF_SERVICE);
+        setDataRegInService(false);
         assertFalse(mNetworkController.isMobileDataNetworkInService());
     }
 
@@ -408,3 +408,4 @@
                 false);
     }
 }
+
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
index 580463a..88ddc2d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/disableflags/data/repository/DisableFlagsRepositoryTest.kt
@@ -31,6 +31,7 @@
 import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel
 import com.android.systemui.statusbar.policy.ConfigurationController
 import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.argumentCaptor
 import com.android.systemui.util.mockito.mock
@@ -56,6 +57,7 @@
         RemoteInputQuickSettingsDisabler(
             context,
             commandQueue,
+            ResourcesSplitShadeStateController(),
             configurationController,
         )
     private val logBuffer = LogBufferFactory(DumpManager(), mock()).create("buffer", 10)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt
new file mode 100644
index 0000000..e38adeb
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotifInflationErrorManagerTest.kt
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.notification.row
+
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
+import com.android.systemui.statusbar.notification.row.NotifInflationErrorManager.NotifInflationErrorListener
+import com.android.systemui.util.mockito.any
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mockito.mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+class NotifInflationErrorManagerTest : SysuiTestCase() {
+    private lateinit var manager: NotifInflationErrorManager
+
+    private val listener1 = mock(NotifInflationErrorListener::class.java)
+    private val listener2 = mock(NotifInflationErrorListener::class.java)
+
+    private val foo: NotificationEntry = NotificationEntryBuilder().setPkg("foo").build()
+    private val bar: NotificationEntry = NotificationEntryBuilder().setPkg("bar").build()
+    private val baz: NotificationEntry = NotificationEntryBuilder().setPkg("baz").build()
+
+    private val fooException = Exception("foo")
+    private val barException = Exception("bar")
+
+    @Before
+    fun setUp() {
+        // Reset manager instance before each test.
+        manager = NotifInflationErrorManager()
+    }
+
+    @Test
+    fun testTracksInflationErrors() {
+        manager.setInflationError(foo, fooException)
+        manager.setInflationError(bar, barException)
+
+        assertThat(manager.hasInflationError(foo)).isTrue()
+        assertThat(manager.hasInflationError(bar)).isTrue()
+        assertThat(manager.hasInflationError(baz)).isFalse()
+
+        manager.clearInflationError(bar)
+
+        assertThat(manager.hasInflationError(bar)).isFalse()
+    }
+
+    @Test
+    fun testNotifiesListeners() {
+        manager.addInflationErrorListener(listener1)
+        manager.setInflationError(foo, fooException)
+
+        verify(listener1).onNotifInflationError(foo, fooException)
+
+        manager.addInflationErrorListener(listener2)
+        manager.setInflationError(bar, barException)
+
+        verify(listener1).onNotifInflationError(bar, barException)
+        verify(listener2).onNotifInflationError(bar, barException)
+
+        manager.clearInflationError(foo)
+
+        verify(listener1).onNotifInflationErrorCleared(foo)
+        verify(listener2).onNotifInflationErrorCleared(foo)
+    }
+
+    @Test
+    fun testClearUnknownEntry() {
+        manager.addInflationErrorListener(listener1)
+        manager.clearInflationError(foo)
+
+        verify(listener1, never()).onNotifInflationErrorCleared(any())
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
index 6f431be..b3f5ea2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
@@ -95,6 +95,7 @@
 import com.android.systemui.statusbar.phone.ScrimController;
 import com.android.systemui.statusbar.policy.ConfigurationController;
 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 import com.android.systemui.statusbar.policy.ZenModeController;
 import com.android.systemui.tuner.TunerService;
 import com.android.systemui.util.settings.SecureSettings;
@@ -628,6 +629,16 @@
         verify(mNotificationStackScrollLayout).updateEmptyShadeView(eq(false), anyBoolean());
     }
 
+    @Test
+    public void updateEmptyShadeView_onKeyguardOccludedTransitionToAod_hidesView() {
+        initController(/* viewIsAttached= */ true);
+        mController.onKeyguardTransitionChanged(
+                new TransitionStep(
+                        /* from= */ KeyguardState.OCCLUDED,
+                        /* to= */ KeyguardState.AOD));
+        verify(mNotificationStackScrollLayout).updateEmptyShadeView(eq(false), anyBoolean());
+    }
+
     private LogMaker logMatcher(int category, int type) {
         return argThat(new LogMatcher(category, type));
     }
@@ -703,7 +714,8 @@
                 mNotificationTargetsHelper,
                 mSecureSettings,
                 mock(NotificationDismissibilityProvider.class),
-                mActivityStarter
+                mActivityStarter,
+                new ResourcesSplitShadeStateController()
         );
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
index 72fcdec..4307066 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
@@ -87,6 +87,7 @@
 import com.android.systemui.statusbar.phone.KeyguardBypassController;
 import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
 
 import org.junit.Assert;
 import org.junit.Before;
@@ -322,26 +323,6 @@
     }
 
     @Test
-    public void setUnlockHintRunning_updatesStackEndHeightOnlyOnFinish() {
-        final float expansionFraction = 0.5f;
-        mAmbientState.setStatusBarState(StatusBarState.KEYGUARD);
-        mStackScroller.setUnlockHintRunning(true);
-
-        // Validate that when the animation is running, we update only the stackHeight
-        clearInvocations(mAmbientState);
-        mStackScroller.updateStackEndHeightAndStackHeight(expansionFraction);
-        verify(mAmbientState, never()).setStackEndHeight(anyFloat());
-        verify(mAmbientState).setStackHeight(anyFloat());
-
-        // Validate that when the animation ends the stackEndHeight is recalculated immediately
-        clearInvocations(mAmbientState);
-        mStackScroller.setUnlockHintRunning(false);
-        verify(mAmbientState).setUnlockHintRunning(eq(false));
-        verify(mAmbientState).setStackEndHeight(anyFloat());
-        verify(mAmbientState).setStackHeight(anyFloat());
-    }
-
-    @Test
     public void testNotDimmedOnKeyguard() {
         when(mBarState.getState()).thenReturn(StatusBarState.SHADE);
         mStackScroller.setDimmed(true /* dimmed */, false /* animate */);
@@ -865,6 +846,7 @@
     public void testSplitShade_hasTopOverscroll() {
         mTestableResources
                 .addOverride(R.bool.config_use_split_notification_shade, /* value= */ true);
+        mStackScroller.passSplitShadeStateController(new ResourcesSplitShadeStateController());
         mStackScroller.updateSplitNotificationShade();
         mAmbientState.setExpansionFraction(1f);
 
@@ -880,6 +862,7 @@
     public void testNormalShade_hasNoTopOverscroll() {
         mTestableResources
                 .addOverride(R.bool.config_use_split_notification_shade, /* value= */ false);
+        mStackScroller.passSplitShadeStateController(new ResourcesSplitShadeStateController());
         mStackScroller.updateSplitNotificationShade();
         mAmbientState.setExpansionFraction(1f);
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
index 5279740..bc12bb0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculatorTest.kt
@@ -30,6 +30,7 @@
 import com.android.systemui.statusbar.notification.collection.NotificationEntry
 import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
 import com.android.systemui.statusbar.notification.row.ExpandableView
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.eq
 import com.android.systemui.util.mockito.nullable
@@ -70,7 +71,8 @@
                 statusBarStateController = sysuiStatusBarStateController,
                 lockscreenShadeTransitionController = lockscreenShadeTransitionController,
                 mediaDataManager = mediaDataManager,
-                testableResources.resources
+                testableResources.resources,
+                    ResourcesSplitShadeStateController()
             )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
index 7bbb094..7fc399b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractorTest.kt
@@ -23,6 +23,7 @@
 import com.android.systemui.SysuiTestCase
 import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository
 import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.google.common.truth.Truth.assertThat
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
@@ -43,6 +44,7 @@
             SharedNotificationContainerInteractor(
                 configurationRepository,
                 mContext,
+                ResourcesSplitShadeStateController()
             )
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
index 75fb22d..bfc0910 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
@@ -33,6 +33,8 @@
 import com.android.systemui.keyguard.shared.model.StatusBarState
 import com.android.systemui.keyguard.shared.model.TransitionState
 import com.android.systemui.keyguard.shared.model.TransitionStep
+import com.android.systemui.scene.SceneTestUtils
+import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags
 import com.android.systemui.shade.data.repository.FakeShadeRepository
 import com.android.systemui.shade.domain.interactor.ShadeInteractor
 import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository
@@ -41,13 +43,12 @@
 import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
 import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository
 import com.android.systemui.statusbar.policy.DeviceProvisionedController
+import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
 import com.android.systemui.user.domain.interactor.UserInteractor
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.mock
 import com.android.systemui.util.mockito.whenever
 import com.google.common.truth.Truth.assertThat
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
 import kotlinx.coroutines.test.runCurrent
 import kotlinx.coroutines.test.runTest
 import org.junit.Before
@@ -59,12 +60,16 @@
 @SmallTest
 @RunWith(AndroidJUnit4::class)
 class SharedNotificationContainerViewModelTest : SysuiTestCase() {
-    private val testScope = TestScope(StandardTestDispatcher())
+    private val utils = SceneTestUtils(this)
+
+    private val testScope = utils.testScope
 
     private val disableFlagsRepository = FakeDisableFlagsRepository()
     private val userSetupRepository = FakeUserSetupRepository()
     private val shadeRepository = FakeShadeRepository()
     private val keyguardRepository = FakeKeyguardRepository()
+    private val sceneContainerFlags = FakeSceneContainerFlags()
+    private val sceneInteractor = utils.sceneInteractor()
 
     private lateinit var configurationRepository: FakeConfigurationRepository
     private lateinit var sharedNotificationContainerInteractor:
@@ -102,11 +107,14 @@
             SharedNotificationContainerInteractor(
                 configurationRepository,
                 mContext,
+                ResourcesSplitShadeStateController()
             )
         shadeInteractor =
             ShadeInteractor(
                 testScope.backgroundScope,
                 disableFlagsRepository,
+                sceneContainerFlags,
+                { sceneInteractor },
                 keyguardRepository,
                 userSetupRepository,
                 deviceProvisionedController,
@@ -220,6 +228,14 @@
                 )
             )
             assertThat(isOnLockscreen).isTrue()
+
+            keyguardTransitionRepository.sendTransitionStep(
+                TransitionStep(
+                    to = KeyguardState.PRIMARY_BOUNCER,
+                    transitionState = TransitionState.FINISHED
+                )
+            )
+            assertThat(isOnLockscreen).isTrue()
         }
 
     @Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index 5107ecc..20e732a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -16,12 +16,9 @@
 
 package com.android.systemui.statusbar.phone;
 
-import static com.android.systemui.flags.Flags.FP_LISTEN_OCCLUDING_APPS;
 import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION;
 import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK;
-
 import static com.google.common.truth.Truth.assertThat;
-
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -133,7 +130,6 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mFeatureFlags = new FakeFeatureFlags();
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
         mFeatureFlags.set(ONE_WAY_HAPTICS_API_MIGRATION, false);
         when(mKeyguardStateController.isShowing()).thenReturn(true);
         when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
@@ -439,24 +435,6 @@
 
     @Test
     public void onFPFailureNoHaptics_notInteractive_showLockScreen() {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
-        // GIVEN no vibrator and device is not interactive
-        when(mVibratorHelper.hasVibrator()).thenReturn(false);
-        when(mUpdateMonitor.isDeviceInteractive()).thenReturn(false);
-        when(mUpdateMonitor.isDreaming()).thenReturn(false);
-
-        // WHEN FP fails
-        mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT);
-
-        // THEN wakeup the device
-        verify(mPowerManager).wakeUp(anyLong(), anyInt(), anyString());
-    }
-
-    @Test
-    public void onFPFailureNoHaptics_notInteractive_showLockScreen_doNotListenOccludingApps() {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
-
         // GIVEN no vibrator and device is not interactive
         when(mVibratorHelper.hasVibrator()).thenReturn(false);
         when(mUpdateMonitor.isDeviceInteractive()).thenReturn(false);
@@ -471,8 +449,6 @@
 
     @Test
     public void onFPFailureNoHaptics_dreaming_showLockScreen() {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, true);
-
         // GIVEN no vibrator and device is dreaming
         when(mVibratorHelper.hasVibrator()).thenReturn(false);
         when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
@@ -486,22 +462,6 @@
     }
 
     @Test
-    public void onFPFailureNoHaptics_dreaming_showLockScreen_doNotListeOccludingApps() {
-        mFeatureFlags.set(FP_LISTEN_OCCLUDING_APPS, false);
-
-        // GIVEN no vibrator and device is dreaming
-        when(mVibratorHelper.hasVibrator()).thenReturn(false);
-        when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true);
-        when(mUpdateMonitor.isDreaming()).thenReturn(true);
-
-        // WHEN FP fails
-        mBiometricUnlockController.onBiometricAuthFailed(BiometricSourceType.FINGERPRINT);
-
-        // THEN wakeup the device
-        verify(mPowerManager).wakeUp(anyLong(), anyInt(), anyString());
-    }
-
-    @Test
     public void onSideFingerprintSuccess_recentPowerButtonPress_noHaptic() {
         // GIVEN side fingerprint enrolled, last wake reason was power button
         when(mAuthController.isSfpsEnrolled(anyInt())).thenReturn(true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index 137566b..bd3fb9f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -399,7 +399,6 @@
 
         when(mGradientColors.supportsDarkText()).thenReturn(true);
         when(mColorExtractor.getNeutralColors()).thenReturn(mGradientColors);
-        ConfigurationController configurationController = new ConfigurationControllerImpl(mContext);
 
         when(mLockscreenWallpaperLazy.get()).thenReturn(mLockscreenWallpaper);
         when(mBiometricUnlockControllerLazy.get()).thenReturn(mBiometricUnlockController);
@@ -438,6 +437,11 @@
         when(mUserTracker.getUserHandle()).thenReturn(
                 UserHandle.of(ActivityManager.getCurrentUser()));
 
+        createCentralSurfaces();
+    }
+
+    private void createCentralSurfaces() {
+        ConfigurationController configurationController = new ConfigurationControllerImpl(mContext);
         mCentralSurfaces = new CentralSurfacesImpl(
                 mContext,
                 mNotificationsController,
@@ -1083,6 +1087,27 @@
         verify(mNotificationPanelViewController).setTouchAndAnimationDisabled(true);
     }
 
+    /** Regression test for b/298355063 */
+    @Test
+    public void fingerprintManagerNull_noNPE() {
+        // GIVEN null fingerprint manager
+        mFingerprintManager = null;
+        createCentralSurfaces();
+
+        // GIVEN should animate doze wakeup
+        when(mDozeServiceHost.shouldAnimateWakeup()).thenReturn(true);
+        when(mBiometricUnlockController.getMode()).thenReturn(
+                BiometricUnlockController.MODE_ONLY_WAKE);
+        when(mDozeServiceHost.isPulsing()).thenReturn(false);
+        when(mStatusBarStateController.getDozeAmount()).thenReturn(1f);
+
+        // WHEN waking up from the power button
+        mWakefulnessLifecycle.dispatchStartedWakingUp(PowerManager.WAKE_REASON_POWER_BUTTON);
+        mCentralSurfaces.mWakefulnessObserver.onStartedWakingUp();
+
+        // THEN no NPE when fingerprintManager is null
+    }
+
     /**
      * Configures the appropriate mocks and then calls {@link CentralSurfacesImpl#updateIsKeyguard}
      * to reconfigure the keyguard to reflect the requested showing/occluded states.
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
index 4349d73..3a629e6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
@@ -104,6 +104,21 @@
     }
 
     @Test
+    fun onViewAttachedAndDrawn_startListeningConfigurationControllerCallback() {
+        val view = createViewMock()
+        val argumentCaptor = ArgumentCaptor.forClass(
+                ConfigurationController.ConfigurationListener::class.java)
+        InstrumentationRegistry.getInstrumentation().runOnMainSync {
+            controller = createAndInitController(view)
+        }
+
+        verify(configurationController).addCallback(argumentCaptor.capture())
+        argumentCaptor.value.onDensityOrFontScaleChanged()
+
+        verify(view).onDensityOrFontScaleChanged()
+    }
+
+    @Test
     fun onViewAttachedAndDrawn_moveFromCenterAnimationEnabled_moveFromCenterAnimationInitialized() {
         whenever(featureFlags.isEnabled(Flags.ENABLE_UNFOLD_STATUS_BAR_ANIMATIONS)).thenReturn(true)
         val view = createViewMock()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 0da7360..ba4e8d3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -18,7 +18,6 @@
 
 import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_HIDDEN;
 import static com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EXPANSION_VISIBLE;
-
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
@@ -34,7 +33,6 @@
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-
 import static kotlinx.coroutines.test.TestCoroutineDispatchersKt.StandardTestDispatcher;
 
 import android.service.trust.TrustAgentService;
@@ -73,8 +71,9 @@
 import com.android.systemui.bouncer.ui.BouncerViewDelegate;
 import com.android.systemui.dock.DockManager;
 import com.android.systemui.dreams.DreamOverlayStateController;
-import com.android.systemui.flags.FeatureFlags;
+import com.android.systemui.flags.FakeFeatureFlags;
 import com.android.systemui.flags.Flags;
+import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor;
 import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
 import com.android.systemui.keyguard.domain.interactor.WindowManagerLockscreenVisibilityInteractor;
 import com.android.systemui.navigationbar.NavigationModeController;
@@ -131,7 +130,7 @@
     @Mock private SysUIUnfoldComponent mSysUiUnfoldComponent;
     @Mock private DreamOverlayStateController mDreamOverlayStateController;
     @Mock private LatencyTracker mLatencyTracker;
-    @Mock private FeatureFlags mFeatureFlags;
+    private FakeFeatureFlags mFeatureFlags;
     @Mock private KeyguardSecurityModel mKeyguardSecurityModel;
     @Mock private PrimaryBouncerCallbackInteractor mPrimaryBouncerCallbackInteractor;
     @Mock private PrimaryBouncerInteractor mPrimaryBouncerInteractor;
@@ -171,9 +170,11 @@
                 .thenReturn(mKeyguardMessageAreaController);
         when(mBouncerView.getDelegate()).thenReturn(mBouncerViewDelegate);
         when(mBouncerViewDelegate.getBackCallback()).thenReturn(mBouncerViewDelegateBackCallback);
-        when(mFeatureFlags
-                .isEnabled(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM))
-                .thenReturn(true);
+        mFeatureFlags = new FakeFeatureFlags();
+        mFeatureFlags.set(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM, true);
+        mFeatureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false);
+        mFeatureFlags.set(Flags.UDFPS_NEW_TOUCH_DETECTION, true);
+        mFeatureFlags.set(Flags.KEYGUARD_WM_STATE_REFACTOR, false);
 
         when(mNotificationShadeWindowController.getWindowRootView())
                 .thenReturn(mNotificationShadeWindowView);
@@ -208,7 +209,8 @@
                         mActivityStarter,
                         mock(KeyguardTransitionInteractor.class),
                         StandardTestDispatcher(null, null),
-                        () -> mock(WindowManagerLockscreenVisibilityInteractor.class)) {
+                        () -> mock(WindowManagerLockscreenVisibilityInteractor.class),
+                        () -> mock(KeyguardDismissActionInteractor.class)) {
                     @Override
                     public ViewRootImpl getViewRootImpl() {
                         return mViewRootImpl;
@@ -266,7 +268,6 @@
 
     @Test
     public void onPanelExpansionChanged_neverShowsDuringHintAnimation() {
-        when(mShadeViewController.isUnlockHintRunning()).thenReturn(true);
         mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
         verify(mPrimaryBouncerInteractor, never()).setPanelExpansion(anyFloat());
     }
@@ -711,7 +712,8 @@
                         mActivityStarter,
                         mock(KeyguardTransitionInteractor.class),
                         StandardTestDispatcher(null, null),
-                        () -> mock(WindowManagerLockscreenVisibilityInteractor.class)) {
+                        () -> mock(WindowManagerLockscreenVisibilityInteractor.class),
+                        () -> mock(KeyguardDismissActionInteractor.class)) {
                     @Override
                     public ViewRootImpl getViewRootImpl() {
                         return mViewRootImpl;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
index 34c4ac1..233f407 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
@@ -15,7 +15,6 @@
 package com.android.systemui.statusbar.phone;
 
 import static android.view.Display.DEFAULT_DISPLAY;
-
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
@@ -54,8 +53,8 @@
 import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
 import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource;
 import com.android.systemui.statusbar.notification.domain.interactor.NotificationsInteractor;
-import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider;
 import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor;
+import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider;
 import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
 import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
@@ -72,8 +71,8 @@
 @RunWithLooper()
 public class StatusBarNotificationPresenterTest extends SysuiTestCase {
     private StatusBarNotificationPresenter mStatusBarNotificationPresenter;
-    private final NotificationInterruptStateProvider mNotificationInterruptStateProvider =
-            mock(NotificationInterruptStateProvider.class);
+    private final VisualInterruptionDecisionProvider mVisualInterruptionDecisionProvider =
+            mock(VisualInterruptionDecisionProvider.class);
     private NotificationInterruptSuppressor mInterruptSuppressor;
     private CommandQueue mCommandQueue;
     private FakeMetricsLogger mMetricsLogger;
@@ -125,14 +124,14 @@
                 mock(NotificationMediaManager.class),
                 mock(NotificationGutsManager.class),
                 mInitController,
-                mNotificationInterruptStateProvider,
+                mVisualInterruptionDecisionProvider,
                 mock(NotificationRemoteInputManager.class),
                 mock(NotificationRemoteInputManager.Callback.class),
                 mock(NotificationListContainer.class));
         mInitController.executePostInitTasks();
         ArgumentCaptor<NotificationInterruptSuppressor> suppressorCaptor =
                 ArgumentCaptor.forClass(NotificationInterruptSuppressor.class);
-        verify(mNotificationInterruptStateProvider).addSuppressor(suppressorCaptor.capture());
+        verify(mVisualInterruptionDecisionProvider).addLegacySuppressor(suppressorCaptor.capture());
         mInterruptSuppressor = suppressorCaptor.getValue();
     }
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
index 3af960b..8ef82c9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
@@ -19,8 +19,13 @@
 import android.content.BroadcastReceiver
 import android.content.Context
 import android.content.Intent
+import android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WLAN
+import android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN
 import android.telephony.CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL
 import android.telephony.NetworkRegistrationInfo
+import android.telephony.NetworkRegistrationInfo.DOMAIN_PS
+import android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
+import android.telephony.NetworkRegistrationInfo.REGISTRATION_STATE_HOME
 import android.telephony.ServiceState
 import android.telephony.ServiceState.STATE_IN_SERVICE
 import android.telephony.ServiceState.STATE_OUT_OF_SERVICE
@@ -80,7 +85,6 @@
 import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel
 import com.android.systemui.util.mockito.any
 import com.android.systemui.util.mockito.argumentCaptor
-import com.android.systemui.util.mockito.mock
 import com.android.systemui.util.mockito.whenever
 import com.google.common.truth.Truth.assertThat
 import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -801,11 +805,18 @@
             var latest: Boolean? = null
             val job = underTest.isInService.onEach { latest = it }.launchIn(this)
 
+            val nriInService =
+                NetworkRegistrationInfo.Builder()
+                    .setDomain(DOMAIN_PS)
+                    .setTransportType(TRANSPORT_TYPE_WWAN)
+                    .setRegistrationState(REGISTRATION_STATE_HOME)
+                    .build()
+
             getTelephonyCallbackForType<ServiceStateListener>()
                 .onServiceStateChanged(
                     ServiceState().also {
                         it.voiceRegState = STATE_IN_SERVICE
-                        it.dataRegState = STATE_IN_SERVICE
+                        it.addNetworkRegistrationInfo(nriInService)
                     }
                 )
 
@@ -814,17 +825,23 @@
             getTelephonyCallbackForType<ServiceStateListener>()
                 .onServiceStateChanged(
                     ServiceState().also {
-                        it.dataRegState = STATE_IN_SERVICE
                         it.voiceRegState = STATE_OUT_OF_SERVICE
+                        it.addNetworkRegistrationInfo(nriInService)
                     }
                 )
             assertThat(latest).isTrue()
 
+            val nriNotInService =
+                NetworkRegistrationInfo.Builder()
+                    .setDomain(DOMAIN_PS)
+                    .setTransportType(TRANSPORT_TYPE_WWAN)
+                    .setRegistrationState(REGISTRATION_STATE_DENIED)
+                    .build()
             getTelephonyCallbackForType<ServiceStateListener>()
                 .onServiceStateChanged(
                     ServiceState().also {
                         it.voiceRegState = STATE_OUT_OF_SERVICE
-                        it.dataRegState = STATE_OUT_OF_SERVICE
+                        it.addNetworkRegistrationInfo(nriNotInService)
                     }
                 )
             assertThat(latest).isFalse()
@@ -838,18 +855,17 @@
             var latest: Boolean? = null
             val job = underTest.isInService.onEach { latest = it }.launchIn(this)
 
-            // Mock the service state here so we can make it specifically IWLAN
-            val serviceState: ServiceState = mock()
-            whenever(serviceState.state).thenReturn(STATE_OUT_OF_SERVICE)
-            whenever(serviceState.dataRegistrationState).thenReturn(STATE_IN_SERVICE)
-
-            // See [com.android.settingslib.Utils.isInService] for more info. This is one way to
-            // make the network look like IWLAN
-            val networkRegWlan: NetworkRegistrationInfo = mock()
-            whenever(serviceState.getNetworkRegistrationInfo(any(), any()))
-                .thenReturn(networkRegWlan)
-            whenever(networkRegWlan.registrationState)
-                .thenReturn(NetworkRegistrationInfo.REGISTRATION_STATE_HOME)
+            val iwlanData =
+                NetworkRegistrationInfo.Builder()
+                    .setDomain(DOMAIN_PS)
+                    .setTransportType(TRANSPORT_TYPE_WLAN)
+                    .setRegistrationState(REGISTRATION_STATE_HOME)
+                    .build()
+            val serviceState =
+                ServiceState().also {
+                    it.voiceRegState = STATE_OUT_OF_SERVICE
+                    it.addNetworkRegistrationInfo(iwlanData)
+                }
 
             getTelephonyCallbackForType<ServiceStateListener>().onServiceStateChanged(serviceState)
             assertThat(latest).isFalse()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
index a0d4d13..bbf048d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiViewTest.kt
@@ -22,6 +22,7 @@
 import android.testing.TestableLooper.RunWithLooper
 import android.testing.ViewUtils
 import android.view.View
+import android.view.ViewGroup
 import android.widget.ImageView
 import androidx.test.filters.SmallTest
 import com.android.systemui.R
@@ -138,7 +139,7 @@
         ViewUtils.attachView(view)
         testableLooper.processAllMessages()
 
-        assertThat(view.getIconGroupView().visibility).isEqualTo(View.GONE)
+        assertThat(view.getIconGroupView().visibility).isEqualTo(View.INVISIBLE)
         assertThat(view.getDotView().visibility).isEqualTo(View.VISIBLE)
 
         ViewUtils.detachView(view)
@@ -153,8 +154,36 @@
         ViewUtils.attachView(view)
         testableLooper.processAllMessages()
 
-        assertThat(view.getIconGroupView().visibility).isEqualTo(View.GONE)
-        assertThat(view.getDotView().visibility).isEqualTo(View.GONE)
+        assertThat(view.getIconGroupView().visibility).isEqualTo(View.INVISIBLE)
+        assertThat(view.getDotView().visibility).isEqualTo(View.INVISIBLE)
+
+        ViewUtils.detachView(view)
+    }
+
+    /* Regression test for b/296864006. When STATE_HIDDEN we need to ensure the wifi view width
+     * would not break the StatusIconContainer translation calculation. */
+    @Test
+    fun setVisibleState_hidden_keepWidth() {
+        val view = ModernStatusBarWifiView.constructAndBind(context, SLOT_NAME, viewModel)
+
+        view.setVisibleState(STATE_ICON, /* animate= */ false)
+
+        // get the view width when it's in visible state
+        ViewUtils.attachView(view)
+        val lp = view.layoutParams
+        lp.width = ViewGroup.LayoutParams.WRAP_CONTENT
+        lp.height = ViewGroup.LayoutParams.WRAP_CONTENT
+        view.layoutParams = lp
+        testableLooper.processAllMessages()
+        val currentWidth = view.width
+
+        view.setVisibleState(STATE_HIDDEN, /* animate= */ false)
+        testableLooper.processAllMessages()
+
+        // the view width when STATE_HIDDEN should be at least the width when STATE_ICON. Because
+        // when STATE_HIDDEN the invisible dot view width might be larger than group view width,
+        // then the wifi view width would be enlarged.
+        assertThat(view.width).isAtLeast(currentWidth)
 
         ViewUtils.detachView(view)
     }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
index cdeb592..58d93c9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
@@ -17,12 +17,10 @@
 package com.android.systemui.statusbar.policy;
 
 import static android.os.BatteryManager.EXTRA_PRESENT;
-
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.inOrder;
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.staticMockMarker;
 import static com.android.settingslib.fuelgauge.BatterySaverLogging.SAVER_ENABLED_QS;
-
 import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -91,6 +89,7 @@
                 mBroadcastDispatcher,
                 mDemoModeController,
                 mock(DumpManager.class),
+                mock(BatteryControllerLogger.class),
                 new Handler(),
                 new Handler());
         // Can throw if updateEstimate is called on the main thread
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
index 243f881..e761635 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BluetoothControllerImplTest.java
@@ -46,8 +46,6 @@
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.bluetooth.BluetoothLogger;
 import com.android.systemui.dump.DumpManager;
-import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
 import com.android.systemui.settings.UserTracker;
 import com.android.systemui.statusbar.policy.bluetooth.BluetoothRepository;
 import com.android.systemui.statusbar.policy.bluetooth.FakeBluetoothRepository;
@@ -75,8 +73,6 @@
     private DumpManager mMockDumpManager;
     private BluetoothControllerImpl mBluetoothControllerImpl;
     private BluetoothAdapter mMockAdapter;
-    private final FakeFeatureFlags mFakeFeatureFlags = new FakeFeatureFlags();
-
     private List<CachedBluetoothDevice> mDevices;
 
     @Before
@@ -98,11 +94,9 @@
 
         BluetoothRepository bluetoothRepository =
                 new FakeBluetoothRepository(mMockBluetoothManager);
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
 
         mBluetoothControllerImpl = new BluetoothControllerImpl(
                 mContext,
-                mFakeFeatureFlags,
                 mUserTracker,
                 mMockDumpManager,
                 mock(BluetoothLogger.class),
@@ -111,27 +105,8 @@
                 mMockBluetoothManager,
                 mMockAdapter);
     }
-
     @Test
-    public void testNoConnectionWithDevices_repoFlagOff() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
-        CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
-        when(device.isConnected()).thenReturn(true);
-        when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
-        mDevices.add(device);
-        when(mMockLocalAdapter.getConnectionState())
-                .thenReturn(BluetoothAdapter.STATE_DISCONNECTED);
-
-        mBluetoothControllerImpl.onConnectionStateChanged(null,
-                BluetoothAdapter.STATE_DISCONNECTED);
-        assertTrue(mBluetoothControllerImpl.isBluetoothConnected());
-    }
-
-    @Test
-    public void testNoConnectionWithDevices_repoFlagOn() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+    public void testNoConnectionWithDevices() {
         CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
         when(device.isConnected()).thenReturn(true);
         when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
@@ -147,9 +122,7 @@
     }
 
     @Test
-    public void testOnServiceConnected_updatesConnectionState_repoFlagOff() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
+    public void testOnServiceConnected_updatesConnectionState() {
         when(mMockLocalAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING);
 
         mBluetoothControllerImpl.onServiceConnected();
@@ -159,41 +132,7 @@
     }
 
     @Test
-    public void testOnServiceConnected_updatesConnectionState_repoFlagOn() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
-        when(mMockLocalAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING);
-
-        mBluetoothControllerImpl.onServiceConnected();
-
-        assertTrue(mBluetoothControllerImpl.isBluetoothConnecting());
-        assertFalse(mBluetoothControllerImpl.isBluetoothConnected());
-    }
-
-    @Test
-    public void getConnectedDevices_onlyReturnsConnected_repoFlagOff() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
-        CachedBluetoothDevice device1Disconnected = mock(CachedBluetoothDevice.class);
-        when(device1Disconnected.isConnected()).thenReturn(false);
-        mDevices.add(device1Disconnected);
-
-        CachedBluetoothDevice device2Connected = mock(CachedBluetoothDevice.class);
-        when(device2Connected.isConnected()).thenReturn(true);
-        mDevices.add(device2Connected);
-
-        mBluetoothControllerImpl.onDeviceAdded(device1Disconnected);
-        mBluetoothControllerImpl.onDeviceAdded(device2Connected);
-
-        assertThat(mBluetoothControllerImpl.getConnectedDevices()).hasSize(1);
-        assertThat(mBluetoothControllerImpl.getConnectedDevices().get(0))
-                .isEqualTo(device2Connected);
-    }
-
-    @Test
-    public void getConnectedDevices_onlyReturnsConnected_repoFlagOn() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+    public void getConnectedDevices_onlyReturnsConnected() {
         CachedBluetoothDevice device1Disconnected = mock(CachedBluetoothDevice.class);
         when(device1Disconnected.isConnected()).thenReturn(false);
         mDevices.add(device1Disconnected);
@@ -235,31 +174,7 @@
     }
 
     @Test
-    public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection_repoFlagOff() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, false);
-
-        BluetoothController.Callback callback = mock(BluetoothController.Callback.class);
-        mBluetoothControllerImpl.addCallback(callback);
-
-        assertFalse(mBluetoothControllerImpl.isBluetoothConnected());
-        CachedBluetoothDevice device = mock(CachedBluetoothDevice.class);
-        mDevices.add(device);
-        when(device.isConnected()).thenReturn(true);
-        when(device.getMaxConnectionState()).thenReturn(BluetoothProfile.STATE_CONNECTED);
-        reset(callback);
-        mBluetoothControllerImpl.onAclConnectionStateChanged(device,
-                BluetoothProfile.STATE_CONNECTED);
-
-        mTestableLooper.processAllMessages();
-
-        assertTrue(mBluetoothControllerImpl.isBluetoothConnected());
-        verify(callback, atLeastOnce()).onBluetoothStateChange(anyBoolean());
-    }
-
-    @Test
-    public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection_repoFlagOn() {
-        mFakeFeatureFlags.set(Flags.NEW_BLUETOOTH_REPOSITORY, true);
-
+    public void testOnACLConnectionStateChange_updatesBluetoothStateOnConnection() {
         BluetoothController.Callback callback = mock(BluetoothController.Callback.class);
         mBluetoothControllerImpl.addCallback(callback);
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
index 1ab0582..cfb48a8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputQuickSettingsDisablerTest.kt
@@ -49,7 +49,9 @@
 
         remoteInputQuickSettingsDisabler = RemoteInputQuickSettingsDisabler(
             mContext,
-            commandQueue, Mockito.mock(ConfigurationController::class.java)
+            commandQueue,
+                ResourcesSplitShadeStateController(),
+            Mockito.mock(ConfigurationController::class.java),
         )
         configuration = Configuration(mContext.resources.configuration)
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
index 65cac6e..3152fd1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
@@ -44,6 +44,7 @@
 import android.os.SystemClock;
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
+import android.util.Log;
 import android.view.Gravity;
 import android.view.InputDevice;
 import android.view.MotionEvent;
@@ -98,6 +99,8 @@
     private ConfigurationController mConfigurationController;
     private int mOriginalOrientation;
 
+    private static final String TAG = "VolumeDialogImplTest";
+
     @Mock
     VolumeDialogController mVolumeDialogController;
     @Mock
@@ -674,12 +677,20 @@
 
     @After
     public void teardown() {
+        // Detailed logs to track down timeout issues in b/299491332
+        Log.d(TAG, "teardown: entered");
         setOrientation(mOriginalOrientation);
+        Log.d(TAG, "teardown: after setOrientation");
         mAnimatorTestRule.advanceTimeBy(mLongestHideShowAnimationDuration);
+        Log.d(TAG, "teardown: after advanceTimeBy");
         mTestableLooper.moveTimeForward(mLongestHideShowAnimationDuration);
+        Log.d(TAG, "teardown: after moveTimeForward");
         mTestableLooper.processAllMessages();
+        Log.d(TAG, "teardown: after processAllMessages");
         reset(mPostureController);
+        Log.d(TAG, "teardown: after reset");
         cleanUp(mDialog);
+        Log.d(TAG, "teardown: after cleanUp");
     }
 
     private void cleanUp(VolumeDialogImpl dialog) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
index 1b623a3..7595a54 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
@@ -134,6 +134,7 @@
 import com.android.wm.shell.bubbles.Bubble;
 import com.android.wm.shell.bubbles.BubbleData;
 import com.android.wm.shell.bubbles.BubbleDataRepository;
+import com.android.wm.shell.bubbles.BubbleEducationController;
 import com.android.wm.shell.bubbles.BubbleEntry;
 import com.android.wm.shell.bubbles.BubbleLogger;
 import com.android.wm.shell.bubbles.BubbleOverflow;
@@ -277,6 +278,8 @@
     @Mock
     private BubbleLogger mBubbleLogger;
     @Mock
+    private BubbleEducationController mEducationController;
+    @Mock
     private TaskStackListenerImpl mTaskStackListener;
     @Mock
     private KeyguardStateController mKeyguardStateController;
@@ -369,7 +372,8 @@
 
         mPositioner = new TestableBubblePositioner(mContext, mWindowManager);
         mPositioner.setMaxBubbles(5);
-        mBubbleData = new BubbleData(mContext, mBubbleLogger, mPositioner, syncExecutor);
+        mBubbleData = new BubbleData(mContext, mBubbleLogger, mPositioner, mEducationController,
+                syncExecutor);
 
         when(mUserManager.getProfiles(ActivityManager.getCurrentUser())).thenReturn(
                 Collections.singletonList(mock(UserInfo.class)));
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
index 7c98df6..f2e4528 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt
@@ -51,6 +51,8 @@
     override val authenticationMethod: StateFlow<AuthenticationMethodModel> =
         _authenticationMethod.asStateFlow()
 
+    override val minPatternLength: Int = 4
+
     private var isLockscreenEnabled = true
     private var failedAttemptCount = 0
     private var throttlingEndTimestamp = 0L
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt
similarity index 71%
rename from packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt
rename to packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt
index fd91391..60291ee 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeRearDisplayStateRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeDisplayStateRepository.kt
@@ -17,15 +17,23 @@
 
 package com.android.systemui.biometrics.data.repository
 
+import com.android.systemui.biometrics.shared.model.DisplayRotation
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.asStateFlow
 
-class FakeRearDisplayStateRepository : RearDisplayStateRepository {
+class FakeDisplayStateRepository : DisplayStateRepository {
     private val _isInRearDisplayMode = MutableStateFlow<Boolean>(false)
     override val isInRearDisplayMode: StateFlow<Boolean> = _isInRearDisplayMode.asStateFlow()
 
+    private val _currentRotation = MutableStateFlow<DisplayRotation>(DisplayRotation.ROTATION_0)
+    override val currentRotation: StateFlow<DisplayRotation> = _currentRotation.asStateFlow()
+
     fun setIsInRearDisplayMode(isInRearDisplayMode: Boolean) {
         _isInRearDisplayMode.value = isInRearDisplayMode
     }
+
+    fun setCurrentRotation(currentRotation: DisplayRotation) {
+        _currentRotation.value = currentRotation
+    }
 }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeFingerprintPropertyRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeFingerprintPropertyRepository.kt
index 2362a52..0c5e438 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeFingerprintPropertyRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/biometrics/data/repository/FakeFingerprintPropertyRepository.kt
@@ -20,16 +20,12 @@
 import com.android.systemui.biometrics.shared.model.FingerprintSensorType
 import com.android.systemui.biometrics.shared.model.SensorStrength
 import kotlinx.coroutines.flow.MutableStateFlow
-import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.asStateFlow
 
 class FakeFingerprintPropertyRepository : FingerprintPropertyRepository {
 
-    private val _isInitialized: MutableStateFlow<Boolean> = MutableStateFlow(false)
-    override val isInitialized = _isInitialized.asStateFlow()
-
     private val _sensorId: MutableStateFlow<Int> = MutableStateFlow(-1)
-    override val sensorId: StateFlow<Int> = _sensorId.asStateFlow()
+    override val sensorId = _sensorId.asStateFlow()
 
     private val _strength: MutableStateFlow<SensorStrength> =
         MutableStateFlow(SensorStrength.CONVENIENCE)
@@ -37,12 +33,11 @@
 
     private val _sensorType: MutableStateFlow<FingerprintSensorType> =
         MutableStateFlow(FingerprintSensorType.UNKNOWN)
-    override val sensorType: StateFlow<FingerprintSensorType> = _sensorType.asStateFlow()
+    override val sensorType = _sensorType.asStateFlow()
 
     private val _sensorLocations: MutableStateFlow<Map<String, SensorLocationInternal>> =
         MutableStateFlow(mapOf("" to SensorLocationInternal.DEFAULT))
-    override val sensorLocations: StateFlow<Map<String, SensorLocationInternal>> =
-        _sensorLocations.asStateFlow()
+    override val sensorLocations = _sensorLocations.asStateFlow()
 
     fun setProperties(
         sensorId: Int,
@@ -54,6 +49,5 @@
         _strength.value = strength
         _sensorType.value = sensorType
         _sensorLocations.value = sensorLocations
-        _isInitialized.value = true
     }
 }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
index 0847c85..b45c198 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/data/repository/FakeKeyguardBouncerRepository.kt
@@ -2,11 +2,14 @@
 
 import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants
 import com.android.systemui.bouncer.shared.model.BouncerShowMessageModel
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asSharedFlow
 import kotlinx.coroutines.flow.asStateFlow
 
-/** Fake implementation of [KeyguardRepository] */
+/** Fake implementation of [KeyguardBouncerRepository] */
 class FakeKeyguardBouncerRepository : KeyguardBouncerRepository {
     private val _primaryBouncerShow = MutableStateFlow(false)
     override val primaryBouncerShow = _primaryBouncerShow.asStateFlow()
@@ -26,7 +29,13 @@
     private val _isBackButtonEnabled = MutableStateFlow<Boolean?>(null)
     override val isBackButtonEnabled = _isBackButtonEnabled.asStateFlow()
     private val _keyguardAuthenticated = MutableStateFlow<Boolean?>(null)
-    override val keyguardAuthenticated = _keyguardAuthenticated.asStateFlow()
+    override val keyguardAuthenticatedBiometrics = _keyguardAuthenticated.asStateFlow()
+    private val _keyguardAuthenticatedPrimaryAuth = MutableSharedFlow<Int>()
+    override val keyguardAuthenticatedPrimaryAuth: Flow<Int> =
+        _keyguardAuthenticatedPrimaryAuth.asSharedFlow()
+    private val _userRequestedBouncerWhenAlreadyAuthenticated = MutableSharedFlow<Int>()
+    override val userRequestedBouncerWhenAlreadyAuthenticated: Flow<Int> =
+        _userRequestedBouncerWhenAlreadyAuthenticated.asSharedFlow()
     private val _showMessage = MutableStateFlow<BouncerShowMessageModel?>(null)
     override val showMessage = _showMessage.asStateFlow()
     private val _resourceUpdateRequests = MutableStateFlow(false)
@@ -83,10 +92,18 @@
         _showMessage.value = bouncerShowMessageModel
     }
 
-    override fun setKeyguardAuthenticated(keyguardAuthenticated: Boolean?) {
+    override fun setKeyguardAuthenticatedBiometrics(keyguardAuthenticated: Boolean?) {
         _keyguardAuthenticated.value = keyguardAuthenticated
     }
 
+    override suspend fun setKeyguardAuthenticatedPrimaryAuth(userId: Int) {
+        _keyguardAuthenticatedPrimaryAuth.emit(userId)
+    }
+
+    override suspend fun setUserRequestedBouncerWhenAlreadyAuthenticated(userId: Int) {
+        _userRequestedBouncerWhenAlreadyAuthenticated.emit(userId)
+    }
+
     override fun setIsBackButtonEnabled(isBackButtonEnabled: Boolean) {
         _isBackButtonEnabled.value = isBackButtonEnabled
     }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
index 2ac625d..5cd09d8 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDisplayRepository.kt
@@ -22,11 +22,19 @@
 import org.mockito.Mockito.`when` as whenever
 
 /** Creates a mock display. */
-fun display(type: Int, flags: Int = 0, id: Int = 0): Display {
+fun display(
+    type: Int,
+    flags: Int = 0,
+    id: Int = 0,
+    state: Int? = null,
+): Display {
     return mock {
         whenever(this.displayId).thenReturn(id)
         whenever(this.type).thenReturn(type)
         whenever(this.flags).thenReturn(flags)
+        if (state != null) {
+            whenever(this.state).thenReturn(state)
+        }
     }
 }
 
@@ -35,7 +43,7 @@
     mock<DisplayRepository.PendingDisplay> { whenever(this.id).thenReturn(id) }
 
 /** Fake [DisplayRepository] implementation for testing. */
-class FakeDisplayRepository : DisplayRepository {
+class FakeDisplayRepository() : DisplayRepository {
     private val flow = MutableSharedFlow<Set<Display>>()
     private val pendingDisplayFlow = MutableSharedFlow<DisplayRepository.PendingDisplay?>()
 
@@ -50,4 +58,8 @@
 
     override val pendingDisplay: Flow<DisplayRepository.PendingDisplay?>
         get() = pendingDisplayFlow
+
+    private val _displayChangeEvent = MutableSharedFlow<Int>()
+    override val displayChangeEvent: Flow<Int> = _displayChangeEvent
+    suspend fun emitDisplayChangeEvent(displayId: Int) = _displayChangeEvent.emit(displayId)
 }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
index cc0c943..dae8644 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
@@ -21,7 +21,9 @@
 import com.android.systemui.common.shared.model.Position
 import com.android.systemui.keyguard.shared.model.BiometricUnlockModel
 import com.android.systemui.keyguard.shared.model.BiometricUnlockSource
+import com.android.systemui.keyguard.shared.model.DismissAction
 import com.android.systemui.keyguard.shared.model.DozeTransitionModel
+import com.android.systemui.keyguard.shared.model.KeyguardDone
 import com.android.systemui.keyguard.shared.model.KeyguardRootViewVisibilityState
 import com.android.systemui.keyguard.shared.model.ScreenModel
 import com.android.systemui.keyguard.shared.model.ScreenState
@@ -30,12 +32,18 @@
 import com.android.systemui.keyguard.shared.model.WakefulnessModel
 import com.android.systemui.keyguard.shared.model.WakefulnessState
 import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.StateFlow
 import kotlinx.coroutines.flow.asStateFlow
 
 /** Fake implementation of [KeyguardRepository] */
 class FakeKeyguardRepository : KeyguardRepository {
+    private val _deferKeyguardDone: MutableSharedFlow<KeyguardDone> = MutableSharedFlow()
+    override val keyguardDone: Flow<KeyguardDone> = _deferKeyguardDone
+
+    private val _dismissAction = MutableStateFlow<DismissAction>(DismissAction.None)
+    override val dismissAction: StateFlow<DismissAction> = _dismissAction
 
     private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
     override val animateBottomAreaDozingTransitions: StateFlow<Boolean> =
@@ -175,6 +183,14 @@
         _dozeTimeTick.value = _dozeTimeTick.value + 1
     }
 
+    override fun setDismissAction(dismissAction: DismissAction) {
+        _dismissAction.value = dismissAction
+    }
+
+    override suspend fun setKeyguardDone(timing: KeyguardDone) {
+        _deferKeyguardDone.emit(timing)
+    }
+
     fun dozeTimeTick(millis: Long) {
         _dozeTimeTick.value = millis
     }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
index 817e1db..9d98f94 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeTrustRepository.kt
@@ -17,6 +17,8 @@
 
 package com.android.systemui.keyguard.data.repository
 
+import com.android.keyguard.TrustGrantFlags
+import com.android.systemui.keyguard.shared.model.TrustModel
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.MutableStateFlow
 import kotlinx.coroutines.flow.StateFlow
@@ -35,6 +37,9 @@
     override val isCurrentUserTrustManaged: StateFlow<Boolean>
         get() = _isCurrentUserTrustManaged
 
+    private val _requestDismissKeyguard = MutableStateFlow(TrustModel(false, 0, TrustGrantFlags(0)))
+    override val trustAgentRequestingToDismissKeyguard: Flow<TrustModel> = _requestDismissKeyguard
+
     fun setCurrentUserTrusted(trust: Boolean) {
         _isCurrentUserTrusted.value = trust
     }
@@ -46,4 +51,8 @@
     fun setCurrentUserActiveUnlockAvailable(available: Boolean) {
         _isCurrentUserActiveUnlockAvailable.value = available
     }
+
+    fun setRequestDismissKeyguard(trustModel: TrustModel) {
+        _requestDismissKeyguard.value = trustModel
+    }
 }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt
new file mode 100644
index 0000000..6dd41f4
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.domain.interactor
+
+import android.app.ActivityManager
+import android.content.Context
+import android.os.Handler
+import android.os.UserManager
+import com.android.internal.logging.UiEventLogger
+import com.android.keyguard.KeyguardSecurityModel
+import com.android.keyguard.KeyguardUpdateMonitor
+import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
+import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerCallbackInteractor
+import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
+import com.android.systemui.bouncer.ui.BouncerView
+import com.android.systemui.broadcast.FakeBroadcastDispatcher
+import com.android.systemui.classifier.FalsingCollector
+import com.android.systemui.flags.FakeFeatureFlagsClassic
+import com.android.systemui.flags.Flags
+import com.android.systemui.keyguard.DismissCallbackRegistry
+import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository
+import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.FakeTrustRepository
+import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.power.data.repository.FakePowerRepository
+import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.statusbar.phone.ScreenOffAnimationController
+import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.telephony.data.repository.FakeTelephonyRepository
+import com.android.systemui.telephony.domain.interactor.TelephonyInteractor
+import com.android.systemui.user.data.repository.FakeUserRepository
+import com.android.systemui.user.domain.interactor.GuestUserInteractor
+import com.android.systemui.user.domain.interactor.HeadlessSystemUserMode
+import com.android.systemui.user.domain.interactor.RefreshUsersScheduler
+import com.android.systemui.user.domain.interactor.UserInteractor
+import com.android.systemui.util.time.FakeSystemClock
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.test.TestScope
+import org.mockito.Mockito.mock
+
+/**
+ * Helper to create a new KeyguardDismissInteractor in a way that doesn't require modifying many
+ * tests whenever we add a constructor param.
+ */
+object KeyguardDismissInteractorFactory {
+    @JvmOverloads
+    @JvmStatic
+    fun create(
+        context: Context,
+        testScope: TestScope,
+        broadcastDispatcher: FakeBroadcastDispatcher,
+        dispatcher: CoroutineDispatcher,
+        trustRepository: FakeTrustRepository = FakeTrustRepository(),
+        keyguardRepository: FakeKeyguardRepository = FakeKeyguardRepository(),
+        bouncerRepository: FakeKeyguardBouncerRepository = FakeKeyguardBouncerRepository(),
+        keyguardUpdateMonitor: KeyguardUpdateMonitor = mock(KeyguardUpdateMonitor::class.java),
+        featureFlags: FakeFeatureFlagsClassic =
+            FakeFeatureFlagsClassic().apply {
+                set(Flags.DELAY_BOUNCER, true)
+                set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, true)
+                set(Flags.FULL_SCREEN_USER_SWITCHER, false)
+            },
+        powerRepository: FakePowerRepository = FakePowerRepository(),
+        userRepository: FakeUserRepository = FakeUserRepository(),
+    ): WithDependencies {
+        val primaryBouncerInteractor =
+            PrimaryBouncerInteractor(
+                bouncerRepository,
+                mock(BouncerView::class.java),
+                mock(Handler::class.java),
+                mock(KeyguardStateController::class.java),
+                mock(KeyguardSecurityModel::class.java),
+                mock(PrimaryBouncerCallbackInteractor::class.java),
+                mock(FalsingCollector::class.java),
+                mock(DismissCallbackRegistry::class.java),
+                context,
+                keyguardUpdateMonitor,
+                trustRepository,
+                featureFlags,
+                testScope.backgroundScope,
+            )
+        val alternateBouncerInteractor =
+            AlternateBouncerInteractor(
+                mock(StatusBarStateController::class.java),
+                mock(KeyguardStateController::class.java),
+                bouncerRepository,
+                FakeBiometricSettingsRepository(),
+                FakeSystemClock(),
+                keyguardUpdateMonitor,
+            )
+        val powerInteractor =
+            PowerInteractor(
+                powerRepository,
+                keyguardRepository,
+                mock(FalsingCollector::class.java),
+                mock(ScreenOffAnimationController::class.java),
+                mock(StatusBarStateController::class.java),
+            )
+        val userInteractor =
+            UserInteractor(
+                applicationContext = context,
+                repository = userRepository,
+                mock(ActivityStarter::class.java),
+                keyguardInteractor =
+                    KeyguardInteractorFactory.create(
+                            repository = keyguardRepository,
+                            bouncerRepository = bouncerRepository,
+                            featureFlags = featureFlags,
+                        )
+                        .keyguardInteractor,
+                featureFlags = featureFlags,
+                manager = mock(UserManager::class.java),
+                headlessSystemUserMode = mock(HeadlessSystemUserMode::class.java),
+                applicationScope = testScope.backgroundScope,
+                telephonyInteractor =
+                    TelephonyInteractor(
+                        repository = FakeTelephonyRepository(),
+                    ),
+                broadcastDispatcher = broadcastDispatcher,
+                keyguardUpdateMonitor = keyguardUpdateMonitor,
+                backgroundDispatcher = dispatcher,
+                activityManager = mock(ActivityManager::class.java),
+                refreshUsersScheduler = mock(RefreshUsersScheduler::class.java),
+                guestUserInteractor = mock(GuestUserInteractor::class.java),
+                uiEventLogger = mock(UiEventLogger::class.java),
+            )
+        return WithDependencies(
+            trustRepository = trustRepository,
+            keyguardRepository = keyguardRepository,
+            bouncerRepository = bouncerRepository,
+            keyguardUpdateMonitor = keyguardUpdateMonitor,
+            powerRepository = powerRepository,
+            userRepository = userRepository,
+            interactor =
+                KeyguardDismissInteractor(
+                    trustRepository,
+                    keyguardRepository,
+                    primaryBouncerInteractor,
+                    alternateBouncerInteractor,
+                    powerInteractor,
+                    userInteractor,
+                ),
+        )
+    }
+
+    data class WithDependencies(
+        val trustRepository: FakeTrustRepository,
+        val keyguardRepository: FakeKeyguardRepository,
+        val bouncerRepository: FakeKeyguardBouncerRepository,
+        val keyguardUpdateMonitor: KeyguardUpdateMonitor,
+        val powerRepository: FakePowerRepository,
+        val userRepository: FakeUserRepository,
+        val interactor: KeyguardDismissInteractor,
+    )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
index 2865710..aa8dbe1 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/pipeline/data/repository/FakeTileSpecRepository.kt
@@ -16,7 +16,6 @@
 
 package com.android.systemui.qs.pipeline.data.repository
 
-import android.util.Log
 import com.android.systemui.qs.pipeline.data.repository.TileSpecRepository.Companion.POSITION_AT_END
 import com.android.systemui.qs.pipeline.shared.TileSpec
 import kotlinx.coroutines.flow.Flow
@@ -28,7 +27,7 @@
     private val tilesPerUser = mutableMapOf<Int, MutableStateFlow<List<TileSpec>>>()
 
     override fun tilesSpecs(userId: Int): Flow<List<TileSpec>> {
-        return getFlow(userId).asStateFlow().also { Log.d("Fabian", "Retrieving flow for $userId") }
+        return getFlow(userId).asStateFlow()
     }
 
     override suspend fun addTile(userId: Int, tile: TileSpec, position: Int) {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt
index 9dea0a0..2d79e0f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt
@@ -127,6 +127,7 @@
         )
     }
 
+    @JvmOverloads
     fun sceneInteractor(
         repository: SceneContainerRepository = fakeSceneContainerRepository()
     ): SceneInteractor {
diff --git a/services/accessibility/Android.bp b/services/accessibility/Android.bp
index bf8a9af..e9bb763 100644
--- a/services/accessibility/Android.bp
+++ b/services/accessibility/Android.bp
@@ -27,4 +27,20 @@
         "services.core",
         "androidx.annotation_annotation",
     ],
+    static_libs: [
+        "com_android_server_accessibility_flags_lib",
+    ],
+}
+
+aconfig_declarations {
+    name: "com_android_server_accessibility_flags",
+    package: "com.android.server.accessibility",
+    srcs: [
+        "accessibility.aconfig",
+    ],
+}
+
+java_aconfig_library {
+    name: "com_android_server_accessibility_flags_lib",
+    aconfig_declarations: "com_android_server_accessibility_flags",
 }
diff --git a/services/accessibility/accessibility.aconfig b/services/accessibility/accessibility.aconfig
new file mode 100644
index 0000000..3709f47
--- /dev/null
+++ b/services/accessibility/accessibility.aconfig
@@ -0,0 +1,22 @@
+package: "com.android.server.accessibility"
+
+flag {
+    name: "proxy_use_apps_on_virtual_device_listener"
+    namespace: "accessibility"
+    description: "Fixes race condition described in b/286587811"
+    bug: "286587811"
+}
+
+flag {
+    name: "enable_magnification_multiple_finger_multiple_tap_gesture"
+    namespace: "accessibility"
+    description: "Whether to enable multi-finger-multi-tap gesture for magnification"
+    bug: "257274411"
+}
+
+flag {
+    name: "enable_magnification_joystick"
+    namespace: "accessibility"
+    description: "Whether to enable joystick controls for magnification"
+    bug: "297211257"
+}
\ No newline at end of file
diff --git a/services/accessibility/java/com/android/server/accessibility/ProxyManager.java b/services/accessibility/java/com/android/server/accessibility/ProxyManager.java
index 119f575..ed77476 100644
--- a/services/accessibility/java/com/android/server/accessibility/ProxyManager.java
+++ b/services/accessibility/java/com/android/server/accessibility/ProxyManager.java
@@ -33,6 +33,7 @@
 import android.os.IBinder;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
+import android.util.ArraySet;
 import android.util.IntArray;
 import android.util.Slog;
 import android.util.SparseArray;
@@ -42,6 +43,7 @@
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.IAccessibilityManagerClient;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.IntPair;
 import com.android.server.LocalServices;
 import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
@@ -96,6 +98,9 @@
 
     private final SystemSupport mSystemSupport;
 
+    private VirtualDeviceManagerInternal.AppsOnVirtualDeviceListener
+            mAppsOnVirtualDeviceListener;
+
     /**
      * Callbacks into AccessibilityManagerService.
      */
@@ -174,6 +179,16 @@
 
         synchronized (mLock) {
             mProxyA11yServiceConnections.put(displayId, connection);
+            if (Flags.proxyUseAppsOnVirtualDeviceListener()) {
+                if (mAppsOnVirtualDeviceListener == null) {
+                    mAppsOnVirtualDeviceListener = allRunningUids ->
+                            notifyProxyOfRunningAppsChange(allRunningUids);
+                    final VirtualDeviceManagerInternal localVdm = getLocalVdm();
+                    if (localVdm != null) {
+                        localVdm.registerAppsOnVirtualDeviceListener(mAppsOnVirtualDeviceListener);
+                    }
+                }
+            }
         }
 
         // If the client dies, make sure to remove the connection.
@@ -276,11 +291,21 @@
                         }
                     }
                 });
-        // If there isn't an existing proxy for the device id, reset clients. Resetting
+        // If there isn't an existing proxy for the device id, reset app clients. Resetting
         // will usually happen, since in most cases there will only be one proxy for a
         // device.
         if (!isProxyedDeviceId(deviceId)) {
             synchronized (mLock) {
+                if (Flags.proxyUseAppsOnVirtualDeviceListener()) {
+                    if (mProxyA11yServiceConnections.size() == 0) {
+                        final VirtualDeviceManagerInternal localVdm = getLocalVdm();
+                        if (localVdm != null && mAppsOnVirtualDeviceListener != null) {
+                            localVdm.unregisterAppsOnVirtualDeviceListener(
+                                    mAppsOnVirtualDeviceListener);
+                            mAppsOnVirtualDeviceListener = null;
+                        }
+                    }
+                }
                 mSystemSupport.removeDeviceIdLocked(deviceId);
                 mLastStates.delete(deviceId);
             }
@@ -307,7 +332,7 @@
      * Returns {@code true} if {@code deviceId} is being proxy-ed.
      */
     public boolean isProxyedDeviceId(int deviceId) {
-        if (deviceId == DEVICE_ID_DEFAULT && deviceId == DEVICE_ID_INVALID) {
+        if (deviceId == DEVICE_ID_DEFAULT || deviceId == DEVICE_ID_INVALID) {
             return false;
         }
         boolean isTrackingDeviceId;
@@ -566,7 +591,7 @@
      * This is similar to onUserStateChangeLocked and onClientChangeLocked, but does not require an
      * A11yUserState and only checks proxy-relevant settings.
      */
-    public void onProxyChanged(int deviceId) {
+    private void onProxyChanged(int deviceId, boolean forceUpdate) {
         if (DEBUG) {
             Slog.v(LOG_TAG, "onProxyChanged called for deviceId: " + deviceId);
         }
@@ -584,7 +609,7 @@
             // Calls A11yManager#setRelevantEventTypes (test these)
             updateRelevantEventTypesLocked(deviceId);
             // Calls A11yManager#setState
-            scheduleUpdateProxyClientsIfNeededLocked(deviceId);
+            scheduleUpdateProxyClientsIfNeededLocked(deviceId, forceUpdate);
             //Calls A11yManager#notifyServicesStateChanged(timeout)
             scheduleNotifyProxyClientsOfServicesStateChangeLocked(deviceId);
             // Calls A11yManager#setFocusAppearance
@@ -594,16 +619,25 @@
     }
 
     /**
+     * Handles proxy changes, but does not force an update of app clients.
+     */
+    public void onProxyChanged(int deviceId) {
+        onProxyChanged(deviceId, false);
+    }
+
+    /**
      * Updates the states of the app AccessibilityManagers.
      */
-    private void scheduleUpdateProxyClientsIfNeededLocked(int deviceId) {
+    private void scheduleUpdateProxyClientsIfNeededLocked(int deviceId, boolean forceUpdate) {
         final int proxyState = getStateLocked(deviceId);
         if (DEBUG) {
             Slog.v(LOG_TAG, "State for device id " + deviceId + " is " + proxyState);
             Slog.v(LOG_TAG, "Last state for device id " + deviceId + " is "
                     + getLastSentStateLocked(deviceId));
+            Slog.v(LOG_TAG, "force update: " + forceUpdate);
         }
-        if ((getLastSentStateLocked(deviceId)) != proxyState) {
+        if ((getLastSentStateLocked(deviceId)) != proxyState
+                || (Flags.proxyUseAppsOnVirtualDeviceListener() && forceUpdate)) {
             setLastStateLocked(deviceId, proxyState);
             mMainHandler.post(() -> {
                 synchronized (mLock) {
@@ -792,7 +826,7 @@
     }
 
     /**
-     * Updates the device ids of IAccessibilityManagerClients if needed.
+     * Updates the device ids of IAccessibilityManagerClients if needed after a proxy change.
      */
     private void updateDeviceIdsIfNeededLocked(int deviceId,
             @NonNull RemoteCallbackList<IAccessibilityManagerClient> clients) {
@@ -804,13 +838,66 @@
         for (int i = 0; i < clients.getRegisteredCallbackCount(); i++) {
             final AccessibilityManagerService.Client client =
                     ((AccessibilityManagerService.Client) clients.getRegisteredCallbackCookie(i));
-            if (deviceId != DEVICE_ID_DEFAULT && deviceId != DEVICE_ID_INVALID
-                    && localVdm.getDeviceIdsForUid(client.mUid).contains(deviceId)) {
-                if (DEBUG) {
-                    Slog.v(LOG_TAG, "Packages moved to device id " + deviceId + " are "
-                            + Arrays.toString(client.mPackageNames));
+            if (Flags.proxyUseAppsOnVirtualDeviceListener()) {
+                if (deviceId == DEVICE_ID_DEFAULT || deviceId == DEVICE_ID_INVALID) {
+                    continue;
                 }
-                client.mDeviceId = deviceId;
+                boolean uidBelongsToDevice =
+                        localVdm.getDeviceIdsForUid(client.mUid).contains(deviceId);
+                if (client.mDeviceId != deviceId && uidBelongsToDevice) {
+                    if (DEBUG) {
+                        Slog.v(LOG_TAG, "Packages moved to device id " + deviceId + " are "
+                                + Arrays.toString(client.mPackageNames));
+                    }
+                    client.mDeviceId = deviceId;
+                } else if (client.mDeviceId == deviceId && !uidBelongsToDevice) {
+                    client.mDeviceId = DEVICE_ID_DEFAULT;
+                    if (DEBUG) {
+                        Slog.v(LOG_TAG, "Packages moved to the default device from device id "
+                                + deviceId + " are " + Arrays.toString(client.mPackageNames));
+                    }
+                }
+            } else {
+                if (deviceId != DEVICE_ID_DEFAULT && deviceId != DEVICE_ID_INVALID
+                    && localVdm.getDeviceIdsForUid(client.mUid).contains(deviceId)) {
+                    if (DEBUG) {
+                        Slog.v(LOG_TAG, "Packages moved to device id " + deviceId + " are "
+                                + Arrays.toString(client.mPackageNames));
+                    }
+                    client.mDeviceId = deviceId;
+                }
+            }
+        }
+    }
+
+    @VisibleForTesting
+    void notifyProxyOfRunningAppsChange(Set<Integer> allRunningUids) {
+        if (DEBUG) {
+            Slog.v(LOG_TAG, "notifyProxyOfRunningAppsChange: " + allRunningUids);
+        }
+        synchronized (mLock) {
+            if (mProxyA11yServiceConnections.size() == 0) {
+                return;
+            }
+            final VirtualDeviceManagerInternal localVdm = getLocalVdm();
+            if  (localVdm == null) {
+                return;
+            }
+            final ArraySet<Integer> deviceIdsToUpdate = new ArraySet<>();
+            for (int i = 0; i < mProxyA11yServiceConnections.size(); i++) {
+                final ProxyAccessibilityServiceConnection proxy =
+                        mProxyA11yServiceConnections.valueAt(i);
+                if (proxy != null) {
+                    final int proxyDeviceId = proxy.getDeviceId();
+                    for (Integer uid : allRunningUids) {
+                        if (localVdm.getDeviceIdsForUid(uid).contains(proxyDeviceId)) {
+                            deviceIdsToUpdate.add(proxyDeviceId);
+                        }
+                    }
+                }
+            }
+            for (Integer proxyDeviceId : deviceIdsToUpdate) {
+                onProxyChanged(proxyDeviceId, true);
             }
         }
     }
@@ -843,6 +930,11 @@
         return mLocalVdm;
     }
 
+    @VisibleForTesting
+    void setLocalVirtualDeviceManager(VirtualDeviceManagerInternal localVdm) {
+        mLocalVdm = localVdm;
+    }
+
     /**
      * Prints information belonging to each display that is controlled by an
      * AccessibilityDisplayProxy.
diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
index ebb127d..2ca84f8 100644
--- a/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
+++ b/services/accessibility/java/com/android/server/accessibility/magnification/FullScreenMagnificationGestureHandler.java
@@ -217,7 +217,8 @@
                         }
 
                         if (!activated) {
-                            clearAndTransitionToStateDetecting();
+                            // cancel the magnification shortcut
+                            mDetectingState.setShortcutTriggered(false);
                         }
                     }
 
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
index 39756df..cae047f 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
@@ -18,7 +18,6 @@
 
 import static android.service.autofill.AutofillFieldClassificationService.EXTRA_SCORES;
 import static android.service.autofill.AutofillService.EXTRA_RESULT;
-
 import static com.android.server.autofill.AutofillManagerService.RECEIVER_BUNDLE_EXTRA_SESSIONS;
 
 import android.os.Bundle;
@@ -155,20 +154,31 @@
             pw.println("");
         }
 
+        Method[] flagMethods = {};
+
         try {
-            Method[] flagMethods = Flags.class.getMethods();
-            // For some reason, unreferenced flags do not show up here
-            // Maybe compiler optomized them out of bytecode?
-            for (Method method : flagMethods) {
-                if (Modifier.isPublic(method.getModifiers())) {
-                    pw.println(method.getName() + ": " + method.invoke(null));
-                }
-            }
-        } catch (Exception ex) {
-            pw.println(ex);
+            flagMethods = Flags.class.getDeclaredMethods();
+        } catch (SecurityException ex) {
+            ex.printStackTrace(pw);
             return -1;
         }
 
+        // For some reason, unreferenced flags do not show up here
+        // Maybe compiler optomized them out of bytecode?
+        for (Method method : flagMethods) {
+            if (!Modifier.isPublic(method.getModifiers())) {
+                continue;
+            }
+            try {
+                pw.print(method.getName() + ": ");
+                pw.print(method.invoke(null));
+            } catch (Exception ex) {
+                ex.printStackTrace(pw);
+            } finally {
+                pw.println("");
+            }
+        }
+
         return 0;
     }
 
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index 70382f1..4488d86 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -443,7 +443,8 @@
                     }
                     final BatchUpdates batchUpdates = pair.second;
                     // First apply the updates...
-                    final RemoteViews templateUpdates = batchUpdates.getUpdates();
+                    final RemoteViews templateUpdates =
+                            Helper.sanitizeRemoteView(batchUpdates.getUpdates());
                     if (templateUpdates != null) {
                         if (sDebug) Slog.d(TAG, "Applying template updates for batch update #" + i);
                         templateUpdates.reapply(context, customSubtitleView);
diff --git a/services/backup/java/com/android/server/backup/TransportManager.java b/services/backup/java/com/android/server/backup/TransportManager.java
index 05327dc..a792db0 100644
--- a/services/backup/java/com/android/server/backup/TransportManager.java
+++ b/services/backup/java/com/android/server/backup/TransportManager.java
@@ -738,6 +738,9 @@
         try {
             String transportName = transport.name();
             String transportDirName = transport.transportDirName();
+            if (transportName == null || transportDirName == null) {
+                return BackupManager.ERROR_TRANSPORT_INVALID;
+            }
             registerTransport(transportComponent, transport);
             // If registerTransport() hasn't thrown...
             Slog.d(TAG, addUserIdToLogMessage(mUserId, "Transport " + transportString
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
index 1ce7d96..ba45339 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceManagerService.java
@@ -74,6 +74,7 @@
 import android.companion.IOnMessageReceivedListener;
 import android.companion.IOnTransportsChangedListener;
 import android.companion.ISystemDataTransferCallback;
+import android.companion.datatransfer.PermissionSyncRequest;
 import android.companion.utils.FeatureUtils;
 import android.content.ComponentName;
 import android.content.Context;
@@ -873,6 +874,29 @@
         }
 
         @Override
+        public void enablePermissionsSync(int associationId) {
+            getAssociationWithCallerChecks(associationId);
+            mSystemDataTransferProcessor.enablePermissionsSync(associationId);
+        }
+
+        @Override
+        public void disablePermissionsSync(int associationId) {
+            getAssociationWithCallerChecks(associationId);
+            mSystemDataTransferProcessor.disablePermissionsSync(associationId);
+        }
+
+        @Override
+        public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+            // TODO: temporary fix, will remove soon
+            AssociationInfo association = mAssociationStore.getAssociationById(associationId);
+            if (association == null) {
+                return null;
+            }
+            getAssociationWithCallerChecks(associationId);
+            return mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+        }
+
+        @Override
         @EnforcePermission(MANAGE_COMPANION_DEVICES)
         public void enableSecureTransport(boolean enabled) {
             enableSecureTransport_enforcePermission();
@@ -1041,7 +1065,7 @@
                 String[] args, ShellCallback callback, ResultReceiver resultReceiver)
                 throws RemoteException {
             new CompanionDeviceShellCommand(CompanionDeviceManagerService.this, mAssociationStore,
-                    mDevicePresenceMonitor, mTransportManager, mSystemDataTransferRequestStore,
+                    mDevicePresenceMonitor, mTransportManager, mSystemDataTransferProcessor,
                     mAssociationRequestsProcessor)
                     .exec(this, in, out, err, args, callback, resultReceiver);
         }
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
index d368b86..1f62613 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
@@ -27,7 +27,7 @@
 import android.os.ShellCommand;
 import android.util.proto.ProtoOutputStream;
 
-import com.android.server.companion.datatransfer.SystemDataTransferRequestStore;
+import com.android.server.companion.datatransfer.SystemDataTransferProcessor;
 import com.android.server.companion.datatransfer.contextsync.BitmapUtils;
 import com.android.server.companion.datatransfer.contextsync.CrossDeviceSyncController;
 import com.android.server.companion.presence.CompanionDevicePresenceMonitor;
@@ -44,20 +44,20 @@
     private final CompanionDevicePresenceMonitor mDevicePresenceMonitor;
     private final CompanionTransportManager mTransportManager;
 
-    private final SystemDataTransferRequestStore mSystemDataTransferRequestStore;
+    private final SystemDataTransferProcessor mSystemDataTransferProcessor;
     private final AssociationRequestsProcessor mAssociationRequestsProcessor;
 
     CompanionDeviceShellCommand(CompanionDeviceManagerService service,
             AssociationStoreImpl associationStore,
             CompanionDevicePresenceMonitor devicePresenceMonitor,
             CompanionTransportManager transportManager,
-            SystemDataTransferRequestStore systemDataTransferRequestStore,
+            SystemDataTransferProcessor systemDataTransferProcessor,
             AssociationRequestsProcessor associationRequestsProcessor) {
         mService = service;
         mAssociationStore = associationStore;
         mDevicePresenceMonitor = devicePresenceMonitor;
         mTransportManager = transportManager;
-        mSystemDataTransferRequestStore = systemDataTransferRequestStore;
+        mSystemDataTransferProcessor = systemDataTransferProcessor;
         mAssociationRequestsProcessor = associationRequestsProcessor;
     }
 
@@ -261,16 +261,47 @@
                     break;
                 }
 
-                case "allow-permission-sync": {
-                    int userId = getNextIntArgRequired();
+                case "get-perm-sync-state": {
                     associationId = getNextIntArgRequired();
-                    boolean enabled = getNextBooleanArgRequired();
-                    PermissionSyncRequest request = new PermissionSyncRequest(associationId);
-                    request.setUserId(userId);
-                    request.setUserConsented(enabled);
-                    mSystemDataTransferRequestStore.writeRequest(userId, request);
+                    PermissionSyncRequest request =
+                            mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.println((request == null ? "null" : request.isUserConsented()));
+                    break;
                 }
-                break;
+
+                case "remove-perm-sync-state": {
+                    associationId = getNextIntArgRequired();
+                    PermissionSyncRequest request =
+                            mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.print((request == null ? "null" : request.isUserConsented()));
+                    mSystemDataTransferProcessor.removePermissionSyncRequest(associationId);
+                    request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    // should print " -> null"
+                    out.println(" -> " + (request == null ? "null" : request.isUserConsented()));
+                    break;
+                }
+
+                case "enable-perm-sync": {
+                    associationId = getNextIntArgRequired();
+                    PermissionSyncRequest request =
+                            mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.print((request == null ? "null" : request.isUserConsented()));
+                    mSystemDataTransferProcessor.enablePermissionsSync(associationId);
+                    request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.println(" -> " + request.isUserConsented()); // should print " -> true"
+                    break;
+                }
+
+                case "disable-perm-sync": {
+                    associationId = getNextIntArgRequired();
+                    PermissionSyncRequest request =
+                            mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.print((request == null ? "null" : request.isUserConsented()));
+                    mSystemDataTransferProcessor.disablePermissionsSync(associationId);
+                    request = mSystemDataTransferProcessor.getPermissionSyncRequest(associationId);
+                    out.println(" -> " + request.isUserConsented()); // should print " -> false"
+                    break;
+                }
 
                 default:
                     return handleDefaultCommands(cmd);
@@ -346,5 +377,14 @@
 
         pw.println("  create-emulated-transport <ASSOCIATION_ID>");
         pw.println("      Create an EmulatedTransport for testing purposes only");
+
+        pw.println("  enable-perm-sync <ASSOCIATION_ID>");
+        pw.println("      Enable perm sync for the association.");
+        pw.println("  disable-perm-sync <ASSOCIATION_ID>");
+        pw.println("      Disable perm sync for the association.");
+        pw.println("  get-perm-sync-state <ASSOCIATION_ID>");
+        pw.println("      Get perm sync state for the association.");
+        pw.println("  remove-perm-sync-state <ASSOCIATION_ID>");
+        pw.println("      Remove perm sync state for the association.");
     }
 }
diff --git a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
index 13f41ed..e5c847a 100644
--- a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
+++ b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferProcessor.java
@@ -139,6 +139,13 @@
             @UserIdInt int userId, int associationId) {
         if (PackageUtils.isPackageAllowlisted(mContext, mPackageManager, packageName)) {
             Slog.i(LOG_TAG, "User consent Intent should be skipped. Returning null.");
+            // Auto enable perm sync for the allowlisted packages, but don't override user decision
+            PermissionSyncRequest request = getPermissionSyncRequest(associationId);
+            if (request == null) {
+                PermissionSyncRequest newRequest = new PermissionSyncRequest(associationId);
+                newRequest.setUserConsented(true);
+                mSystemDataTransferRequestStore.writeRequest(userId, newRequest);
+            }
             return null;
         }
 
@@ -185,29 +192,17 @@
         final AssociationInfo association = resolveAssociation(packageName, userId, associationId);
 
         // Check if the request has been consented by the user.
-        if (PackageUtils.isPackageAllowlisted(mContext, mPackageManager, packageName)) {
-            Slog.i(LOG_TAG, "Skip user consent check due to the same OEM package.");
-        } else {
-            List<SystemDataTransferRequest> storedRequests =
-                    mSystemDataTransferRequestStore.readRequestsByAssociationId(userId,
-                            associationId);
-            boolean hasConsented = false;
-            for (SystemDataTransferRequest storedRequest : storedRequests) {
-                if (storedRequest instanceof PermissionSyncRequest
-                        && storedRequest.isUserConsented()) {
-                    hasConsented = true;
-                    break;
-                }
+        PermissionSyncRequest request = getPermissionSyncRequest(associationId);
+        if (request == null || !request.isUserConsented()) {
+            String message =
+                    "User " + userId + " hasn't consented permission sync for associationId ["
+                            + associationId + ".";
+            Slog.e(LOG_TAG, message);
+            try {
+                callback.onError(message);
+            } catch (RemoteException ignored) {
             }
-            if (!hasConsented) {
-                String message = "User " + userId + " hasn't consented permission sync.";
-                Slog.e(LOG_TAG, message);
-                try {
-                    callback.onError(message);
-                } catch (RemoteException ignored) {
-                }
-                return;
-            }
+            return;
         }
 
         // Start permission sync
@@ -225,6 +220,71 @@
         }
     }
 
+    /**
+     * Enable perm sync for the association
+     */
+    public void enablePermissionsSync(int associationId) {
+        final long callingIdentityToken = Binder.clearCallingIdentity();
+        try {
+            int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+            PermissionSyncRequest request = new PermissionSyncRequest(associationId);
+            request.setUserConsented(true);
+            mSystemDataTransferRequestStore.writeRequest(userId, request);
+        } finally {
+            Binder.restoreCallingIdentity(callingIdentityToken);
+        }
+    }
+
+    /**
+     * Disable perm sync for the association
+     */
+    public void disablePermissionsSync(int associationId) {
+        final long callingIdentityToken = Binder.clearCallingIdentity();
+        try {
+            int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+            PermissionSyncRequest request = new PermissionSyncRequest(associationId);
+            request.setUserConsented(false);
+            mSystemDataTransferRequestStore.writeRequest(userId, request);
+        } finally {
+            Binder.restoreCallingIdentity(callingIdentityToken);
+        }
+    }
+
+    /**
+     * Get perm sync request for the association.
+     */
+    @Nullable
+    public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
+        final long callingIdentityToken = Binder.clearCallingIdentity();
+        try {
+            int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+            List<SystemDataTransferRequest> requests =
+                    mSystemDataTransferRequestStore.readRequestsByAssociationId(userId,
+                            associationId);
+            for (SystemDataTransferRequest request : requests) {
+                if (request instanceof PermissionSyncRequest) {
+                    return (PermissionSyncRequest) request;
+                }
+            }
+            return null;
+        } finally {
+            Binder.restoreCallingIdentity(callingIdentityToken);
+        }
+    }
+
+    /**
+     * Remove perm sync request for the association.
+     */
+    public void removePermissionSyncRequest(int associationId) {
+        final long callingIdentityToken = Binder.clearCallingIdentity();
+        try {
+            int userId = mAssociationStore.getAssociationById(associationId).getUserId();
+            mSystemDataTransferRequestStore.removeRequestsByAssociationId(userId, associationId);
+        } finally {
+            Binder.restoreCallingIdentity(callingIdentityToken);
+        }
+    }
+
     private void onReceivePermissionRestore(byte[] message) {
         Slog.i(LOG_TAG, "Applying permissions.");
         // Start applying permissions
diff --git a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
index 720cefa..9f489e8 100644
--- a/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
+++ b/services/companion/java/com/android/server/companion/datatransfer/SystemDataTransferRequestStore.java
@@ -104,7 +104,7 @@
     }
 
     @NonNull
-    List<SystemDataTransferRequest> readRequestsByAssociationId(@UserIdInt int userId,
+    public List<SystemDataTransferRequest> readRequestsByAssociationId(@UserIdInt int userId,
             int associationId) {
         List<SystemDataTransferRequest> cachedRequests;
         synchronized (mLock) {
diff --git a/services/companion/java/com/android/server/companion/virtual/GenericWindowPolicyController.java b/services/companion/java/com/android/server/companion/virtual/GenericWindowPolicyController.java
index b07a0bb..102c262 100644
--- a/services/companion/java/com/android/server/companion/virtual/GenericWindowPolicyController.java
+++ b/services/companion/java/com/android/server/companion/virtual/GenericWindowPolicyController.java
@@ -47,7 +47,6 @@
 
 import java.util.Set;
 
-
 /**
  * A controller to control the policies of the windows that can be displayed on the virtual display.
  */
@@ -106,12 +105,14 @@
     public static final long ALLOW_SECURE_ACTIVITY_DISPLAY_ON_REMOTE_DEVICE = 201712607L;
     @NonNull
     private final ArraySet<UserHandle> mAllowedUsers;
-    private final boolean mActivityLaunchAllowedByDefault;
+    @GuardedBy("mGenericWindowPolicyControllerLock")
+    private boolean mActivityLaunchAllowedByDefault;
     @NonNull
-    private final ArraySet<ComponentName> mActivityPolicyExceptions;
+    @GuardedBy("mGenericWindowPolicyControllerLock")
+    private final Set<ComponentName> mActivityPolicyExemptions;
     private final boolean mCrossTaskNavigationAllowedByDefault;
     @NonNull
-    private final ArraySet<ComponentName> mCrossTaskNavigationExceptions;
+    private final ArraySet<ComponentName> mCrossTaskNavigationExemptions;
     private final Object mGenericWindowPolicyControllerLock = new Object();
     @Nullable private final ActivityBlockedCallback mActivityBlockedCallback;
     private int mDisplayId = Display.INVALID_DISPLAY;
@@ -142,11 +143,11 @@
      * @param allowedUsers The set of users that are allowed to stream in this display.
      * @param activityLaunchAllowedByDefault Whether activities are default allowed to be launched
      *   or blocked.
-     * @param activityPolicyExceptions The set of activities explicitly exempt from the default
+     * @param activityPolicyExemptions The set of activities explicitly exempt from the default
      *   activity policy.
      * @param crossTaskNavigationAllowedByDefault Whether cross task navigations are allowed by
      *   default or not.
-     * @param crossTaskNavigationExceptions The set of components explicitly exempt from the default
+     * @param crossTaskNavigationExemptions The set of components explicitly exempt from the default
      *   navigation policy.
      * @param activityListener Activity listener to listen for activity changes.
      * @param activityBlockedCallback Callback that is called when an activity is blocked from
@@ -157,12 +158,14 @@
      *   passed in filters.
      * @param showTasksInHostDeviceRecents whether to show activities in recents on the host device.
      */
-    public GenericWindowPolicyController(int windowFlags, int systemWindowFlags,
+    public GenericWindowPolicyController(
+            int windowFlags,
+            int systemWindowFlags,
             @NonNull ArraySet<UserHandle> allowedUsers,
             boolean activityLaunchAllowedByDefault,
-            @NonNull Set<ComponentName> activityPolicyExceptions,
+            @NonNull Set<ComponentName> activityPolicyExemptions,
             boolean crossTaskNavigationAllowedByDefault,
-            @NonNull Set<ComponentName> crossTaskNavigationExceptions,
+            @NonNull Set<ComponentName> crossTaskNavigationExemptions,
             @Nullable ActivityListener activityListener,
             @Nullable PipBlockedCallback pipBlockedCallback,
             @Nullable ActivityBlockedCallback activityBlockedCallback,
@@ -173,9 +176,9 @@
         super();
         mAllowedUsers = allowedUsers;
         mActivityLaunchAllowedByDefault = activityLaunchAllowedByDefault;
-        mActivityPolicyExceptions = new ArraySet<>(activityPolicyExceptions);
+        mActivityPolicyExemptions = activityPolicyExemptions;
         mCrossTaskNavigationAllowedByDefault = crossTaskNavigationAllowedByDefault;
-        mCrossTaskNavigationExceptions = new ArraySet<>(crossTaskNavigationExceptions);
+        mCrossTaskNavigationExemptions = new ArraySet<>(crossTaskNavigationExemptions);
         mActivityBlockedCallback = activityBlockedCallback;
         setInterestedWindowFlags(windowFlags, systemWindowFlags);
         mActivityListener = activityListener;
@@ -202,6 +205,24 @@
         }
     }
 
+    void setActivityLaunchDefaultAllowed(boolean activityLaunchDefaultAllowed) {
+        synchronized (mGenericWindowPolicyControllerLock) {
+            mActivityLaunchAllowedByDefault = activityLaunchDefaultAllowed;
+        }
+    }
+
+    void addActivityPolicyExemption(@NonNull ComponentName componentName) {
+        synchronized (mGenericWindowPolicyControllerLock) {
+            mActivityPolicyExemptions.add(componentName);
+        }
+    }
+
+    void removeActivityPolicyExemption(@NonNull ComponentName componentName) {
+        synchronized (mGenericWindowPolicyControllerLock) {
+            mActivityPolicyExemptions.remove(componentName);
+        }
+    }
+
     /** Register a listener for running applications changes. */
     public void registerRunningAppsChangedListener(@NonNull RunningAppsChangedListener listener) {
         synchronized (mGenericWindowPolicyControllerLock) {
@@ -265,14 +286,17 @@
                     + mDisplayCategories);
             return false;
         }
-        if (!isAllowedByPolicy(mActivityLaunchAllowedByDefault, mActivityPolicyExceptions,
-                activityComponent)) {
-            Slog.d(TAG, "Virtual device launch disallowed by policy: " + activityComponent);
-            return false;
+        synchronized (mGenericWindowPolicyControllerLock) {
+            if (!isAllowedByPolicy(mActivityLaunchAllowedByDefault, mActivityPolicyExemptions,
+                    activityComponent)) {
+                Slog.d(TAG, "Virtual device launch disallowed by policy: "
+                        + activityComponent);
+                return false;
+            }
         }
         if (isNewTask && launchingFromDisplayId != DEFAULT_DISPLAY
                 && !isAllowedByPolicy(mCrossTaskNavigationAllowedByDefault,
-                        mCrossTaskNavigationExceptions, activityComponent)) {
+                        mCrossTaskNavigationExemptions, activityComponent)) {
             Slog.d(TAG, "Virtual device cross task navigation disallowed by policy: "
                     + activityComponent);
             return false;
@@ -378,11 +402,11 @@
                     && mDisplayCategories.contains(activityInfo.requiredDisplayCategory);
     }
 
-    private boolean isAllowedByPolicy(boolean allowedByDefault, ArraySet<ComponentName> exceptions,
-            ComponentName component) {
-        // Either allowed and the exceptions do not contain the component,
-        // or disallowed and the exceptions contain the component.
-        return allowedByDefault != exceptions.contains(component);
+    private static boolean isAllowedByPolicy(boolean allowedByDefault,
+            Set<ComponentName> exemptions, ComponentName component) {
+        // Either allowed and the exemptions do not contain the component,
+        // or disallowed and the exemptions contain the component.
+        return allowedByDefault != exemptions.contains(component);
     }
 
     @VisibleForTesting
diff --git a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
index 8f765e4..3b13410 100644
--- a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
+++ b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
@@ -22,6 +22,7 @@
 import static android.companion.virtual.VirtualDeviceParams.ACTIVITY_POLICY_DEFAULT_ALLOWED;
 import static android.companion.virtual.VirtualDeviceParams.DEVICE_POLICY_DEFAULT;
 import static android.companion.virtual.VirtualDeviceParams.NAVIGATION_POLICY_DEFAULT_ALLOWED;
+import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_ACTIVITY;
 import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_RECENTS;
 import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
 import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
@@ -93,7 +94,6 @@
 import android.view.WindowManager;
 import android.widget.Toast;
 
-
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.BlockedAppStreamingActivity;
@@ -174,11 +174,15 @@
     @NonNull
     private final VirtualDevice mPublicVirtualDeviceObject;
 
+    @GuardedBy("mVirtualDeviceLock")
+    @NonNull
+    private final Set<ComponentName> mActivityPolicyExemptions;
+
     private ActivityListener createListenerAdapter() {
         return new ActivityListener() {
 
             @Override
-            public void onTopActivityChanged(int displayId, ComponentName topActivity) {
+            public void onTopActivityChanged(int displayId, @NonNull ComponentName topActivity) {
                 try {
                     mActivityListener.onTopActivityChanged(displayId, topActivity,
                             UserHandle.USER_NULL);
@@ -188,7 +192,7 @@
             }
 
             @Override
-            public void onTopActivityChanged(int displayId, ComponentName topActivity,
+            public void onTopActivityChanged(int displayId, @NonNull ComponentName topActivity,
                     @UserIdInt int userId) {
                 try {
                     mActivityListener.onTopActivityChanged(displayId, topActivity, userId);
@@ -295,6 +299,18 @@
 
         mPublicVirtualDeviceObject = new VirtualDevice(
                 this, getDeviceId(), getPersistentDeviceId(), mParams.getName());
+
+        if (Flags.dynamicPolicy()) {
+            mActivityPolicyExemptions = new ArraySet<>(
+                    mParams.getDevicePolicy(POLICY_TYPE_ACTIVITY) == DEVICE_POLICY_DEFAULT
+                            ? mParams.getBlockedActivities()
+                            : mParams.getAllowedActivities());
+        } else {
+            mActivityPolicyExemptions =
+                    mParams.getDefaultActivityPolicy() == ACTIVITY_POLICY_DEFAULT_ALLOWED
+                            ? mParams.getBlockedActivities()
+                            : mParams.getAllowedActivities();
+        }
     }
 
     @VisibleForTesting
@@ -414,6 +430,34 @@
         }
     }
 
+    @Override // Binder call
+    @EnforcePermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+    public void addActivityPolicyExemption(@NonNull ComponentName componentName) {
+        super.addActivityPolicyExemption_enforcePermission();
+        synchronized (mVirtualDeviceLock) {
+            if (mActivityPolicyExemptions.add(componentName)) {
+                for (int i = 0; i < mVirtualDisplays.size(); i++) {
+                    mVirtualDisplays.valueAt(i).getWindowPolicyController()
+                            .addActivityPolicyExemption(componentName);
+                }
+            }
+        }
+    }
+
+    @Override // Binder call
+    @EnforcePermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+    public void removeActivityPolicyExemption(@NonNull ComponentName componentName) {
+        super.removeActivityPolicyExemption_enforcePermission();
+        synchronized (mVirtualDeviceLock) {
+            if (mActivityPolicyExemptions.remove(componentName)) {
+                for (int i = 0; i < mVirtualDisplays.size(); i++) {
+                    mVirtualDisplays.valueAt(i).getWindowPolicyController()
+                            .removeActivityPolicyExemption(componentName);
+                }
+            }
+        }
+    }
+
     private void sendPendingIntent(int displayId, PendingIntent pendingIntent)
             throws PendingIntent.CanceledException {
         final ActivityOptions options = ActivityOptions.makeBasic().setLaunchDisplayId(displayId);
@@ -543,6 +587,16 @@
                     }
                 }
                 break;
+            case POLICY_TYPE_ACTIVITY:
+                synchronized (mVirtualDeviceLock) {
+                    mDevicePolicies.put(policyType, devicePolicy);
+                    for (int i = 0; i < mVirtualDisplays.size(); i++) {
+                        mVirtualDisplays.valueAt(i).getWindowPolicyController()
+                                .setActivityLaunchDefaultAllowed(
+                                        devicePolicy == DEVICE_POLICY_DEFAULT);
+                    }
+                }
+                break;
             default:
                 throw new IllegalArgumentException("Device policy " + policyType
                         + " cannot be changed at runtime. ");
@@ -840,24 +894,26 @@
         mSensorController.dump(fout);
     }
 
-    private GenericWindowPolicyController createWindowPolicyController(
+    @GuardedBy("mVirtualDeviceLock")
+    private GenericWindowPolicyController createWindowPolicyControllerLocked(
             @NonNull Set<String> displayCategories) {
         final boolean activityLaunchAllowedByDefault =
-                mParams.getDefaultActivityPolicy() == ACTIVITY_POLICY_DEFAULT_ALLOWED;
+                Flags.dynamicPolicy()
+                        ? getDevicePolicy(POLICY_TYPE_ACTIVITY) == DEVICE_POLICY_DEFAULT
+                        : mParams.getDefaultActivityPolicy() == ACTIVITY_POLICY_DEFAULT_ALLOWED;
         final boolean crossTaskNavigationAllowedByDefault =
                 mParams.getDefaultNavigationPolicy() == NAVIGATION_POLICY_DEFAULT_ALLOWED;
         final boolean showTasksInHostDeviceRecents =
-                mParams.getDevicePolicy(POLICY_TYPE_RECENTS) == DEVICE_POLICY_DEFAULT;
+                getDevicePolicy(POLICY_TYPE_RECENTS) == DEVICE_POLICY_DEFAULT;
 
         final GenericWindowPolicyController gwpc = new GenericWindowPolicyController(
                 FLAG_SECURE,
                 SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS,
                 getAllowedUserHandles(),
                 activityLaunchAllowedByDefault,
-                /*activityPolicyExceptions=*/activityLaunchAllowedByDefault
-                        ? mParams.getBlockedActivities() : mParams.getAllowedActivities(),
+                mActivityPolicyExemptions,
                 crossTaskNavigationAllowedByDefault,
-                /*crossTaskNavigationExceptions=*/crossTaskNavigationAllowedByDefault
+                /*crossTaskNavigationExemptions=*/crossTaskNavigationAllowedByDefault
                         ? mParams.getBlockedCrossTaskNavigations()
                         : mParams.getAllowedCrossTaskNavigations(),
                 createListenerAdapter(),
@@ -873,8 +929,10 @@
 
     int createVirtualDisplay(@NonNull VirtualDisplayConfig virtualDisplayConfig,
             @NonNull IVirtualDisplayCallback callback, String packageName) {
-        GenericWindowPolicyController gwpc = createWindowPolicyController(
-                virtualDisplayConfig.getDisplayCategories());
+        GenericWindowPolicyController gwpc;
+        synchronized (mVirtualDeviceLock) {
+            gwpc = createWindowPolicyControllerLocked(virtualDisplayConfig.getDisplayCategories());
+        }
         DisplayManagerInternal displayManager = LocalServices.getService(
                 DisplayManagerInternal.class);
         int displayId;
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 7329f1a..d9c2694 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -180,7 +180,6 @@
         "android.hardware.rebootescrow-V1-java",
         "android.hardware.power.stats-V2-java",
         "android.hidl.manager-V1.2-java",
-        "com.android.server.security.flags-aconfig-java",
         "cbor-java",
         "display_flags_lib",
         "icu4j_calendar_astronomer",
@@ -193,8 +192,8 @@
         "apache-commons-math",
         "power_optimization_flags_lib",
         "notification_flags_lib",
-        "pm_flags_lib",
         "camera_platform_flags_core_java_lib",
+        "biometrics_flags_lib",
     ],
     javac_shard_size: 50,
     javacflags: [
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 0d265a0..b5911f6 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -9543,6 +9543,14 @@
             }
         } else {
             worker.start();
+            if (process != null && process.mPid == MY_PID && "crash".equals(eventType)) {
+                // We're actually crashing, let's wait for up to 2 seconds before killing ourselves,
+                // so the data could be persisted into the dropbox.
+                try {
+                    worker.join(2000);
+                } catch (InterruptedException ignored) {
+                }
+            }
         }
     }
 
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index d3176ee4..a451f36 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -159,7 +159,6 @@
 import com.android.internal.annotations.CompositeRWLock;
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.LocalServices;
 import com.android.server.ServiceThread;
 import com.android.server.am.PlatformCompatCache.CachedCompatChangeId;
 import com.android.server.wm.ActivityServiceConnectionsHolder;
@@ -317,11 +316,6 @@
     static final long USE_SHORT_FGS_USAGE_INTERACTION_TIME = 183972877L;
 
     /**
-     * For some direct access we need to power manager.
-     */
-    PowerManagerInternal mLocalPowerManager;
-
-    /**
      * Service for optimizing resource usage from background apps.
      */
     CachedAppOptimizer mCachedAppOptimizer;
@@ -431,7 +425,6 @@
         mProcLock = service.mProcLock;
         mActiveUids = activeUids;
 
-        mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class);
         mConstants = mService.mConstants;
         mCachedAppOptimizer = new CachedAppOptimizer(mService);
         mCacheOomRanker = new CacheOomRanker(service);
@@ -1480,8 +1473,8 @@
         becameIdle.clear();
 
         // Update from any uid changes.
-        if (mLocalPowerManager != null) {
-            mLocalPowerManager.startUidChanges();
+        if (mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.startUidChanges();
         }
         for (int i = activeUids.size() - 1; i >= 0; i--) {
             final UidRecord uidRec = activeUids.valueAt(i);
@@ -1575,8 +1568,8 @@
             }
             mService.mInternal.deletePendingTopUid(uidRec.getUid(), nowElapsed);
         }
-        if (mLocalPowerManager != null) {
-            mLocalPowerManager.finishUidChanges();
+        if (mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.finishUidChanges();
         }
 
         int size = becameIdle.size();
@@ -2823,9 +2816,7 @@
                 }
             }
 
-            if (schedGroup < SCHED_GROUP_TOP_APP
-                    && cr.hasFlag(Context.BIND_SCHEDULE_LIKE_TOP_APP)
-                    && clientIsSystem) {
+            if (cr.hasFlag(Context.BIND_SCHEDULE_LIKE_TOP_APP) && clientIsSystem) {
                 schedGroup = SCHED_GROUP_TOP_APP;
                 state.setScheduleLikeTopApp(true);
             }
@@ -3615,8 +3606,8 @@
         final long nowElapsed = SystemClock.elapsedRealtime();
         final long maxBgTime = nowElapsed - mConstants.BACKGROUND_SETTLE_TIME;
         long nextTime = 0;
-        if (mLocalPowerManager != null) {
-            mLocalPowerManager.startUidChanges();
+        if (mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.startUidChanges();
         }
         for (int i = N - 1; i >= 0; i--) {
             final UidRecord uidRec = mActiveUids.valueAt(i);
@@ -3636,8 +3627,8 @@
                 }
             }
         }
-        if (mLocalPowerManager != null) {
-            mLocalPowerManager.finishUidChanges();
+        if (mService.mLocalPowerManager != null) {
+            mService.mLocalPowerManager.finishUidChanges();
         }
         // Also check if there are any apps in cached and background restricted mode,
         // if so, kill it if it's been there long enough, or kick off a msg to check
diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
index b79ba7ba..6d2fc0d 100644
--- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
+++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
@@ -115,28 +115,47 @@
     };
 
     // All the aconfig flags under the listed DeviceConfig scopes will be synced to native level.
+    // The list is sorted.
     @VisibleForTesting
     static final String[] sDeviceConfigAconfigScopes = new String[] {
-        "biometrics_framework",
-        "core_experiments_team_internal",
-        "camera_platform",
-        "power",
-        "vibrator",
-        "haptics",
-        "text",
+        "android_core_networking",
+        "angle",
         "arc_next",
-        "test_suites",
-        "hardware_backed_security_mainline",
-        "threadnetwork",
-        "media_solutions",
-        "responsible_apis",
-        "rust",
-        "pixel_biometrics",
+        "bluetooth",
+        "biometrics_framework",
+        "biometrics_integration",
+        "camera_platform",
+        "car_framework",
         "car_perception",
         "car_security",
         "car_telemetry",
-        "car_framework",
-        "android-nfc",
+        "codec_fwk",
+        "companion",
+        "context_hub",
+        "core_experiments_team_internal",
+        "haptics",
+        "hardware_backed_security_mainline",
+        "media_audio",
+        "media_solutions",
+        "nfc",
+        "pixel_system_sw_touch",
+        "pixel_watch",
+        "platform_security",
+        "power",
+        "preload_safety",
+        "responsible_apis",
+        "rust",
+        "system_performance",
+        "test_suites",
+        "text",
+        "threadnetwork",
+        "tv_system_ui",
+        "vibrator",
+        "wear_frameworks",
+        "wear_system_health",
+        "wear_systems",
+        "window_surfaces",
+        "windowing_frontend"
     };
 
     private final String[] mGlobalSettings;
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 2770833..de4ad20 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -2212,6 +2212,7 @@
                     final IRemoteCallback callback = new IRemoteCallback.Stub() {
                         @Override
                         public void sendResult(Bundle data) throws RemoteException {
+                            asyncTraceEnd("onUserSwitching-" + name, newUserId);
                             synchronized (mLock) {
                                 long delayForObserver = SystemClock.elapsedRealtime()
                                         - dispatchStartedTimeForObserver;
@@ -2229,8 +2230,6 @@
                                             + " ms after dispatchUserSwitch.");
                                 }
 
-                                TimingsTraceAndSlog t2 = new TimingsTraceAndSlog(TAG);
-                                t2.traceBegin("onUserSwitchingReply-" + name);
                                 curWaitingUserSwitchCallbacks.remove(name);
                                 // Continue switching if all callbacks have been notified and
                                 // user switching session is still valid
@@ -2239,13 +2238,11 @@
                                         == mCurWaitingUserSwitchCallbacks)) {
                                     sendContinueUserSwitchLU(uss, oldUserId, newUserId);
                                 }
-                                t2.traceEnd();
                             }
                         }
                     };
-                    t.traceBegin("onUserSwitching-" + name);
+                    asyncTraceBegin("onUserSwitching-" + name, newUserId);
                     mUserSwitchObservers.getBroadcastItem(i).onUserSwitching(newUserId, callback);
-                    t.traceEnd();
                 } catch (RemoteException e) {
                     // Ignore
                 }
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index c05a1f6..9cfac9a 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -539,6 +539,62 @@
             }
         }
     }
+
+    // check playback or record activity after 6 seconds for UIDs
+    private static final int CHECK_CLIENT_STATE_DELAY_MS = 6000;
+
+    /*package */
+    void postCheckCommunicationRouteClientState(int uid, boolean wasActive, int delay) {
+        CommunicationRouteClient client = getCommunicationRouteClientForUid(uid);
+        if (client != null) {
+            sendMsgForCheckClientState(MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE,
+                                        SENDMSG_REPLACE,
+                                        uid,
+                                        wasActive ? 1 : 0,
+                                        client,
+                                        delay);
+        }
+    }
+
+    @GuardedBy("mDeviceStateLock")
+    void onCheckCommunicationRouteClientState(int uid, boolean wasActive) {
+        CommunicationRouteClient client = getCommunicationRouteClientForUid(uid);
+        if (client == null) {
+            return;
+        }
+        updateCommunicationRouteClientState(client, wasActive);
+    }
+
+    @GuardedBy("mDeviceStateLock")
+    /*package*/ void updateCommunicationRouteClientState(
+                            CommunicationRouteClient client, boolean wasActive) {
+        boolean wasBtScoRequested = isBluetoothScoRequested();
+        client.setPlaybackActive(mAudioService.isPlaybackActiveForUid(client.getUid()));
+        client.setRecordingActive(mAudioService.isRecordingActiveForUid(client.getUid()));
+        if (wasActive != client.isActive()) {
+            postUpdateCommunicationRouteClient(
+                    wasBtScoRequested, "updateCommunicationRouteClientState");
+        }
+    }
+
+    @GuardedBy("mDeviceStateLock")
+    /*package*/ void setForceCommunicationClientStateAndDelayedCheck(
+                            CommunicationRouteClient client,
+                            boolean forcePlaybackActive,
+                            boolean forceRecordingActive) {
+        if (client == null) {
+            return;
+        }
+        if (forcePlaybackActive) {
+            client.setPlaybackActive(true);
+        }
+        if (forceRecordingActive) {
+            client.setRecordingActive(true);
+        }
+        postCheckCommunicationRouteClientState(
+                client.getUid(), client.isActive(), CHECK_CLIENT_STATE_DELAY_MS);
+    }
+
     /* package */ static List<AudioDeviceInfo> getAvailableCommunicationDevices() {
         ArrayList<AudioDeviceInfo> commDevices = new ArrayList<>();
         AudioDeviceInfo[] allDevices =
@@ -1899,6 +1955,12 @@
                 case MSG_PERSIST_AUDIO_DEVICE_SETTINGS:
                     onPersistAudioDeviceSettings();
                     break;
+
+                case MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE: {
+                    synchronized (mDeviceStateLock) {
+                        onCheckCommunicationRouteClientState(msg.arg1, msg.arg2 == 1);
+                    }
+                } break;
                 default:
                     Log.wtf(TAG, "Invalid message " + msg.what);
             }
@@ -1980,6 +2042,8 @@
 
     private static final int MSG_L_RECEIVED_BT_EVENT = 55;
 
+    private static final int MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE = 56;
+
     private static boolean isMessageHandledUnderWakelock(int msgId) {
         switch(msgId) {
             case MSG_L_SET_WIRED_DEVICE_CONNECTION_STATE:
@@ -2093,6 +2157,23 @@
         }
     }
 
+    private void removeMsgForCheckClientState(int uid) {
+        CommunicationRouteClient crc = getCommunicationRouteClientForUid(uid);
+        if (crc != null) {
+            mBrokerHandler.removeEqualMessages(MSG_CHECK_COMMUNICATION_ROUTE_CLIENT_STATE, crc);
+        }
+    }
+
+    private void sendMsgForCheckClientState(int msg, int existingMsgPolicy,
+                                            int arg1, int arg2, Object obj, int delay) {
+        if ((existingMsgPolicy == SENDMSG_REPLACE) && (obj != null)) {
+            mBrokerHandler.removeEqualMessages(msg, obj);
+        }
+
+        long time = SystemClock.uptimeMillis() + delay;
+        mBrokerHandler.sendMessageAtTime(mBrokerHandler.obtainMessage(msg, arg1, arg2, obj), time);
+    }
+
     /** List of messages for which music is muted while processing is pending */
     private static final Set<Integer> MESSAGES_MUTE_MUSIC;
     static {
@@ -2365,6 +2446,7 @@
                 if (unregister) {
                     cl.unregisterDeathRecipient();
                 }
+                removeMsgForCheckClientState(cl.getUid());
                 mCommunicationRouteClients.remove(cl);
                 return cl;
             }
@@ -2381,6 +2463,13 @@
                 new CommunicationRouteClient(cb, uid, device, isPrivileged);
         if (client.registerDeathRecipient()) {
             mCommunicationRouteClients.add(0, client);
+            if (!client.isActive()) {
+                // initialize the inactive client's state as active and check it after 6 seconds
+                setForceCommunicationClientStateAndDelayedCheck(
+                        client,
+                        !mAudioService.isPlaybackActiveForUid(client.getUid()),
+                        !mAudioService.isRecordingActiveForUid(client.getUid()));
+            }
             return client;
         }
         return null;
@@ -2437,16 +2526,16 @@
             List<AudioRecordingConfiguration> recordConfigs) {
         synchronized (mSetModeLock) {
             synchronized (mDeviceStateLock) {
-                final boolean wasBtScoRequested = isBluetoothScoRequested();
-                boolean updateCommunicationRoute = false;
                 for (CommunicationRouteClient crc : mCommunicationRouteClients) {
                     boolean wasActive = crc.isActive();
+                    boolean updateClientState = false;
                     if (playbackConfigs != null) {
                         crc.setPlaybackActive(false);
                         for (AudioPlaybackConfiguration config : playbackConfigs) {
                             if (config.getClientUid() == crc.getUid()
                                     && config.isActive()) {
                                 crc.setPlaybackActive(true);
+                                updateClientState = true;
                                 break;
                             }
                         }
@@ -2457,18 +2546,23 @@
                             if (config.getClientUid() == crc.getUid()
                                     && !config.isClientSilenced()) {
                                 crc.setRecordingActive(true);
+                                updateClientState = true;
                                 break;
                             }
                         }
                     }
-                    if (wasActive != crc.isActive()) {
-                        updateCommunicationRoute = true;
+                    if (updateClientState) {
+                        removeMsgForCheckClientState(crc.getUid());
+                        updateCommunicationRouteClientState(crc, wasActive);
+                    } else {
+                        if (wasActive) {
+                            setForceCommunicationClientStateAndDelayedCheck(
+                                    crc,
+                                    playbackConfigs != null /* forcePlaybackActive */,
+                                    recordConfigs != null /* forceRecordingActive */);
+                        }
                     }
                 }
-                if (updateCommunicationRoute) {
-                    postUpdateCommunicationRouteClient(
-                            wasBtScoRequested, "updateCommunicationRouteClientsActivity");
-                }
             }
         }
     }
diff --git a/services/core/java/com/android/server/biometrics/Android.bp b/services/core/java/com/android/server/biometrics/Android.bp
new file mode 100644
index 0000000..6cbe4ad
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/Android.bp
@@ -0,0 +1,12 @@
+aconfig_declarations {
+    name: "biometrics_flags",
+    package: "com.android.server.biometrics",
+    srcs: [
+        "biometrics.aconfig",
+    ],
+}
+
+java_aconfig_library {
+    name: "biometrics_flags_lib",
+    aconfig_declarations: "biometrics_flags",
+}
diff --git a/services/core/java/com/android/server/biometrics/AuthSession.java b/services/core/java/com/android/server/biometrics/AuthSession.java
index 2ae3118..b9ccbfb 100644
--- a/services/core/java/com/android/server/biometrics/AuthSession.java
+++ b/services/core/java/com/android/server/biometrics/AuthSession.java
@@ -275,7 +275,8 @@
             }
             sensor.goToStateWaitingForCookie(requireConfirmation, mToken, mOperationId,
                     mUserId, mSensorReceiver, mOpPackageName, mRequestId, cookie,
-                    mPromptInfo.isAllowBackgroundAuthentication());
+                    mPromptInfo.isAllowBackgroundAuthentication(),
+                    mPromptInfo.isForLegacyFingerprintManager());
         }
     }
 
@@ -747,7 +748,7 @@
                 Slog.v(TAG, "Confirmed! Modality: " + statsModality()
                         + ", User: " + mUserId
                         + ", IsCrypto: " + isCrypto()
-                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
+                        + ", Client: " + getStatsClient()
                         + ", RequireConfirmation: " + mPreAuthInfo.confirmationRequested
                         + ", State: " + FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED
                         + ", Latency: " + latency
@@ -758,7 +759,7 @@
                     mOperationContext,
                     statsModality(),
                     BiometricsProtoEnums.ACTION_UNKNOWN,
-                    BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+                    getStatsClient(),
                     mDebugEnabled,
                     latency,
                     FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__CONFIRMED,
@@ -784,7 +785,7 @@
                         + ", User: " + mUserId
                         + ", IsCrypto: " + isCrypto()
                         + ", Action: " + BiometricsProtoEnums.ACTION_AUTHENTICATE
-                        + ", Client: " + BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT
+                        + ", Client: " + getStatsClient()
                         + ", Reason: " + reason
                         + ", Error: " + error
                         + ", Latency: " + latency
@@ -796,7 +797,7 @@
                         mOperationContext,
                         statsModality(),
                         BiometricsProtoEnums.ACTION_AUTHENTICATE,
-                        BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+                        getStatsClient(),
                         mDebugEnabled,
                         latency,
                         error,
@@ -998,6 +999,12 @@
         }
     }
 
+    private int getStatsClient() {
+        return mPromptInfo.isForLegacyFingerprintManager()
+                ? BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER
+                : BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT;
+    }
+
     @Override
     public String toString() {
         return "State: " + mState
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStats.java b/services/core/java/com/android/server/biometrics/AuthenticationStats.java
index 707240b..3c1cc00 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationStats.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStats.java
@@ -16,12 +16,16 @@
 
 package com.android.server.biometrics;
 
+import android.util.Slog;
+
 /**
  * Utility class for on-device biometric authentication data, including total authentication,
  * rejections, and the number of sent enrollment notifications.
  */
 public class AuthenticationStats {
 
+    private static final String TAG = "AuthenticationStats";
+
     private static final float FRR_NOT_ENOUGH_ATTEMPTS = -1.0f;
 
     private final int mUserId;
@@ -88,6 +92,7 @@
     public void resetData() {
         mTotalAttempts = 0;
         mRejectedAttempts = 0;
+        Slog.d(TAG, "Reset Counters.");
     }
 
     /** Update enrollment notification counter after sending a notification. */
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java b/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java
new file mode 100644
index 0000000..832d73f
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStatsBroadcastReceiver.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.biometrics;
+
+import android.annotation.NonNull;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.hardware.biometrics.BiometricAuthenticator;
+import android.os.UserHandle;
+import android.util.Slog;
+
+import com.android.server.biometrics.sensors.BiometricNotificationImpl;
+
+import java.util.function.Consumer;
+
+/**
+ * Receives broadcast to initialize AuthenticationStatsCollector.
+ */
+public class AuthenticationStatsBroadcastReceiver extends BroadcastReceiver {
+
+    private static final String TAG = "AuthenticationStatsBroadcastReceiver";
+
+    @NonNull
+    private final Consumer<AuthenticationStatsCollector> mCollectorConsumer;
+    @BiometricAuthenticator.Modality
+    private final int mModality;
+
+    public AuthenticationStatsBroadcastReceiver(@NonNull Context context,
+            @BiometricAuthenticator.Modality int modality,
+            @NonNull Consumer<AuthenticationStatsCollector> callback) {
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
+        context.registerReceiver(this, intentFilter);
+
+        mCollectorConsumer = callback;
+        mModality = modality;
+    }
+
+    @Override
+    public void onReceive(@NonNull Context context, @NonNull Intent intent) {
+        final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
+
+        if (userId != UserHandle.USER_NULL
+                && Intent.ACTION_USER_UNLOCKED.equals(intent.getAction())) {
+            Slog.d(TAG, "Received: " + intent.getAction());
+
+            mCollectorConsumer.accept(
+                    new AuthenticationStatsCollector(context, mModality,
+                            new BiometricNotificationImpl()));
+
+            context.unregisterReceiver(this);
+        }
+    }
+}
diff --git a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
index fdf607d..6edbfb7 100644
--- a/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
+++ b/services/core/java/com/android/server/biometrics/AuthenticationStatsCollector.java
@@ -53,15 +53,15 @@
     static final int MAXIMUM_ENROLLMENT_NOTIFICATIONS = 1;
 
     @NonNull private final Context mContext;
+    @NonNull private final PackageManager mPackageManager;
+    @NonNull private final FaceManager mFaceManager;
+    @NonNull private final FingerprintManager mFingerprintManager;
 
     private final float mThreshold;
     private final int mModality;
-    private boolean mPersisterInitialized = false;
 
     @NonNull private final Map<Integer, AuthenticationStats> mUserAuthenticationStatsMap;
-
-    // TODO(b/295582896): Find a way to make this NonNull
-    @Nullable private AuthenticationStatsPersister mAuthenticationStatsPersister;
+    @NonNull private AuthenticationStatsPersister mAuthenticationStatsPersister;
     @NonNull private BiometricNotification mBiometricNotification;
 
     private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@@ -86,28 +86,36 @@
         mModality = modality;
         mBiometricNotification = biometricNotification;
 
+        mPackageManager = context.getPackageManager();
+        mFaceManager = mContext.getSystemService(FaceManager.class);
+        mFingerprintManager = mContext.getSystemService(FingerprintManager.class);
+
+        mAuthenticationStatsPersister = new AuthenticationStatsPersister(mContext);
+
+        initializeUserAuthenticationStatsMap();
+        mAuthenticationStatsPersister.persistFrrThreshold(mThreshold);
+
         IntentFilter intentFilter = new IntentFilter();
         intentFilter.addAction(Intent.ACTION_USER_REMOVED);
         context.registerReceiver(mBroadcastReceiver, intentFilter);
     }
 
     private void initializeUserAuthenticationStatsMap() {
-        try {
-            mAuthenticationStatsPersister = new AuthenticationStatsPersister(mContext);
-            for (AuthenticationStats stats :
-                    mAuthenticationStatsPersister.getAllFrrStats(mModality)) {
-                mUserAuthenticationStatsMap.put(stats.getUserId(), stats);
-            }
-            mAuthenticationStatsPersister.persistFrrThreshold(mThreshold);
-
-            mPersisterInitialized = true;
-        } catch (IllegalStateException e) {
-            Slog.w(TAG, "Failed to initialize AuthenticationStatsPersister.", e);
+        for (AuthenticationStats stats :
+                mAuthenticationStatsPersister.getAllFrrStats(mModality)) {
+            mUserAuthenticationStatsMap.put(stats.getUserId(), stats);
         }
     }
 
     /** Update total authentication and rejected attempts. */
     public void authenticate(int userId, boolean authenticated) {
+
+        // Don't collect data for single-modality devices or user has both biometrics enrolled.
+        if (isSingleModalityDevice()
+                || (hasEnrolledFace(userId) && hasEnrolledFingerprint(userId))) {
+            return;
+        }
+
         // SharedPreference is not ready when starting system server, initialize
         // mUserAuthenticationStatsMap in authentication to ensure SharedPreference
         // is ready for application use.
@@ -129,9 +137,7 @@
 
         sendNotificationIfNeeded(userId);
 
-        if (mPersisterInitialized) {
-            persistDataIfNeeded(userId);
-        }
+        persistDataIfNeeded(userId);
     }
 
     /** Check if a notification should be sent after a calculation cycle. */
@@ -150,25 +156,9 @@
 
         authenticationStats.resetData();
 
-        final PackageManager packageManager = mContext.getPackageManager();
+        final boolean hasEnrolledFace = hasEnrolledFace(userId);
+        final boolean hasEnrolledFingerprint = hasEnrolledFingerprint(userId);
 
-        // Don't send notification to single-modality devices.
-        if (!packageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)
-                || !packageManager.hasSystemFeature(PackageManager.FEATURE_FACE)) {
-            return;
-        }
-
-        final FaceManager faceManager = mContext.getSystemService(FaceManager.class);
-        final boolean hasEnrolledFace = faceManager.hasEnrolledTemplates(userId);
-
-        final FingerprintManager fingerprintManager = mContext
-                .getSystemService(FingerprintManager.class);
-        final boolean hasEnrolledFingerprint = fingerprintManager.hasEnrolledTemplates(userId);
-
-        // Don't send notification when both face and fingerprint are enrolled.
-        if (hasEnrolledFace && hasEnrolledFingerprint) {
-            return;
-        }
         if (hasEnrolledFace && !hasEnrolledFingerprint) {
             mBiometricNotification.sendFpEnrollNotification(mContext);
             authenticationStats.updateNotificationCounter();
@@ -190,13 +180,21 @@
     }
 
     private void onUserRemoved(final int userId) {
-        if (!mPersisterInitialized) {
-            initializeUserAuthenticationStatsMap();
-        }
-        if (mPersisterInitialized) {
-            mUserAuthenticationStatsMap.remove(userId);
-            mAuthenticationStatsPersister.removeFrrStats(userId);
-        }
+        mUserAuthenticationStatsMap.remove(userId);
+        mAuthenticationStatsPersister.removeFrrStats(userId);
+    }
+
+    private boolean isSingleModalityDevice() {
+        return !mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)
+                || !mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE);
+    }
+
+    private boolean hasEnrolledFace(int userId) {
+        return mFaceManager.hasEnrolledTemplates(userId);
+    }
+
+    private boolean hasEnrolledFingerprint(int userId) {
+        return mFingerprintManager.hasEnrolledTemplates(userId);
     }
 
     /**
diff --git a/services/core/java/com/android/server/biometrics/BiometricSensor.java b/services/core/java/com/android/server/biometrics/BiometricSensor.java
index 937e3f8..42dd36a 100644
--- a/services/core/java/com/android/server/biometrics/BiometricSensor.java
+++ b/services/core/java/com/android/server/biometrics/BiometricSensor.java
@@ -106,12 +106,13 @@
 
     void goToStateWaitingForCookie(boolean requireConfirmation, IBinder token, long sessionId,
             int userId, IBiometricSensorReceiver sensorReceiver, String opPackageName,
-            long requestId, int cookie, boolean allowBackgroundAuthentication)
+            long requestId, int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager)
             throws RemoteException {
         mCookie = cookie;
         impl.prepareForAuthentication(requireConfirmation, token,
                 sessionId, userId, sensorReceiver, opPackageName, requestId, mCookie,
-                allowBackgroundAuthentication);
+                allowBackgroundAuthentication, isForLegacyFingerprintManager);
         mSensorState = STATE_WAITING_FOR_COOKIE;
     }
 
diff --git a/services/core/java/com/android/server/biometrics/biometrics.aconfig b/services/core/java/com/android/server/biometrics/biometrics.aconfig
new file mode 100644
index 0000000..b537e0e
--- /dev/null
+++ b/services/core/java/com/android/server/biometrics/biometrics.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.server.biometrics"
+
+flag {
+  name: "face_vhal_feature"
+  namespace: "biometrics_framework"
+  description: "This flag controls tunscany virtual HAL feature"
+  bug: "294254230"
+}
diff --git a/services/core/java/com/android/server/biometrics/log/BiometricLogger.java b/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
index 87037af..dbef717 100644
--- a/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
+++ b/services/core/java/com/android/server/biometrics/log/BiometricLogger.java
@@ -17,6 +17,7 @@
 package com.android.server.biometrics.log;
 
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.content.Context;
 import android.hardware.SensorManager;
 import android.hardware.biometrics.BiometricConstants;
@@ -42,7 +43,7 @@
     private final int mStatsAction;
     private final int mStatsClient;
     private final BiometricFrameworkStatsLogger mSink;
-    @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+    @Nullable private final AuthenticationStatsCollector mAuthenticationStatsCollector;
     @NonNull private final ALSProbe mALSProbe;
 
     private long mFirstAcquireTimeMs;
@@ -68,7 +69,7 @@
      */
     public BiometricLogger(
             @NonNull Context context, int statsModality, int statsAction, int statsClient,
-            AuthenticationStatsCollector authenticationStatsCollector) {
+            @Nullable AuthenticationStatsCollector authenticationStatsCollector) {
         this(statsModality, statsAction, statsClient,
                 BiometricFrameworkStatsLogger.getInstance(),
                 authenticationStatsCollector,
@@ -79,7 +80,7 @@
     BiometricLogger(
             int statsModality, int statsAction, int statsClient,
             BiometricFrameworkStatsLogger logSink,
-            @NonNull AuthenticationStatsCollector statsCollector,
+            @Nullable AuthenticationStatsCollector statsCollector,
             SensorManager sensorManager) {
         mStatsModality = statsModality;
         mStatsAction = statsAction;
@@ -206,7 +207,9 @@
             return;
         }
 
-        mAuthenticationStatsCollector.authenticate(targetUserId, authenticated);
+        if (mAuthenticationStatsCollector != null) {
+            mAuthenticationStatsCollector.authenticate(targetUserId, authenticated);
+        }
 
         int authState = FrameworkStatsLog.BIOMETRIC_AUTHENTICATED__STATE__UNKNOWN;
         if (!authenticated) {
diff --git a/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java b/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
index 6ac1631..78c95ad 100644
--- a/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
+++ b/services/core/java/com/android/server/biometrics/sensors/AuthenticationClient.java
@@ -283,7 +283,11 @@
                 }
 
                 try {
-                    listener.onAuthenticationFailed(getSensorId());
+                    if (listener != null) {
+                        listener.onAuthenticationFailed(getSensorId());
+                    } else {
+                        Slog.e(TAG, "Received failed auth, but client was not listening");
+                    }
                 } catch (RemoteException e) {
                     Slog.e(TAG, "Unable to notify listener", e);
                     mCallback.onClientFinished(this, false);
diff --git a/services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java b/services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java
index f1c74f0..2aec9ae 100644
--- a/services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java
+++ b/services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java
@@ -176,6 +176,7 @@
                 .setSmallIcon(R.drawable.ic_lock)
                 .setContentTitle(title)
                 .setContentText(content)
+                .setStyle(new Notification.BigTextStyle().bigText(content))
                 .setSubText(name)
                 .setOnlyAlertOnce(true)
                 .setLocalOnly(true)
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
index fb64bcc..2211003 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceAuthenticator.java
@@ -62,7 +62,8 @@
     @Override
     public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
             long operationId, int userId, IBiometricSensorReceiver sensorReceiver,
-            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager)
             throws RemoteException {
         mFaceService.prepareForAuthentication(requireConfirmation, token, operationId,
                 sensorReceiver, new FaceAuthenticateOptions.Builder()
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
index 6f26e7b..5084b60 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
@@ -58,6 +58,7 @@
 import com.android.internal.util.DumpUtils;
 import com.android.internal.widget.LockPatternUtils;
 import com.android.server.SystemService;
+import com.android.server.biometrics.Flags;
 import com.android.server.biometrics.Utils;
 import com.android.server.biometrics.log.BiometricContext;
 import com.android.server.biometrics.sensors.BiometricStateCallback;
@@ -67,6 +68,8 @@
 import com.android.server.biometrics.sensors.face.aidl.FaceProvider;
 import com.android.server.biometrics.sensors.face.hidl.Face10;
 
+import com.google.android.collect.Lists;
+
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -639,15 +642,24 @@
             provider.second.scheduleGetFeature(provider.first, token, userId, feature,
                     new ClientMonitorCallbackConverter(receiver), opPackageName);
         }
-
-        private List<ServiceProvider> getAidlProviders() {
+        @NonNull
+        private List<ServiceProvider> getHidlProviders(
+                @NonNull List<FaceSensorPropertiesInternal> hidlSensors) {
             final List<ServiceProvider> providers = new ArrayList<>();
 
-            final String[] instances = ServiceManager.getDeclaredInstances(IFace.DESCRIPTOR);
-            if (instances == null || instances.length == 0) {
-                return providers;
+            for (FaceSensorPropertiesInternal hidlSensor : hidlSensors) {
+                providers.add(
+                        Face10.newInstance(getContext(), mBiometricStateCallback,
+                                hidlSensor, mLockoutResetDispatcher));
             }
 
+            return providers;
+        }
+
+        @NonNull
+        private List<ServiceProvider> getAidlProviders(@NonNull List<String> instances) {
+            final List<ServiceProvider> providers = new ArrayList<>();
+
             for (String instance : instances) {
                 final String fqName = IFace.DESCRIPTOR + "/" + instance;
                 final IFace face = IFace.Stub.asInterface(
@@ -676,17 +688,55 @@
             super.registerAuthenticators_enforcePermission();
 
             mRegistry.registerAll(() -> {
-                final List<ServiceProvider> providers = new ArrayList<>();
-                for (FaceSensorPropertiesInternal hidlSensor : hidlSensors) {
-                    providers.add(
-                            Face10.newInstance(getContext(), mBiometricStateCallback,
-                                    hidlSensor, mLockoutResetDispatcher));
+                List<String> aidlSensors = new ArrayList<>();
+                final String[] instances = ServiceManager.getDeclaredInstances(IFace.DESCRIPTOR);
+                if (instances != null) {
+                    aidlSensors.addAll(Lists.newArrayList(instances));
                 }
-                providers.addAll(getAidlProviders());
+
+                final Pair<List<FaceSensorPropertiesInternal>, List<String>>
+                        filteredInstances = filterAvailableHalInstances(hidlSensors, aidlSensors);
+
+                final List<ServiceProvider> providers = new ArrayList<>();
+                providers.addAll(getHidlProviders(filteredInstances.first));
+                providers.addAll(getAidlProviders(filteredInstances.second));
                 return providers;
             });
         }
 
+        private Pair<List<FaceSensorPropertiesInternal>, List<String>>
+                filterAvailableHalInstances(
+                @NonNull List<FaceSensorPropertiesInternal> hidlInstances,
+                @NonNull List<String> aidlInstances) {
+            if ((hidlInstances.size() + aidlInstances.size()) <= 1) {
+                return new Pair(hidlInstances, aidlInstances);
+            }
+
+            if (Flags.faceVhalFeature()) {
+                Slog.i(TAG, "Face VHAL feature is on");
+            } else {
+                Slog.i(TAG, "Face VHAL feature is off");
+            }
+
+            final int virtualAt = aidlInstances.indexOf("virtual");
+            if (Flags.faceVhalFeature() && Utils.isVirtualEnabled(getContext())) {
+                if (virtualAt != -1) {
+                    //only virtual instance should be returned
+                    return new Pair(new ArrayList<>(), List.of(aidlInstances.get(virtualAt)));
+                } else {
+                    Slog.e(TAG, "Could not find virtual interface while it is enabled");
+                    return new Pair(hidlInstances, aidlInstances);
+                }
+            } else {
+                //remove virtual instance
+                aidlInstances = new ArrayList<>(aidlInstances);
+                if (virtualAt != -1) {
+                    aidlInstances.remove(virtualAt);
+                }
+                return new Pair(hidlInstances, aidlInstances);
+            }
+        }
+
         @Override
         public void addAuthenticatorsRegisteredCallback(
                 IFaceAuthenticatorsRegisteredCallback callback) {
@@ -749,7 +799,7 @@
 
     void syncEnrollmentsNow() {
         Utils.checkPermissionOrShell(getContext(), MANAGE_FACE);
-        if (Utils.isVirtualEnabled(getContext())) {
+        if (Flags.faceVhalFeature() && Utils.isVirtualEnabled(getContext())) {
             Slog.i(TAG, "Sync virtual enrollments");
             final int userId = ActivityManager.getCurrentUser();
             for (ServiceProvider provider : mRegistry.getProviders()) {
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
index 28f0a4d..cc3118c 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java
@@ -49,6 +49,7 @@
 import android.view.Surface;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
 import com.android.server.biometrics.AuthenticationStatsCollector;
 import com.android.server.biometrics.Utils;
 import com.android.server.biometrics.log.BiometricContext;
@@ -56,7 +57,6 @@
 import com.android.server.biometrics.sensors.AuthSessionCoordinator;
 import com.android.server.biometrics.sensors.AuthenticationClient;
 import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
 import com.android.server.biometrics.sensors.BiometricScheduler;
 import com.android.server.biometrics.sensors.BiometricStateCallback;
 import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -114,8 +114,8 @@
     private final BiometricContext mBiometricContext;
     @NonNull
     private final AuthSessionCoordinator mAuthSessionCoordinator;
-    @NonNull
-    private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+    @Nullable
+    private AuthenticationStatsCollector mAuthenticationStatsCollector;
     @Nullable
     private IFace mDaemon;
 
@@ -177,8 +177,14 @@
         mAuthSessionCoordinator = mBiometricContext.getAuthSessionCoordinator();
         mDaemon = daemon;
 
-        mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
-                BiometricsProtoEnums.MODALITY_FACE, new BiometricNotificationImpl());
+        AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+                new AuthenticationStatsBroadcastReceiver(
+                        mContext,
+                        BiometricsProtoEnums.MODALITY_FACE,
+                        (AuthenticationStatsCollector collector) -> {
+                            Slog.d(getTag(), "Initializing AuthenticationStatsCollector");
+                            mAuthenticationStatsCollector = collector;
+                        });
 
         for (SensorProps prop : props) {
             final int sensorId = prop.commonProps.sensorId;
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
index 8086261..1499317 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java
@@ -52,6 +52,7 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
 import com.android.server.biometrics.AuthenticationStatsCollector;
 import com.android.server.biometrics.SensorServiceStateProto;
 import com.android.server.biometrics.SensorStateProto;
@@ -62,7 +63,6 @@
 import com.android.server.biometrics.sensors.AcquisitionClient;
 import com.android.server.biometrics.sensors.AuthenticationConsumer;
 import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
 import com.android.server.biometrics.sensors.BiometricScheduler;
 import com.android.server.biometrics.sensors.BiometricStateCallback;
 import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -125,7 +125,7 @@
     @Nullable private IBiometricsFace mDaemon;
     @NonNull private final HalResultController mHalResultController;
     @NonNull private final BiometricContext mBiometricContext;
-    @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+    @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
     // for requests that do not use biometric prompt
     @NonNull private final AtomicLong mRequestCounter = new AtomicLong(0);
     private int mCurrentUserId = UserHandle.USER_NULL;
@@ -366,8 +366,14 @@
             mCurrentUserId = UserHandle.USER_NULL;
         });
 
-        mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
-                BiometricsProtoEnums.MODALITY_FACE, new BiometricNotificationImpl());
+        AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+                new AuthenticationStatsBroadcastReceiver(
+                        mContext,
+                        BiometricsProtoEnums.MODALITY_FACE,
+                        (AuthenticationStatsCollector collector) -> {
+                            Slog.d(TAG, "Initializing AuthenticationStatsCollector");
+                            mAuthenticationStatsCollector = collector;
+                        });
 
         try {
             ActivityManager.getService().registerUserSwitchObserver(mUserSwitchObserver, TAG);
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
index d47a57a..b6fa0c1 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintAuthenticator.java
@@ -62,7 +62,8 @@
     @Override
     public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
             long operationId, int userId, IBiometricSensorReceiver sensorReceiver,
-            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager)
             throws RemoteException {
         mFingerprintService.prepareForAuthentication(token, operationId, sensorReceiver,
                 new FingerprintAuthenticateOptions.Builder()
@@ -70,7 +71,7 @@
                         .setUserId(userId)
                         .setOpPackageName(opPackageName)
                         .build(),
-                requestId, cookie, allowBackgroundAuthentication);
+                requestId, cookie, allowBackgroundAuthentication, isForLegacyFingerprintManager);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
index 7cc6940..5ce0c8b 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
@@ -464,7 +464,8 @@
         public void prepareForAuthentication(IBinder token, long operationId,
                 IBiometricSensorReceiver sensorReceiver,
                 @NonNull FingerprintAuthenticateOptions options,
-                long requestId, int cookie, boolean allowBackgroundAuthentication) {
+                long requestId, int cookie, boolean allowBackgroundAuthentication,
+                boolean isForLegacyFingerprintManager) {
             super.prepareForAuthentication_enforcePermission();
 
             final ServiceProvider provider = mRegistry.getProviderForSensor(options.getSensorId());
@@ -473,10 +474,13 @@
                 return;
             }
 
+            final int statsClient =
+                    isForLegacyFingerprintManager ? BiometricsProtoEnums.CLIENT_FINGERPRINT_MANAGER
+                            : BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT;
             final boolean restricted = true; // BiometricPrompt is always restricted
             provider.scheduleAuthenticate(token, operationId, cookie,
                     new ClientMonitorCallbackConverter(sensorReceiver), options, requestId,
-                    restricted, BiometricsProtoEnums.CLIENT_BIOMETRIC_PROMPT,
+                    restricted, statsClient,
                     allowBackgroundAuthentication);
         }
 
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
index 51a9385..4502e5d 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClient.java
@@ -128,7 +128,11 @@
         vibrateSuccess();
 
         try {
-            getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
+            if (getListener() != null) {
+                getListener().onDetected(getSensorId(), getTargetUserId(), mIsStrongBiometric);
+            } else {
+                Slog.e(TAG, "Listener is null!");
+            }
             mCallback.onClientFinished(this, true /* success */);
         } catch (RemoteException e) {
             Slog.e(TAG, "Remote exception when sending onDetected", e);
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
index 5f4b894..f74b45c 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintProvider.java
@@ -57,6 +57,7 @@
 import android.util.proto.ProtoOutputStream;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
 import com.android.server.biometrics.AuthenticationStatsCollector;
 import com.android.server.biometrics.Utils;
 import com.android.server.biometrics.log.BiometricContext;
@@ -64,7 +65,6 @@
 import com.android.server.biometrics.sensors.AuthSessionCoordinator;
 import com.android.server.biometrics.sensors.AuthenticationClient;
 import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
 import com.android.server.biometrics.sensors.BiometricScheduler;
 import com.android.server.biometrics.sensors.BiometricStateCallback;
 import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -124,7 +124,7 @@
     @Nullable private IUdfpsOverlayController mUdfpsOverlayController;
     @Nullable private ISidefpsController mSidefpsController;
     private AuthSessionCoordinator mAuthSessionCoordinator;
-    @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+    @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
 
     private final class BiometricTaskStackListener extends TaskStackListener {
         @Override
@@ -184,8 +184,14 @@
         mAuthSessionCoordinator = mBiometricContext.getAuthSessionCoordinator();
         mDaemon = daemon;
 
-        mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
-                BiometricsProtoEnums.MODALITY_FINGERPRINT, new BiometricNotificationImpl());
+        AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+                new AuthenticationStatsBroadcastReceiver(
+                        mContext,
+                        BiometricsProtoEnums.MODALITY_FINGERPRINT,
+                        (AuthenticationStatsCollector collector) -> {
+                            Slog.d(getTag(), "Initializing AuthenticationStatsCollector");
+                            mAuthenticationStatsCollector = collector;
+                        });
 
         final List<SensorLocationInternal> workaroundLocations = getWorkaroundSensorProps(context);
 
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
index d0b71fc..a655f360 100644
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/Fingerprint21.java
@@ -52,6 +52,7 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.biometrics.AuthenticationStatsBroadcastReceiver;
 import com.android.server.biometrics.AuthenticationStatsCollector;
 import com.android.server.biometrics.SensorServiceStateProto;
 import com.android.server.biometrics.SensorStateProto;
@@ -66,7 +67,6 @@
 import com.android.server.biometrics.sensors.AuthenticationClient;
 import com.android.server.biometrics.sensors.AuthenticationConsumer;
 import com.android.server.biometrics.sensors.BaseClientMonitor;
-import com.android.server.biometrics.sensors.BiometricNotificationImpl;
 import com.android.server.biometrics.sensors.BiometricScheduler;
 import com.android.server.biometrics.sensors.BiometricStateCallback;
 import com.android.server.biometrics.sensors.ClientMonitorCallback;
@@ -125,7 +125,7 @@
     @Nullable private IUdfpsOverlayController mUdfpsOverlayController;
     @Nullable private ISidefpsController mSidefpsController;
     @NonNull private final BiometricContext mBiometricContext;
-    @NonNull private final AuthenticationStatsCollector mAuthenticationStatsCollector;
+    @Nullable private AuthenticationStatsCollector mAuthenticationStatsCollector;
     // for requests that do not use biometric prompt
     @NonNull private final AtomicLong mRequestCounter = new AtomicLong(0);
     private int mCurrentUserId = UserHandle.USER_NULL;
@@ -354,8 +354,14 @@
             mCurrentUserId = UserHandle.USER_NULL;
         });
 
-        mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
-                BiometricsProtoEnums.MODALITY_FINGERPRINT, new BiometricNotificationImpl());
+        AuthenticationStatsBroadcastReceiver mBroadcastReceiver =
+                new AuthenticationStatsBroadcastReceiver(
+                        mContext,
+                        BiometricsProtoEnums.MODALITY_FINGERPRINT,
+                        (AuthenticationStatsCollector collector) -> {
+                            Slog.d(TAG, "Initializing AuthenticationStatsCollector");
+                            mAuthenticationStatsCollector = collector;
+                        });
 
         try {
             ActivityManager.getService().registerUserSwitchObserver(mUserSwitchObserver, TAG);
diff --git a/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java b/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
index 5c0c362..01d1e378 100644
--- a/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
+++ b/services/core/java/com/android/server/biometrics/sensors/iris/IrisAuthenticator.java
@@ -59,7 +59,8 @@
     @Override
     public void prepareForAuthentication(boolean requireConfirmation, IBinder token,
             long sessionId, int userId, IBiometricSensorReceiver sensorReceiver,
-            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication)
+            String opPackageName, long requestId, int cookie, boolean allowBackgroundAuthentication,
+            boolean isForLegacyFingerprintManager)
             throws RemoteException {
     }
 
diff --git a/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java b/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
index adea13f..6bed42b 100644
--- a/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
+++ b/services/core/java/com/android/server/broadcastradio/aidl/ConversionUtils.java
@@ -29,7 +29,6 @@
 import android.hardware.broadcastradio.ProgramFilter;
 import android.hardware.broadcastradio.ProgramIdentifier;
 import android.hardware.broadcastradio.ProgramInfo;
-import android.hardware.broadcastradio.ProgramListChunk;
 import android.hardware.broadcastradio.Properties;
 import android.hardware.broadcastradio.Result;
 import android.hardware.broadcastradio.VendorKeyValue;
@@ -38,6 +37,7 @@
 import android.hardware.radio.RadioManager;
 import android.hardware.radio.RadioMetadata;
 import android.hardware.radio.RadioTuner;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.os.Build;
 import android.os.ParcelableException;
 import android.os.ServiceSpecificException;
@@ -323,10 +323,15 @@
     static ProgramIdentifier identifierToHalProgramIdentifier(ProgramSelector.Identifier id) {
         ProgramIdentifier hwId = new ProgramIdentifier();
         hwId.type = id.getType();
-        if (hwId.type == ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT) {
+        if (id.getType() == ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT) {
             hwId.type = IdentifierType.DAB_SID_EXT;
         }
-        hwId.value = id.getValue();
+        long value = id.getValue();
+        if (id.getType() == ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT) {
+            hwId.value = (value & 0xFFFF) | ((value >>> 16) << 32);
+        } else {
+            hwId.value = value;
+        }
         return hwId;
     }
 
@@ -553,31 +558,6 @@
         return hwFilter;
     }
 
-    static ProgramList.Chunk chunkFromHalProgramListChunk(ProgramListChunk chunk) {
-        Set<RadioManager.ProgramInfo> modified = new ArraySet<>(chunk.modified.length);
-        for (int i = 0; i < chunk.modified.length; i++) {
-            RadioManager.ProgramInfo modifiedInfo =
-                    programInfoFromHalProgramInfo(chunk.modified[i]);
-            if (modifiedInfo == null) {
-                Slogf.w(TAG, "Program info %s in program list chunk is not valid",
-                        chunk.modified[i]);
-                continue;
-            }
-            modified.add(modifiedInfo);
-        }
-        Set<ProgramSelector.Identifier> removed = new ArraySet<>();
-        if (chunk.removed != null) {
-            for (int i = 0; i < chunk.removed.length; i++) {
-                ProgramSelector.Identifier removedId =
-                        identifierFromHalProgramIdentifier(chunk.removed[i]);
-                if (removedId != null) {
-                    removed.add(removedId);
-                }
-            }
-        }
-        return new ProgramList.Chunk(chunk.purge, chunk.complete, modified, removed);
-    }
-
     private static boolean isNewIdentifierInU(ProgramSelector.Identifier id) {
         return id.getType() == ProgramSelector.IDENTIFIER_TYPE_DAB_DMB_SID_EXT;
     }
@@ -609,6 +589,9 @@
                 || isNewIdentifierInU(info.getPhysicallyTunedTo())) {
             return false;
         }
+        if (info.getRelatedContent() == null) {
+            return true;
+        }
         Iterator<ProgramSelector.Identifier> relatedContentIt = info.getRelatedContent().iterator();
         while (relatedContentIt.hasNext()) {
             if (isNewIdentifierInU(relatedContentIt.next())) {
@@ -630,11 +613,11 @@
                 modified.add(info);
             }
         }
-        Set<ProgramSelector.Identifier> removed = new ArraySet<>();
-        Iterator<ProgramSelector.Identifier> removedIterator = chunk.getRemoved().iterator();
+        Set<UniqueProgramIdentifier> removed = new ArraySet<>();
+        Iterator<UniqueProgramIdentifier> removedIterator = chunk.getRemoved().iterator();
         while (removedIterator.hasNext()) {
-            ProgramSelector.Identifier id = removedIterator.next();
-            if (!isNewIdentifierInU(id)) {
+            UniqueProgramIdentifier id = removedIterator.next();
+            if (!isNewIdentifierInU(id.getPrimaryId())) {
                 removed.add(id);
             }
         }
diff --git a/services/core/java/com/android/server/broadcastradio/aidl/ProgramInfoCache.java b/services/core/java/com/android/server/broadcastradio/aidl/ProgramInfoCache.java
index c9ae735..756dbbb 100644
--- a/services/core/java/com/android/server/broadcastradio/aidl/ProgramInfoCache.java
+++ b/services/core/java/com/android/server/broadcastradio/aidl/ProgramInfoCache.java
@@ -17,9 +17,11 @@
 package com.android.server.broadcastradio.aidl;
 
 import android.annotation.Nullable;
+import android.hardware.broadcastradio.ProgramListChunk;
 import android.hardware.radio.ProgramList;
-import android.hardware.radio.ProgramSelector;
+import android.hardware.radio.ProgramSelector.Identifier;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 
@@ -30,7 +32,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 /**
@@ -40,24 +41,25 @@
 
     private static final String TAG = "BcRadioAidlSrv.cache";
     /**
-     * Maximum number of {@link RadioManager#ProgramInfo} elements that will be put into a
+     * Maximum number of {@link RadioManager.ProgramInfo} elements that will be put into a
      * ProgramList.Chunk.mModified array. Used to try to ensure a single ProgramList.Chunk
      * stays within the AIDL data size limit.
      */
     private static final int MAX_NUM_MODIFIED_PER_CHUNK = 100;
 
     /**
-     * Maximum number of {@link ProgramSelector#Identifier} elements that will be put
-     * into the removed array of {@link ProgramList#Chunk}. Used to try to ensure a single
-     * {@link ProgramList#Chunk} stays within the AIDL data size limit.
+     * Maximum number of {@link Identifier} elements that will be put into the removed array
+     * of {@link ProgramList.Chunk}. Use to attempt and keep the single {@link ProgramList.Chunk}
+     * within the AIDL data size limit.
      */
     private static final int MAX_NUM_REMOVED_PER_CHUNK = 500;
 
     /**
-     * Map from primary identifier to corresponding {@link RadioManager#ProgramInfo}.
+     * Map from primary identifier to {@link UniqueProgramIdentifier} and then to corresponding
+     * {@link RadioManager.ProgramInfo}.
      */
-    private final Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> mProgramInfoMap =
-            new ArrayMap<>();
+    private final ArrayMap<Identifier, ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo>>
+            mProgramInfoMap = new ArrayMap<>();
 
     /**
      * Flag indicating whether mProgramInfoMap is considered complete based upon the received
@@ -81,13 +83,17 @@
         mFilter = filter;
         mComplete = complete;
         for (int i = 0; i < programInfos.length; i++) {
-            mProgramInfoMap.put(programInfos[i].getSelector().getPrimaryId(), programInfos[i]);
+            putInfo(programInfos[i]);
         }
     }
 
     @VisibleForTesting
     List<RadioManager.ProgramInfo> toProgramInfoList() {
-        return new ArrayList<>(mProgramInfoMap.values());
+        List<RadioManager.ProgramInfo> programInfoList = new ArrayList<>();
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            programInfoList.addAll(mProgramInfoMap.valueAt(index).values());
+        }
+        return programInfoList;
     }
 
     @Override
@@ -97,10 +103,14 @@
         sb.append(", mFilter = ");
         sb.append(mFilter);
         sb.append(", mProgramInfoMap = [");
-        mProgramInfoMap.forEach((id, programInfo) -> {
-            sb.append(", ");
-            sb.append(programInfo);
-        });
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries =
+                    mProgramInfoMap.valueAt(index);
+            for (int entryIndex = 0; entryIndex < entries.size(); entryIndex++) {
+                sb.append(", ");
+                sb.append(entries.valueAt(entryIndex));
+            }
+        }
         return sb.append("])").toString();
     }
 
@@ -114,8 +124,7 @@
     }
 
     @VisibleForTesting
-    void updateFromHalProgramListChunk(
-            android.hardware.broadcastradio.ProgramListChunk chunk) {
+    void updateFromHalProgramListChunk(ProgramListChunk chunk) {
         if (chunk.purge) {
             mProgramInfoMap.clear();
         }
@@ -125,8 +134,9 @@
             if (programInfo == null) {
                 Slogf.e(TAG, "Program info in program info %s in chunk is not valid",
                         chunk.modified[i]);
+                continue;
             }
-            mProgramInfoMap.put(programInfo.getSelector().getPrimaryId(), programInfo);
+            putInfo(programInfo);
         }
         if (chunk.removed != null) {
             for (int i = 0; i < chunk.removed.length; i++) {
@@ -155,25 +165,31 @@
             purge = true;
         }
 
-        Set<RadioManager.ProgramInfo> modified = new ArraySet<>();
-        Set<ProgramSelector.Identifier> removed = new ArraySet<>(mProgramInfoMap.keySet());
-        for (Map.Entry<ProgramSelector.Identifier, RadioManager.ProgramInfo> entry
-                : other.mProgramInfoMap.entrySet()) {
-            ProgramSelector.Identifier id = entry.getKey();
+        ArraySet<RadioManager.ProgramInfo> modified = new ArraySet<>();
+        ArraySet<UniqueProgramIdentifier> removed = new ArraySet<>();
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            removed.addAll(mProgramInfoMap.valueAt(index).keySet());
+        }
+        for (int index = 0; index < other.mProgramInfoMap.size(); index++) {
+            Identifier id = other.mProgramInfoMap.keyAt(index);
             if (!passesFilter(id)) {
                 continue;
             }
-            removed.remove(id);
+            ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries =
+                    other.mProgramInfoMap.valueAt(index);
+            for (int entryIndex = 0; entryIndex < entries.size(); entryIndex++) {
+                removed.remove(entries.keyAt(entryIndex));
 
-            RadioManager.ProgramInfo newInfo = entry.getValue();
-            if (!shouldIncludeInModified(newInfo)) {
-                continue;
+                RadioManager.ProgramInfo newInfo = entries.valueAt(entryIndex);
+                if (!shouldIncludeInModified(newInfo)) {
+                    continue;
+                }
+                putInfo(newInfo);
+                modified.add(newInfo);
             }
-            mProgramInfoMap.put(id, newInfo);
-            modified.add(newInfo);
         }
-        for (ProgramSelector.Identifier rem : removed) {
-            mProgramInfoMap.remove(rem);
+        for (int removedIndex = 0; removedIndex < removed.size(); removedIndex++) {
+            removeUniqueId(removed.valueAt(removedIndex));
         }
         mComplete = other.mComplete;
         return buildChunks(purge, mComplete, modified, maxNumModifiedPerChunk, removed,
@@ -181,45 +197,61 @@
     }
 
     @Nullable
-    List<ProgramList.Chunk> filterAndApplyChunk(ProgramList.Chunk chunk) {
+    List<ProgramList.Chunk> filterAndApplyChunk(ProgramListChunk chunk) {
         return filterAndApplyChunkInternal(chunk, MAX_NUM_MODIFIED_PER_CHUNK,
                 MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @VisibleForTesting
     @Nullable
-    List<ProgramList.Chunk> filterAndApplyChunkInternal(ProgramList.Chunk chunk,
+    List<ProgramList.Chunk> filterAndApplyChunkInternal(ProgramListChunk chunk,
             int maxNumModifiedPerChunk, int maxNumRemovedPerChunk) {
-        if (chunk.isPurge()) {
+        if (chunk.purge) {
             mProgramInfoMap.clear();
         }
 
         Set<RadioManager.ProgramInfo> modified = new ArraySet<>();
-        Set<ProgramSelector.Identifier> removed = new ArraySet<>();
-        for (RadioManager.ProgramInfo info : chunk.getModified()) {
-            ProgramSelector.Identifier id = info.getSelector().getPrimaryId();
-            if (!passesFilter(id) || !shouldIncludeInModified(info)) {
+        for (int i = 0; i < chunk.modified.length; i++) {
+            RadioManager.ProgramInfo info =
+                    ConversionUtils.programInfoFromHalProgramInfo(chunk.modified[i]);
+            if (info == null) {
+                Slogf.w(TAG, "Program info %s in program list chunk is not valid",
+                        chunk.modified[i]);
                 continue;
             }
-            mProgramInfoMap.put(id, info);
+            Identifier primaryId = info.getSelector().getPrimaryId();
+            if (!passesFilter(primaryId) || !shouldIncludeInModified(info)) {
+                continue;
+            }
+            putInfo(info);
             modified.add(info);
         }
-        for (ProgramSelector.Identifier id : chunk.getRemoved()) {
-            if (mProgramInfoMap.containsKey(id)) {
-                mProgramInfoMap.remove(id);
-                removed.add(id);
+        Set<UniqueProgramIdentifier> removed = new ArraySet<>();
+        if (chunk.removed != null) {
+            for (int i = 0; i < chunk.removed.length; i++) {
+                Identifier removedId = ConversionUtils.identifierFromHalProgramIdentifier(
+                        chunk.removed[i]);
+                if (removedId == null) {
+                    Slogf.w(TAG, "Removed identifier %s in program list chunk is not valid",
+                            chunk.modified[i]);
+                    continue;
+                }
+                if (mProgramInfoMap.containsKey(removedId)) {
+                    removed.addAll(mProgramInfoMap.get(removedId).keySet());
+                    mProgramInfoMap.remove(removedId);
+                }
             }
         }
-        if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.isComplete()
-                && !chunk.isPurge()) {
+        if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.complete
+                && !chunk.purge) {
             return null;
         }
-        mComplete = chunk.isComplete();
-        return buildChunks(chunk.isPurge(), mComplete, modified, maxNumModifiedPerChunk, removed,
+        mComplete = chunk.complete;
+        return buildChunks(chunk.purge, mComplete, modified, maxNumModifiedPerChunk, removed,
                 maxNumRemovedPerChunk);
     }
 
-    private boolean passesFilter(ProgramSelector.Identifier id) {
+    private boolean passesFilter(Identifier id) {
         if (mFilter == null) {
             return true;
         }
@@ -233,9 +265,32 @@
         return mFilter.areCategoriesIncluded() || !id.isCategoryType();
     }
 
+    private void putInfo(RadioManager.ProgramInfo info) {
+        Identifier primaryId = info.getSelector().getPrimaryId();
+        if (!mProgramInfoMap.containsKey(primaryId)) {
+            mProgramInfoMap.put(primaryId, new ArrayMap<>());
+        }
+        mProgramInfoMap.get(primaryId).put(new UniqueProgramIdentifier(info.getSelector()), info);
+    }
+
+    private void removeUniqueId(UniqueProgramIdentifier uniqueId) {
+        Identifier primaryId =  uniqueId.getPrimaryId();
+        if (!mProgramInfoMap.containsKey(primaryId)) {
+            return;
+        }
+        mProgramInfoMap.get(primaryId).remove(uniqueId);
+        if (mProgramInfoMap.get(primaryId).isEmpty()) {
+            mProgramInfoMap.remove(primaryId);
+        }
+    }
+
     private boolean shouldIncludeInModified(RadioManager.ProgramInfo newInfo) {
-        RadioManager.ProgramInfo oldInfo = mProgramInfoMap.get(
-                newInfo.getSelector().getPrimaryId());
+        Identifier primaryId = newInfo.getSelector().getPrimaryId();
+        RadioManager.ProgramInfo oldInfo = null;
+        if (mProgramInfoMap.containsKey(primaryId)) {
+            UniqueProgramIdentifier uniqueId = new UniqueProgramIdentifier(newInfo.getSelector());
+            oldInfo = mProgramInfoMap.get(primaryId).get(uniqueId);
+        }
         if (oldInfo == null) {
             return true;
         }
@@ -251,7 +306,7 @@
 
     private static List<ProgramList.Chunk> buildChunks(boolean purge, boolean complete,
             @Nullable Collection<RadioManager.ProgramInfo> modified, int maxNumModifiedPerChunk,
-            @Nullable Collection<ProgramSelector.Identifier> removed, int maxNumRemovedPerChunk) {
+            @Nullable Collection<UniqueProgramIdentifier> removed, int maxNumRemovedPerChunk) {
         // Communication protocol requires that if purge is set, removed is empty.
         if (purge) {
             removed = null;
@@ -275,7 +330,7 @@
         int modifiedPerChunk = 0;
         int removedPerChunk = 0;
         Iterator<RadioManager.ProgramInfo> modifiedIter = null;
-        Iterator<ProgramSelector.Identifier> removedIter = null;
+        Iterator<UniqueProgramIdentifier> removedIter = null;
         if (modified != null) {
             modifiedPerChunk = roundUpFraction(modified.size(), numChunks);
             modifiedIter = modified.iterator();
@@ -287,7 +342,7 @@
         List<ProgramList.Chunk> chunks = new ArrayList<>(numChunks);
         for (int i = 0; i < numChunks; i++) {
             ArraySet<RadioManager.ProgramInfo> modifiedChunk = new ArraySet<>();
-            ArraySet<ProgramSelector.Identifier> removedChunk = new ArraySet<>();
+            ArraySet<UniqueProgramIdentifier> removedChunk = new ArraySet<>();
             if (modifiedIter != null) {
                 for (int j = 0; j < modifiedPerChunk && modifiedIter.hasNext(); j++) {
                     modifiedChunk.add(modifiedIter.next());
diff --git a/services/core/java/com/android/server/broadcastradio/aidl/RadioModule.java b/services/core/java/com/android/server/broadcastradio/aidl/RadioModule.java
index 7c87c6c..2ae7f95 100644
--- a/services/core/java/com/android/server/broadcastradio/aidl/RadioModule.java
+++ b/services/core/java/com/android/server/broadcastradio/aidl/RadioModule.java
@@ -142,12 +142,11 @@
         public void onProgramListUpdated(ProgramListChunk programListChunk) {
             fireLater(() -> {
                 synchronized (mLock) {
-                    android.hardware.radio.ProgramList.Chunk chunk =
-                            ConversionUtils.chunkFromHalProgramListChunk(programListChunk);
-                    mProgramInfoCache.filterAndApplyChunk(chunk);
+                    mProgramInfoCache.filterAndApplyChunk(programListChunk);
 
                     for (int i = 0; i < mAidlTunerSessions.size(); i++) {
-                        mAidlTunerSessions.valueAt(i).onMergedProgramListUpdateFromHal(chunk);
+                        mAidlTunerSessions.valueAt(i).onMergedProgramListUpdateFromHal(
+                                programListChunk);
                     }
                 }
             });
diff --git a/services/core/java/com/android/server/broadcastradio/aidl/TunerSession.java b/services/core/java/com/android/server/broadcastradio/aidl/TunerSession.java
index beff7bd..4ed36ec 100644
--- a/services/core/java/com/android/server/broadcastradio/aidl/TunerSession.java
+++ b/services/core/java/com/android/server/broadcastradio/aidl/TunerSession.java
@@ -20,6 +20,7 @@
 import android.graphics.Bitmap;
 import android.hardware.broadcastradio.ConfigFlag;
 import android.hardware.broadcastradio.IBroadcastRadio;
+import android.hardware.broadcastradio.ProgramListChunk;
 import android.hardware.radio.ITuner;
 import android.hardware.radio.ProgramList;
 import android.hardware.radio.ProgramSelector;
@@ -297,7 +298,7 @@
         }
     }
 
-    void onMergedProgramListUpdateFromHal(ProgramList.Chunk mergedChunk) {
+    void onMergedProgramListUpdateFromHal(ProgramListChunk mergedChunk) {
         List<ProgramList.Chunk> clientUpdateChunks;
         synchronized (mLock) {
             if (mProgramInfoCache == null) {
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/Convert.java b/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
index e6908b1..fb1138f 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/Convert.java
@@ -28,7 +28,6 @@
 import android.hardware.broadcastradio.V2_0.ProgramFilter;
 import android.hardware.broadcastradio.V2_0.ProgramIdentifier;
 import android.hardware.broadcastradio.V2_0.ProgramInfo;
-import android.hardware.broadcastradio.V2_0.ProgramListChunk;
 import android.hardware.broadcastradio.V2_0.Properties;
 import android.hardware.broadcastradio.V2_0.Result;
 import android.hardware.broadcastradio.V2_0.VendorKeyValue;
@@ -425,16 +424,6 @@
         return hwFilter;
     }
 
-    static @NonNull ProgramList.Chunk programListChunkFromHal(@NonNull ProgramListChunk chunk) {
-        Set<RadioManager.ProgramInfo> modified = chunk.modified.stream().
-                map(info -> programInfoFromHal(info)).collect(Collectors.toSet());
-        Set<ProgramSelector.Identifier> removed = chunk.removed.stream().
-                map(id -> Objects.requireNonNull(programIdentifierFromHal(id))).
-                collect(Collectors.toSet());
-
-        return new ProgramList.Chunk(chunk.purge, chunk.complete, modified, removed);
-    }
-
     public static @NonNull android.hardware.radio.Announcement announcementFromHal(
             @NonNull Announcement hwAnnouncement) {
         return new android.hardware.radio.Announcement(
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/ProgramInfoCache.java b/services/core/java/com/android/server/broadcastradio/hal2/ProgramInfoCache.java
index 9831af6..111953d 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/ProgramInfoCache.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/ProgramInfoCache.java
@@ -16,21 +16,21 @@
 
 package com.android.server.broadcastradio.hal2;
 
-import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.hardware.broadcastradio.V2_0.ProgramListChunk;
 import android.hardware.radio.ProgramList;
-import android.hardware.radio.ProgramSelector;
+import android.hardware.radio.ProgramSelector.Identifier;
 import android.hardware.radio.RadioManager;
+import android.hardware.radio.UniqueProgramIdentifier;
+import android.util.ArrayMap;
+import android.util.ArraySet;
 
 import com.android.internal.annotations.VisibleForTesting;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 final class ProgramInfoCache {
@@ -40,13 +40,14 @@
     private static final int MAX_NUM_MODIFIED_PER_CHUNK = 100;
 
     // Maximum number of ProgramSelector.Identifier elements that will be put into a
-    // ProgramList.Chunk.mRemoved array. Used to try to ensure a single ProgramList.Chunk stays
+    // ProgramList.Chunk.mRemoved array. Use to attempt and keep the single ProgramList.Chunk
     // within the AIDL data size limit.
     private static final int MAX_NUM_REMOVED_PER_CHUNK = 500;
 
-    // Map from primary identifier to corresponding ProgramInfo.
-    private final Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> mProgramInfoMap =
-            new HashMap<>();
+    // Map from primary identifier to a map of unique identifiers and program info, where the
+    // containing map has unique identifiers to program info.
+    private final ArrayMap<Identifier, ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo>>
+            mProgramInfoMap = new ArrayMap<>();
 
     // Flag indicating whether mProgramInfoMap is considered complete based upon the received
     // updates.
@@ -66,18 +67,18 @@
             RadioManager.ProgramInfo... programInfos) {
         mFilter = filter;
         mComplete = complete;
-        for (RadioManager.ProgramInfo programInfo : programInfos) {
-            mProgramInfoMap.put(programInfo.getSelector().getPrimaryId(), programInfo);
+        for (int i = 0; i < programInfos.length; i++) {
+            putInfo(programInfos[i]);
         }
     }
 
     @VisibleForTesting
-    boolean programInfosAreExactly(RadioManager.ProgramInfo... programInfos) {
-        Map<ProgramSelector.Identifier, RadioManager.ProgramInfo> expectedMap = new HashMap<>();
-        for (RadioManager.ProgramInfo programInfo : programInfos) {
-            expectedMap.put(programInfo.getSelector().getPrimaryId(), programInfo);
+    List<RadioManager.ProgramInfo> toProgramInfoList() {
+        List<RadioManager.ProgramInfo> programInfoList = new ArrayList<>();
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            programInfoList.addAll(mProgramInfoMap.valueAt(index).values());
         }
-        return expectedMap.equals(mProgramInfoMap);
+        return programInfoList;
     }
 
     @Override
@@ -87,10 +88,14 @@
         sb.append(", mFilter = ");
         sb.append(mFilter);
         sb.append(", mProgramInfoMap = [");
-        mProgramInfoMap.forEach((id, programInfo) -> {
-            sb.append("\n");
-            sb.append(programInfo.toString());
-        });
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries =
+                    mProgramInfoMap.valueAt(index);
+            for (int entryIndex = 0; entryIndex < entries.size(); entryIndex++) {
+                sb.append(", ");
+                sb.append(entries.valueAt(entryIndex));
+            }
+        }
         sb.append("]");
         return sb.toString();
     }
@@ -103,14 +108,13 @@
         return mFilter;
     }
 
-    void updateFromHalProgramListChunk(
-            @NonNull android.hardware.broadcastradio.V2_0.ProgramListChunk chunk) {
+    void updateFromHalProgramListChunk(ProgramListChunk chunk) {
         if (chunk.purge) {
             mProgramInfoMap.clear();
         }
         for (android.hardware.broadcastradio.V2_0.ProgramInfo halProgramInfo : chunk.modified) {
             RadioManager.ProgramInfo programInfo = Convert.programInfoFromHal(halProgramInfo);
-            mProgramInfoMap.put(programInfo.getSelector().getPrimaryId(), programInfo);
+            putInfo(programInfo);
         }
         for (android.hardware.broadcastradio.V2_0.ProgramIdentifier halProgramId : chunk.removed) {
             mProgramInfoMap.remove(Convert.programIdentifierFromHal(halProgramId));
@@ -118,14 +122,13 @@
         mComplete = chunk.complete;
     }
 
-    @NonNull List<ProgramList.Chunk> filterAndUpdateFrom(@NonNull ProgramInfoCache other,
-            boolean purge) {
+    List<ProgramList.Chunk> filterAndUpdateFrom(ProgramInfoCache other, boolean purge) {
         return filterAndUpdateFromInternal(other, purge, MAX_NUM_MODIFIED_PER_CHUNK,
                 MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @VisibleForTesting
-    @NonNull List<ProgramList.Chunk> filterAndUpdateFromInternal(@NonNull ProgramInfoCache other,
+    List<ProgramList.Chunk> filterAndUpdateFromInternal(ProgramInfoCache other,
             boolean purge, int maxNumModifiedPerChunk, int maxNumRemovedPerChunk) {
         if (purge) {
             mProgramInfoMap.clear();
@@ -136,69 +139,82 @@
             purge = true;
         }
 
-        Set<RadioManager.ProgramInfo> modified = new HashSet<>();
-        Set<ProgramSelector.Identifier> removed = new HashSet<>(mProgramInfoMap.keySet());
-        for (Map.Entry<ProgramSelector.Identifier, RadioManager.ProgramInfo> entry
-                : other.mProgramInfoMap.entrySet()) {
-            ProgramSelector.Identifier id = entry.getKey();
+        ArraySet<RadioManager.ProgramInfo> modified = new ArraySet<>();
+        ArraySet<UniqueProgramIdentifier> removed = new ArraySet<>();
+        for (int index = 0; index < mProgramInfoMap.size(); index++) {
+            removed.addAll(mProgramInfoMap.valueAt(index).keySet());
+        }
+        for (int index = 0; index < other.mProgramInfoMap.size(); index++) {
+            Identifier id = other.mProgramInfoMap.keyAt(index);
             if (!passesFilter(id)) {
                 continue;
             }
-            removed.remove(id);
+            ArrayMap<UniqueProgramIdentifier, RadioManager.ProgramInfo> entries =
+                    other.mProgramInfoMap.valueAt(index);
+            for (int entryIndex = 0; entryIndex < entries.size(); entryIndex++) {
+                removed.remove(entries.keyAt(entryIndex));
 
-            RadioManager.ProgramInfo newInfo = entry.getValue();
-            if (!shouldIncludeInModified(newInfo)) {
-                continue;
+                RadioManager.ProgramInfo newInfo = entries.valueAt(entryIndex);
+                if (!shouldIncludeInModified(newInfo)) {
+                    continue;
+                }
+                putInfo(newInfo);
+                modified.add(newInfo);
             }
-            mProgramInfoMap.put(id, newInfo);
-            modified.add(newInfo);
         }
-        for (ProgramSelector.Identifier rem : removed) {
-            mProgramInfoMap.remove(rem);
+        for (int removedIndex = 0; removedIndex < removed.size(); removedIndex++) {
+            removeUniqueId(removed.valueAt(removedIndex));
         }
         mComplete = other.mComplete;
         return buildChunks(purge, mComplete, modified, maxNumModifiedPerChunk, removed,
                 maxNumRemovedPerChunk);
     }
 
-    @Nullable List<ProgramList.Chunk> filterAndApplyChunk(@NonNull ProgramList.Chunk chunk) {
+    @Nullable
+    List<ProgramList.Chunk> filterAndApplyChunk(ProgramListChunk chunk) {
         return filterAndApplyChunkInternal(chunk, MAX_NUM_MODIFIED_PER_CHUNK,
                 MAX_NUM_REMOVED_PER_CHUNK);
     }
 
     @VisibleForTesting
-    @Nullable List<ProgramList.Chunk> filterAndApplyChunkInternal(@NonNull ProgramList.Chunk chunk,
+    @Nullable
+    List<ProgramList.Chunk> filterAndApplyChunkInternal(ProgramListChunk chunk,
             int maxNumModifiedPerChunk, int maxNumRemovedPerChunk) {
-        if (chunk.isPurge()) {
+        if (chunk.purge) {
             mProgramInfoMap.clear();
         }
 
-        Set<RadioManager.ProgramInfo> modified = new HashSet<>();
-        Set<ProgramSelector.Identifier> removed = new HashSet<>();
-        for (RadioManager.ProgramInfo info : chunk.getModified()) {
-            ProgramSelector.Identifier id = info.getSelector().getPrimaryId();
-            if (!passesFilter(id) || !shouldIncludeInModified(info)) {
+        Set<RadioManager.ProgramInfo> modified = new ArraySet<>();
+        for (android.hardware.broadcastradio.V2_0.ProgramInfo halProgramInfo : chunk.modified) {
+            RadioManager.ProgramInfo info = Convert.programInfoFromHal(halProgramInfo);
+            Identifier primaryId = info.getSelector().getPrimaryId();
+            if (!passesFilter(primaryId) || !shouldIncludeInModified(info)) {
                 continue;
             }
-            mProgramInfoMap.put(id, info);
+            putInfo(info);
             modified.add(info);
         }
-        for (ProgramSelector.Identifier id : chunk.getRemoved()) {
-            if (mProgramInfoMap.containsKey(id)) {
-                mProgramInfoMap.remove(id);
-                removed.add(id);
+        Set<UniqueProgramIdentifier> removed = new ArraySet<>();
+        for (android.hardware.broadcastradio.V2_0.ProgramIdentifier halProgramId : chunk.removed) {
+            Identifier removedId = Convert.programIdentifierFromHal(halProgramId);
+            if (removedId == null) {
+                continue;
+            }
+            if (mProgramInfoMap.containsKey(removedId)) {
+                removed.addAll(mProgramInfoMap.get(removedId).keySet());
+                mProgramInfoMap.remove(removedId);
             }
         }
-        if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.isComplete()
-                && !chunk.isPurge()) {
+        if (modified.isEmpty() && removed.isEmpty() && mComplete == chunk.complete
+                && !chunk.purge) {
             return null;
         }
-        mComplete = chunk.isComplete();
-        return buildChunks(chunk.isPurge(), mComplete, modified, maxNumModifiedPerChunk, removed,
+        mComplete = chunk.complete;
+        return buildChunks(chunk.purge, mComplete, modified, maxNumModifiedPerChunk, removed,
                 maxNumRemovedPerChunk);
     }
 
-    private boolean passesFilter(ProgramSelector.Identifier id) {
+    private boolean passesFilter(Identifier id) {
         if (mFilter == null) {
             return true;
         }
@@ -215,9 +231,33 @@
         return true;
     }
 
+    private void putInfo(RadioManager.ProgramInfo info) {
+        Identifier primaryId = info.getSelector().getPrimaryId();
+        if (!mProgramInfoMap.containsKey(primaryId)) {
+            mProgramInfoMap.put(primaryId, new ArrayMap<>());
+        }
+        mProgramInfoMap.get(primaryId).put(new UniqueProgramIdentifier(
+                info.getSelector()), info);
+    }
+
+    private void removeUniqueId(UniqueProgramIdentifier uniqueId) {
+        Identifier primaryId =  uniqueId.getPrimaryId();
+        if (!mProgramInfoMap.containsKey(primaryId)) {
+            return;
+        }
+        mProgramInfoMap.get(primaryId).remove(uniqueId);
+        if (mProgramInfoMap.get(primaryId).isEmpty()) {
+            mProgramInfoMap.remove(primaryId);
+        }
+    }
+
     private boolean shouldIncludeInModified(RadioManager.ProgramInfo newInfo) {
-        RadioManager.ProgramInfo oldInfo = mProgramInfoMap.get(
-                newInfo.getSelector().getPrimaryId());
+        Identifier primaryId = newInfo.getSelector().getPrimaryId();
+        RadioManager.ProgramInfo oldInfo = null;
+        if (mProgramInfoMap.containsKey(primaryId)) {
+            UniqueProgramIdentifier uniqueId = new UniqueProgramIdentifier(newInfo.getSelector());
+            oldInfo = mProgramInfoMap.get(primaryId).get(uniqueId);
+        }
         if (oldInfo == null) {
             return true;
         }
@@ -231,9 +271,9 @@
         return (numerator / denominator) + (numerator % denominator > 0 ? 1 : 0);
     }
 
-    private static @NonNull List<ProgramList.Chunk> buildChunks(boolean purge, boolean complete,
+    private static List<ProgramList.Chunk> buildChunks(boolean purge, boolean complete,
             @Nullable Collection<RadioManager.ProgramInfo> modified, int maxNumModifiedPerChunk,
-            @Nullable Collection<ProgramSelector.Identifier> removed, int maxNumRemovedPerChunk) {
+            @Nullable Collection<UniqueProgramIdentifier> removed, int maxNumRemovedPerChunk) {
         // Communication protocol requires that if purge is set, removed is empty.
         if (purge) {
             removed = null;
@@ -257,7 +297,7 @@
         int modifiedPerChunk = 0;
         int removedPerChunk = 0;
         Iterator<RadioManager.ProgramInfo> modifiedIter = null;
-        Iterator<ProgramSelector.Identifier> removedIter = null;
+        Iterator<UniqueProgramIdentifier> removedIter = null;
         if (modified != null) {
             modifiedPerChunk = roundUpFraction(modified.size(), numChunks);
             modifiedIter = modified.iterator();
@@ -268,8 +308,8 @@
         }
         List<ProgramList.Chunk> chunks = new ArrayList<ProgramList.Chunk>(numChunks);
         for (int i = 0; i < numChunks; i++) {
-            HashSet<RadioManager.ProgramInfo> modifiedChunk = new HashSet<>();
-            HashSet<ProgramSelector.Identifier> removedChunk = new HashSet<>();
+            ArraySet<RadioManager.ProgramInfo> modifiedChunk = new ArraySet<>();
+            ArraySet<UniqueProgramIdentifier> removedChunk = new ArraySet<>();
             if (modifiedIter != null) {
                 for (int j = 0; j < modifiedPerChunk && modifiedIter.hasNext(); j++) {
                     modifiedChunk.add(modifiedIter.next());
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java b/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
index 7b5cb898..a54af2e 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/RadioModule.java
@@ -111,13 +111,11 @@
         @Override
         public void onProgramListUpdated(ProgramListChunk programListChunk) {
             fireLater(() -> {
-                android.hardware.radio.ProgramList.Chunk chunk =
-                        Convert.programListChunkFromHal(programListChunk);
                 synchronized (mLock) {
-                    mProgramInfoCache.filterAndApplyChunk(chunk);
+                    mProgramInfoCache.filterAndApplyChunk(programListChunk);
 
                     for (TunerSession tunerSession : mAidlTunerSessions) {
-                        tunerSession.onMergedProgramListUpdateFromHal(chunk);
+                        tunerSession.onMergedProgramListUpdateFromHal(programListChunk);
                     }
                 }
             });
diff --git a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
index 1efc4a5..978dc01 100644
--- a/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
+++ b/services/core/java/com/android/server/broadcastradio/hal2/TunerSession.java
@@ -21,6 +21,7 @@
 import android.graphics.Bitmap;
 import android.hardware.broadcastradio.V2_0.ConfigFlag;
 import android.hardware.broadcastradio.V2_0.ITunerSession;
+import android.hardware.broadcastradio.V2_0.ProgramListChunk;
 import android.hardware.broadcastradio.V2_0.Result;
 import android.hardware.radio.ITuner;
 import android.hardware.radio.ProgramList;
@@ -267,7 +268,7 @@
         }
     }
 
-    void onMergedProgramListUpdateFromHal(ProgramList.Chunk mergedChunk) {
+    void onMergedProgramListUpdateFromHal(ProgramListChunk mergedChunk) {
         List<ProgramList.Chunk> clientUpdateChunks = null;
         synchronized (mLock) {
             if (mProgramInfoCache == null) {
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index e072eeb..8736a53 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -3046,7 +3046,7 @@
 
     public static void sendMessage(Message message) {
         final SyncManager instance = getInstance();
-        if (instance != null) {
+        if (instance != null && instance.mSyncHandler != null) {
             instance.mSyncHandler.sendMessage(message);
         }
     }
diff --git a/services/core/java/com/android/server/content/SyncStorageEngine.java b/services/core/java/com/android/server/content/SyncStorageEngine.java
index b890bbd..9805fd3 100644
--- a/services/core/java/com/android/server/content/SyncStorageEngine.java
+++ b/services/core/java/com/android/server/content/SyncStorageEngine.java
@@ -1754,7 +1754,7 @@
                     eventType = parser.next();
                 } while (eventType != XmlPullParser.END_DOCUMENT);
             }
-        } catch (XmlPullParserException e) {
+        } catch (XmlPullParserException | ArrayIndexOutOfBoundsException e) {
             Slog.w(TAG, "Error reading accounts", e);
             return;
         } catch (java.io.IOException e) {
diff --git a/services/core/java/com/android/server/display/feature/display_flags.aconfig b/services/core/java/com/android/server/display/feature/display_flags.aconfig
index 4d8c02b..2c3c66e 100644
--- a/services/core/java/com/android/server/display/feature/display_flags.aconfig
+++ b/services/core/java/com/android/server/display/feature/display_flags.aconfig
@@ -7,4 +7,5 @@
     namespace: "display_manager"
     description: "Feature flag for Connected Display managment"
     bug: "280739508"
+    is_fixed_read_only: true
 }
diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java
index d88fe8a..d2aff25 100644
--- a/services/core/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/core/java/com/android/server/dreams/DreamManagerService.java
@@ -324,7 +324,8 @@
             pw.println("mWhenToDream=" + mWhenToDream);
             pw.println("mKeepDreamingWhenUnpluggingDefault=" + mKeepDreamingWhenUnpluggingDefault);
             pw.println("getDozeComponent()=" + getDozeComponent());
-            pw.println("mDreamOverlayServiceName=" + mDreamOverlayServiceName.flattenToString());
+            pw.println("mDreamOverlayServiceName="
+                    + ComponentName.flattenToShortString(mDreamOverlayServiceName));
             pw.println();
 
             DumpUtils.dumpAsync(mHandler, (pw1, prefix) -> mController.dump(pw1), pw, "", 200);
diff --git a/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java b/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
index 2ede56d..a2c8748 100644
--- a/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
+++ b/services/core/java/com/android/server/input/GestureMonitorSpyWindow.java
@@ -62,10 +62,10 @@
         mWindowHandle.ownerUid = uid;
         mWindowHandle.scaleFactor = 1.0f;
         mWindowHandle.replaceTouchableRegionWithCrop(null /* use this surface's bounds */);
-        mWindowHandle.inputConfig =
-                InputConfig.NOT_FOCUSABLE | InputConfig.SPY | InputConfig.TRUSTED_OVERLAY;
+        mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.SPY;
 
         final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+        mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
         t.setInputWindowInfo(mInputSurface, mWindowHandle);
         t.setLayer(mInputSurface, InputManagerService.INPUT_OVERLAY_LAYER_GESTURE_MONITOR);
         t.setPosition(mInputSurface, 0, 0);
diff --git a/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java b/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
index 7726f40..dbbbed3 100644
--- a/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
+++ b/services/core/java/com/android/server/inputmethod/HandwritingEventReceiverSurface.java
@@ -57,13 +57,13 @@
                 InputConfig.NOT_FOCUSABLE
                         | InputConfig.NOT_TOUCHABLE
                         | InputConfig.SPY
-                        | InputConfig.INTERCEPTS_STYLUS
-                        | InputConfig.TRUSTED_OVERLAY;
+                        | InputConfig.INTERCEPTS_STYLUS;
 
         // Configure the surface to receive stylus events across the entire display.
         mWindowHandle.replaceTouchableRegionWithCrop(null /* use this surface's bounds */);
 
         final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+        mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
         t.setInputWindowInfo(mInputSurface, mWindowHandle);
         t.setLayer(mInputSurface, InputManagerService.INPUT_OVERLAY_LAYER_HANDWRITING_SURFACE);
         t.setPosition(mInputSurface, 0, 0);
diff --git a/services/core/java/com/android/server/inputmethod/HandwritingModeController.java b/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
index 26df162..749d6b0 100644
--- a/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
+++ b/services/core/java/com/android/server/inputmethod/HandwritingModeController.java
@@ -224,6 +224,7 @@
     @Nullable
     HandwritingSession startHandwritingSession(
             int requestId, int imePid, int imeUid, IBinder focusedWindowToken) {
+        clearPendingHandwritingDelegation();
         if (mHandwritingSurface == null) {
             Slog.e(TAG, "Cannot start handwriting session: Handwriting was not initialized.");
             return null;
diff --git a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
index 2efb0be..b090334 100644
--- a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
+++ b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
@@ -259,19 +259,16 @@
                     .withZone(ZoneId.systemDefault());
 
             pw.print(prefix);
-            pw.println("ImeTrackerService#History.mLiveEntries: "
-                    + mLiveEntries.size() + " elements");
+            pw.println("mLiveEntries: " + mLiveEntries.size() + " elements");
 
             for (final var entry: mLiveEntries.values()) {
-                dumpEntry(entry, pw, prefix, formatter);
+                dumpEntry(entry, pw, prefix + "  ", formatter);
             }
-
             pw.print(prefix);
-            pw.println("ImeTrackerService#History.mEntries: "
-                    + mEntries.size() + " elements");
+            pw.println("mEntries: " + mEntries.size() + " elements");
 
             for (final var entry: mEntries) {
-                dumpEntry(entry, pw, prefix, formatter);
+                dumpEntry(entry, pw, prefix + "  ", formatter);
             }
         }
 
@@ -279,22 +276,22 @@
         private void dumpEntry(@NonNull Entry entry, @NonNull PrintWriter pw,
                 @NonNull String prefix, @NonNull DateTimeFormatter formatter) {
             pw.print(prefix);
-            pw.print(" #" + entry.mSequenceNumber);
+            pw.print("#" + entry.mSequenceNumber);
             pw.print(" " + ImeTracker.Debug.typeToString(entry.mType));
             pw.print(" - " + ImeTracker.Debug.statusToString(entry.mStatus));
             pw.print(" - " + entry.mTag);
             pw.println(" (" + entry.mDuration + "ms):");
 
             pw.print(prefix);
-            pw.print("   startTime=" + formatter.format(Instant.ofEpochMilli(entry.mStartTime)));
+            pw.print("  startTime=" + formatter.format(Instant.ofEpochMilli(entry.mStartTime)));
             pw.println(" " + ImeTracker.Debug.originToString(entry.mOrigin));
 
             pw.print(prefix);
-            pw.print("   reason=" + InputMethodDebug.softInputDisplayReasonToString(entry.mReason));
+            pw.print("  reason=" + InputMethodDebug.softInputDisplayReasonToString(entry.mReason));
             pw.println(" " + ImeTracker.Debug.phaseToString(entry.mPhase));
 
             pw.print(prefix);
-            pw.println("   requestWindowName=" + entry.mRequestWindowName);
+            pw.println("  requestWindowName=" + entry.mRequestWindowName);
         }
 
         /** A history entry. */
diff --git a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
index 2e0274b..0dd48ae 100644
--- a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
+++ b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
@@ -588,12 +588,12 @@
         proto.write(INPUT_SHOWN, mInputShown);
     }
 
-    void dump(PrintWriter pw) {
+    void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
         final Printer p = new PrintWriterPrinter(pw);
-        p.println(" mRequestedShowExplicitly=" + mRequestedShowExplicitly
+        p.println(prefix + "mRequestedShowExplicitly=" + mRequestedShowExplicitly
                 + " mShowForced=" + mShowForced);
-        p.println("  mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
-        p.println("  mInputShown=" + mInputShown);
+        p.println(prefix + "mImeHiddenByDisplayPolicy=" + mPolicy.isImeHiddenByDisplayPolicy());
+        p.println(prefix + "mInputShown=" + mInputShown);
     }
 
     /**
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
index 20c7029..2fe2271 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
@@ -70,7 +70,7 @@
     @NonNull private final WindowManagerInternal mWindowManagerInternal;
 
     @GuardedBy("ImfLock.class") private long mLastBindTime;
-    @GuardedBy("ImfLock.class") private boolean mHasConnection;
+    @GuardedBy("ImfLock.class") private boolean mHasMainConnection;
     @GuardedBy("ImfLock.class") @Nullable private String mCurId;
     @GuardedBy("ImfLock.class") @Nullable private String mSelectedMethodId;
     @GuardedBy("ImfLock.class") @Nullable private Intent mCurIntent;
@@ -137,8 +137,8 @@
      * a service (whether or not we have gotten its IBinder back yet).
      */
     @GuardedBy("ImfLock.class")
-    boolean hasConnection() {
-        return mHasConnection;
+    boolean hasMainConnection() {
+        return mHasMainConnection;
     }
 
     /**
@@ -369,7 +369,7 @@
             unbindVisibleConnection();
         }
 
-        if (hasConnection()) {
+        if (hasMainConnection()) {
             unbindMainConnection();
         }
 
@@ -464,7 +464,7 @@
     @GuardedBy("ImfLock.class")
     private void unbindMainConnection() {
         mContext.unbindService(mMainConnection);
-        mHasConnection = false;
+        mHasMainConnection = false;
     }
 
     @GuardedBy("ImfLock.class")
@@ -485,8 +485,9 @@
 
     @GuardedBy("ImfLock.class")
     private boolean bindCurrentInputMethodServiceMainConnection() {
-        mHasConnection = bindCurrentInputMethodService(mMainConnection, mImeConnectionBindFlags);
-        return mHasConnection;
+        mHasMainConnection = bindCurrentInputMethodService(mMainConnection,
+                mImeConnectionBindFlags);
+        return mHasMainConnection;
     }
 
     /**
@@ -499,7 +500,7 @@
     void setCurrentMethodVisible() {
         if (mCurMethod != null) {
             if (DEBUG) Slog.d(TAG, "setCurrentMethodVisible: mCurToken=" + mCurToken);
-            if (hasConnection() && !isVisibleBound()) {
+            if (hasMainConnection() && !isVisibleBound()) {
                 mVisibleBound = bindCurrentInputMethodService(mVisibleConnection,
                         IME_VISIBLE_BIND_FLAGS);
             }
@@ -507,7 +508,7 @@
         }
 
         // No IME is currently connected. Reestablish the main connection.
-        if (!hasConnection()) {
+        if (!hasMainConnection()) {
             if (DEBUG) {
                 Slog.d(TAG, "Cannot show input: no IME bound. Rebinding.");
             }
@@ -528,7 +529,7 @@
             bindCurrentInputMethodServiceMainConnection();
         } else {
             if (DEBUG) {
-                Slog.d(TAG, "Can't show input: connection = " + mHasConnection + ", time = "
+                Slog.d(TAG, "Can't show input: connection = " + mHasMainConnection + ", time = "
                         + (TIME_TO_RECONNECT - bindingDuration));
             }
         }
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 131eec3..699e9c8 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -358,12 +358,12 @@
 
         @Override
         public String toString() {
-            return "SessionState{uid " + mClient.mUid + " pid " + mClient.mPid
-                    + " method " + Integer.toHexString(
+            return "SessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
+                    + " method=" + Integer.toHexString(
                     IInputMethodInvoker.getBinderIdentityHashCode(mMethod))
-                    + " session " + Integer.toHexString(
+                    + " session=" + Integer.toHexString(
                     System.identityHashCode(mSession))
-                    + " channel " + mChannel
+                    + " channel=" + mChannel
                     + "}";
         }
 
@@ -388,9 +388,9 @@
 
         @Override
         public String toString() {
-            return "AccessibilitySessionState{uid " + mClient.mUid + " pid " + mClient.mPid
-                    + " id " + Integer.toHexString(mId)
-                    + " session " + Integer.toHexString(
+            return "AccessibilitySessionState{uid=" + mClient.mUid + " pid=" + mClient.mPid
+                    + " id=" + Integer.toHexString(mId)
+                    + " session=" + Integer.toHexString(
                     System.identityHashCode(mSession))
                     + "}";
         }
@@ -603,7 +603,7 @@
      */
     @GuardedBy("ImfLock.class")
     private boolean hasConnectionLocked() {
-        return mBindingController.hasConnection();
+        return mBindingController.hasMainConnection();
     }
 
     /** The token tracking the current IME request or {@code null} otherwise. */
@@ -884,47 +884,47 @@
                     continue;
                 }
                 pw.print(prefix);
-                pw.println("SoftInputShowHideHistory #" + entry.mSequenceNumber + ":");
+                pw.println("SoftInputShowHide #" + entry.mSequenceNumber + ":");
 
                 pw.print(prefix);
-                pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+                pw.println("  time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
                         + " (timestamp=" + entry.mTimestamp + ")");
 
                 pw.print(prefix);
-                pw.print(" reason=" + InputMethodDebug.softInputDisplayReasonToString(
+                pw.print("  reason=" + InputMethodDebug.softInputDisplayReasonToString(
                         entry.mReason));
                 pw.println(" inFullscreenMode=" + entry.mInFullscreenMode);
 
                 pw.print(prefix);
-                pw.println(" requestClient=" + entry.mClientState);
+                pw.println("  requestClient=" + entry.mClientState);
 
                 pw.print(prefix);
-                pw.println(" focusedWindowName=" + entry.mFocusedWindowName);
+                pw.println("  focusedWindowName=" + entry.mFocusedWindowName);
 
                 pw.print(prefix);
-                pw.println(" requestWindowName=" + entry.mRequestWindowName);
+                pw.println("  requestWindowName=" + entry.mRequestWindowName);
 
                 pw.print(prefix);
-                pw.println(" imeControlTargetName=" + entry.mImeControlTargetName);
+                pw.println("  imeControlTargetName=" + entry.mImeControlTargetName);
 
                 pw.print(prefix);
-                pw.println(" imeTargetNameFromWm=" + entry.mImeTargetNameFromWm);
+                pw.println("  imeTargetNameFromWm=" + entry.mImeTargetNameFromWm);
 
                 pw.print(prefix);
-                pw.println(" imeSurfaceParentName=" + entry.mImeSurfaceParentName);
+                pw.println("  imeSurfaceParentName=" + entry.mImeSurfaceParentName);
 
                 pw.print(prefix);
-                pw.print(" editorInfo: ");
+                pw.print("  editorInfo:");
                 if (entry.mEditorInfo != null) {
                     pw.print(" inputType=" + entry.mEditorInfo.inputType);
                     pw.print(" privateImeOptions=" + entry.mEditorInfo.privateImeOptions);
                     pw.println(" fieldId (viewId)=" + entry.mEditorInfo.fieldId);
                 } else {
-                    pw.println("null");
+                    pw.println(" null");
                 }
 
                 pw.print(prefix);
-                pw.println(" focusedWindowSoftInputMode=" + InputMethodDebug.softInputModeToString(
+                pw.println("  focusedWindowSoftInputMode=" + InputMethodDebug.softInputModeToString(
                         entry.mFocusedWindowSoftInputMode));
             }
         }
@@ -1052,30 +1052,30 @@
                 pw.println("StartInput #" + entry.mSequenceNumber + ":");
 
                 pw.print(prefix);
-                pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
+                pw.println("  time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime))
                         + " (timestamp=" + entry.mTimestamp + ")"
                         + " reason="
                         + InputMethodDebug.startInputReasonToString(entry.mStartInputReason)
                         + " restarting=" + entry.mRestarting);
 
                 pw.print(prefix);
-                pw.print(" imeToken=" + entry.mImeTokenString + " [" + entry.mImeId + "]");
+                pw.print("  imeToken=" + entry.mImeTokenString + " [" + entry.mImeId + "]");
                 pw.print(" imeUserId=" + entry.mImeUserId);
                 pw.println(" imeDisplayId=" + entry.mImeDisplayId);
 
                 pw.print(prefix);
-                pw.println(" targetWin=" + entry.mTargetWindowString
+                pw.println("  targetWin=" + entry.mTargetWindowString
                         + " [" + entry.mEditorInfo.packageName + "]"
                         + " targetUserId=" + entry.mTargetUserId
                         + " targetDisplayId=" + entry.mTargetDisplayId
                         + " clientBindSeq=" + entry.mClientBindSequenceNumber);
 
                 pw.print(prefix);
-                pw.println(" softInputMode=" + InputMethodDebug.softInputModeToString(
+                pw.println("  softInputMode=" + InputMethodDebug.softInputModeToString(
                         entry.mTargetWindowSoftInputMode));
 
                 pw.print(prefix);
-                pw.println(" inputType=0x" + Integer.toHexString(entry.mEditorInfo.inputType)
+                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
@@ -3369,13 +3369,19 @@
     @BinderThread
     @Override
     public void startStylusHandwriting(IInputMethodClient client) {
+        startStylusHandwriting(client, false /* usesDelegation */);
+    }
+
+    private void startStylusHandwriting(IInputMethodClient client, boolean usesDelegation) {
         Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.startStylusHandwriting");
         try {
             ImeTracing.getInstance().triggerManagerServiceDump(
                     "InputMethodManagerService#startStylusHandwriting");
             int uid = Binder.getCallingUid();
             synchronized (ImfLock.class) {
-                mHwController.clearPendingHandwritingDelegation();
+                if (!usesDelegation) {
+                    mHwController.clearPendingHandwritingDelegation();
+                }
                 if (!canInteractWithImeLocked(uid, client, "startStylusHandwriting",
                         null /* statsToken */)) {
                     return;
@@ -3457,7 +3463,7 @@
             return false;
         }
 
-        startStylusHandwriting(client);
+        startStylusHandwriting(client, true /* usesDelegation */);
         return true;
     }
 
@@ -5946,11 +5952,11 @@
                 p.println("  InputMethod #" + i + ":");
                 info.dump(p, "    ");
             }
-            p.println("  Clients:");
+            p.println("  ClientStates:");
             final int numClients = mClients.size();
             for (int i = 0; i < numClients; ++i) {
                 final ClientState ci = mClients.valueAt(i);
-                p.println("  Client " + ci + ":");
+                p.println("  " + ci + ":");
                 p.println("    client=" + ci.mClient);
                 p.println("    fallbackInputConnection=" + ci.mFallbackInputConnection);
                 p.println("    sessionRequested=" + ci.mSessionRequested);
@@ -5977,7 +5983,7 @@
             method = getCurMethodLocked();
             p.println("  mCurMethod=" + getCurMethodLocked());
             p.println("  mEnabledSession=" + mEnabledSession);
-            mVisibilityStateComputer.dump(pw);
+            mVisibilityStateComputer.dump(pw, "  ");
             p.println("  mInFullscreenMode=" + mInFullscreenMode);
             p.println("  mSystemReady=" + mSystemReady + " mInteractive=" + mIsInteractive);
             p.println("  ENABLE_HIDE_IME_CAPTION_BAR="
@@ -5991,13 +5997,13 @@
             mSettings.dumpLocked(p, "    ");
 
             p.println("  mStartInputHistory:");
-            mStartInputHistory.dump(pw, "   ");
+            mStartInputHistory.dump(pw, "    ");
 
             p.println("  mSoftInputShowHideHistory:");
-            mSoftInputShowHideHistory.dump(pw, "   ");
+            mSoftInputShowHideHistory.dump(pw, "    ");
 
             p.println("  mImeTrackerService#History:");
-            mImeTrackerService.dump(pw, "   ");
+            mImeTrackerService.dump(pw, "    ");
         }
 
         // Exit here for critical dump, as remaining sections require IPCs to other processes.
diff --git a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
index 4873467..7cf6eae 100644
--- a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
+++ b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java
@@ -154,6 +154,23 @@
     }
 
     /**
+     * Returns whether the given uid corresponds to the last process to audio or not.
+     *
+     * <p> This is useful for handling the cases where the foreground app is playing media without
+     * a media session. Then, volume events should affect the local music stream rather than other
+     * media sessions.
+     *
+     * @return {@code true} if the given uid corresponds to the last process to audio or
+     * {@code false} otherwise.
+     */
+    public boolean hasUidPlayedAudioLast(int uid) {
+        synchronized (mLock) {
+            return !mSortedAudioPlaybackClientUids.isEmpty()
+                    && uid == mSortedAudioPlaybackClientUids.get(0);
+        }
+    }
+
+    /**
      * Returns if the audio playback is active for the uid.
      */
     public boolean isPlaybackActive(int uid) {
@@ -234,7 +251,7 @@
                     }
                 }
 
-                // Update mSortedAuioPlaybackClientUids.
+                // Update mSortedAudioPlaybackClientUids.
                 for (int i = 0; i < activeAudioPlaybackConfigs.size(); ++i) {
                     AudioPlaybackConfiguration config = activeAudioPlaybackConfigs.valueAt(i);
                     final int uid = config.getClientUid();
diff --git a/services/core/java/com/android/server/media/BluetoothRouteController.java b/services/core/java/com/android/server/media/BluetoothRouteController.java
index 66985e0..ddeeacc 100644
--- a/services/core/java/com/android/server/media/BluetoothRouteController.java
+++ b/services/core/java/com/android/server/media/BluetoothRouteController.java
@@ -24,6 +24,8 @@
 import android.media.MediaRoute2Info;
 import android.os.UserHandle;
 
+import com.android.media.flags.Flags;
+
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
@@ -53,15 +55,10 @@
             return new NoOpBluetoothRouteController();
         }
 
-        MediaFeatureFlagManager flagManager = MediaFeatureFlagManager.getInstance();
-        boolean isUsingLegacyController = flagManager.getBoolean(
-                MediaFeatureFlagManager.FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
-                true);
-
-        if (isUsingLegacyController) {
-            return new LegacyBluetoothRouteController(context, btAdapter, listener);
-        } else {
+        if (Flags.enableAudioPoliciesDeviceAndBluetoothController()) {
             return new AudioPoliciesBluetoothRouteController(context, btAdapter, listener);
+        } else {
+            return new LegacyBluetoothRouteController(context, btAdapter, listener);
         }
     }
 
diff --git a/services/core/java/com/android/server/media/DeviceRouteController.java b/services/core/java/com/android/server/media/DeviceRouteController.java
index 3875c84..e17f4a3 100644
--- a/services/core/java/com/android/server/media/DeviceRouteController.java
+++ b/services/core/java/com/android/server/media/DeviceRouteController.java
@@ -25,6 +25,8 @@
 import android.media.MediaRoute2Info;
 import android.os.ServiceManager;
 
+import com.android.media.flags.Flags;
+
 /**
  * Controls device routes.
  *
@@ -44,18 +46,13 @@
         IAudioService audioService = IAudioService.Stub.asInterface(
                 ServiceManager.getService(Context.AUDIO_SERVICE));
 
-        MediaFeatureFlagManager flagManager = MediaFeatureFlagManager.getInstance();
-        boolean isUsingLegacyController = flagManager.getBoolean(
-                MediaFeatureFlagManager.FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
-                true);
-
-        if (isUsingLegacyController) {
-            return new LegacyDeviceRouteController(context,
+        if (Flags.enableAudioPoliciesDeviceAndBluetoothController()) {
+            return new AudioPoliciesDeviceRouteController(context,
                     audioManager,
                     audioService,
                     onDeviceRouteChangedListener);
         } else {
-            return new AudioPoliciesDeviceRouteController(context,
+            return new LegacyDeviceRouteController(context,
                     audioManager,
                     audioService,
                     onDeviceRouteChangedListener);
diff --git a/services/core/java/com/android/server/media/MediaFeatureFlagManager.java b/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
index f555505..f90f64a 100644
--- a/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
+++ b/services/core/java/com/android/server/media/MediaFeatureFlagManager.java
@@ -36,7 +36,6 @@
     @StringDef(
             prefix = "FEATURE_",
             value = {
-                FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER,
                 FEATURE_SCANNING_MINIMUM_PACKAGE_IMPORTANCE
             })
     @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@@ -44,14 +43,6 @@
     /* package */ @interface MediaFeatureFlag {}
 
     /**
-     * Whether to use old legacy implementation of BluetoothRouteController or new
-     * 'Audio Strategies'-aware controller.
-     */
-    /* package */ static final @MediaFeatureFlag String
-            FEATURE_AUDIO_STRATEGIES_IS_USING_LEGACY_CONTROLLER =
-            "BluetoothRouteController__enable_legacy_bluetooth_routes_controller";
-
-    /**
      * Whether to use IMPORTANCE_FOREGROUND (i.e. 100) or IMPORTANCE_FOREGROUND_SERVICE (i.e. 125)
      * as the minimum package importance for scanning.
      */
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index 5b87069..4892c22 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -22,7 +22,6 @@
 import static android.media.MediaRoute2ProviderService.REASON_UNKNOWN_ERROR;
 import static android.media.MediaRouter2Utils.getOriginalId;
 import static android.media.MediaRouter2Utils.getProviderId;
-
 import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
 import static com.android.server.media.MediaFeatureFlagManager.FEATURE_SCANNING_MINIMUM_PACKAGE_IMPORTANCE;
 
@@ -214,17 +213,16 @@
     @NonNull
     public List<MediaRoute2Info> getSystemRoutes() {
         final int uid = Binder.getCallingUid();
+        final int pid = Binder.getCallingPid();
         final int userId = UserHandle.getUserHandleForUid(uid).getIdentifier();
-        final boolean hasModifyAudioRoutingPermission = mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-                == PackageManager.PERMISSION_GRANTED;
+        final boolean hasSystemRoutingPermission = checkCallerHasSystemRoutingPermissions(pid, uid);
 
         final long token = Binder.clearCallingIdentity();
         try {
             Collection<MediaRoute2Info> systemRoutes;
             synchronized (mLock) {
                 UserRecord userRecord = getOrCreateUserRecordLocked(userId);
-                if (hasModifyAudioRoutingPermission) {
+                if (hasSystemRoutingPermission) {
                     MediaRoute2ProviderInfo providerInfo =
                             userRecord.mHandler.mSystemProvider.getProviderInfo();
                     if (providerInfo != null) {
@@ -255,9 +253,8 @@
         final boolean hasConfigureWifiDisplayPermission = mContext.checkCallingOrSelfPermission(
                 android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
                 == PackageManager.PERMISSION_GRANTED;
-        final boolean hasModifyAudioRoutingPermission = mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-                == PackageManager.PERMISSION_GRANTED;
+        final boolean hasModifyAudioRoutingPermission =
+                checkCallerHasModifyAudioRoutingPermission(pid, uid);
 
         final long token = Binder.clearCallingIdentity();
         try {
@@ -666,17 +663,17 @@
     public RoutingSessionInfo getSystemSessionInfo(
             @Nullable String packageName, boolean setDeviceRouteSelected) {
         final int uid = Binder.getCallingUid();
+        final int pid = Binder.getCallingPid();
         final int userId = UserHandle.getUserHandleForUid(uid).getIdentifier();
-        final boolean hasModifyAudioRoutingPermission = mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-                == PackageManager.PERMISSION_GRANTED;
+        final boolean hasSystemRoutingPermissions =
+                checkCallerHasSystemRoutingPermissions(pid, uid);
 
         final long token = Binder.clearCallingIdentity();
         try {
             synchronized (mLock) {
                 UserRecord userRecord = getOrCreateUserRecordLocked(userId);
                 List<RoutingSessionInfo> sessionInfos;
-                if (hasModifyAudioRoutingPermission) {
+                if (hasSystemRoutingPermissions) {
                     if (setDeviceRouteSelected) {
                         // Return a fake system session that shows the device route as selected and
                         // available bluetooth routes as transferable.
@@ -707,6 +704,25 @@
         }
     }
 
+    private boolean checkCallerHasSystemRoutingPermissions(int pid, int uid) {
+        return checkCallerHasModifyAudioRoutingPermission(pid, uid);
+    }
+
+    private boolean checkCallerHasModifyAudioRoutingPermission(int pid, int uid) {
+        return mContext.checkPermission(Manifest.permission.MODIFY_AUDIO_ROUTING, pid, uid)
+                == PackageManager.PERMISSION_GRANTED;
+    }
+
+    private boolean checkCallerHasBluetoothPermissions(int pid, int uid) {
+        boolean hasBluetoothRoutingPermission = true;
+        for (String permission : BLUETOOTH_PERMISSIONS_FOR_SYSTEM_ROUTING) {
+            hasBluetoothRoutingPermission &=
+                    mContext.checkPermission(permission, pid, uid)
+                            == PackageManager.PERMISSION_GRANTED;
+        }
+        return hasBluetoothRoutingPermission;
+    }
+
     // End of methods that implements operations for both MediaRouter2 and MediaRouter2Manager.
 
     public void dump(@NonNull PrintWriter pw, @NonNull String prefix) {
@@ -1587,20 +1603,11 @@
             mPid = pid;
             mHasConfigureWifiDisplayPermission = hasConfigureWifiDisplayPermission;
             mHasModifyAudioRoutingPermission = hasModifyAudioRoutingPermission;
-            mHasBluetoothRoutingPermission = new AtomicBoolean(fetchBluetoothPermission());
+            mHasBluetoothRoutingPermission =
+                    new AtomicBoolean(checkCallerHasBluetoothPermissions(mPid, mUid));
             mRouterId = mNextRouterOrManagerId.getAndIncrement();
         }
 
-        private boolean fetchBluetoothPermission() {
-            boolean hasBluetoothRoutingPermission = true;
-            for (String permission : BLUETOOTH_PERMISSIONS_FOR_SYSTEM_ROUTING) {
-                hasBluetoothRoutingPermission &=
-                        mContext.checkPermission(permission, mPid, mUid)
-                                == PackageManager.PERMISSION_GRANTED;
-            }
-            return hasBluetoothRoutingPermission;
-        }
-
         /**
          * Returns whether the corresponding router has permission to query and control system
          * routes.
@@ -1611,7 +1618,7 @@
 
         public void maybeUpdateSystemRoutingPermissionLocked() {
             boolean oldSystemRoutingPermissionValue = hasSystemRoutingPermission();
-            mHasBluetoothRoutingPermission.set(fetchBluetoothPermission());
+            mHasBluetoothRoutingPermission.set(checkCallerHasBluetoothPermissions(mPid, mUid));
             boolean newSystemRoutingPermissionValue = hasSystemRoutingPermission();
             if (oldSystemRoutingPermissionValue != newSystemRoutingPermissionValue) {
                 Map<String, MediaRoute2Info> routesToReport =
@@ -2093,34 +2100,36 @@
             if (!hasAddedOrModifiedRoutes && !hasRemovedRoutes) {
                 return;
             }
-            List<RouterRecord> routerRecordsWithModifyAudioRoutingPermission =
-                    getRouterRecords(true);
-            List<RouterRecord> routerRecordsWithoutModifyAudioRoutingPermission =
-                    getRouterRecords(false);
+            List<RouterRecord> routerRecordsWithSystemRoutingPermission =
+                    getRouterRecords(/* hasSystemRoutingPermission= */ true);
+            List<RouterRecord> routerRecordsWithoutSystemRoutingPermission =
+                    getRouterRecords(/* hasSystemRoutingPermission= */ false);
             List<IMediaRouter2Manager> managers = getManagers();
 
             // Managers receive all provider updates with all routes.
             notifyRoutesUpdatedToManagers(
                     managers, new ArrayList<>(mLastNotifiedRoutesToPrivilegedRouters.values()));
 
-            // Routers with modify audio permission (usually system routers) receive all provider
-            // updates with all routes.
+            // Routers with system routing access (either via {@link MODIFY_AUDIO_ROUTING} or
+            // {@link BLUETOOTH_CONNECT} + {@link BLUETOOTH_SCAN}) receive all provider updates
+            // with all routes.
             notifyRoutesUpdatedToRouterRecords(
-                    routerRecordsWithModifyAudioRoutingPermission,
+                    routerRecordsWithSystemRoutingPermission,
                     new ArrayList<>(mLastNotifiedRoutesToPrivilegedRouters.values()));
 
             if (!isSystemProvider) {
                 // Regular routers receive updates from all non-system providers with all non-system
                 // routes.
                 notifyRoutesUpdatedToRouterRecords(
-                        routerRecordsWithoutModifyAudioRoutingPermission,
+                        routerRecordsWithoutSystemRoutingPermission,
                         new ArrayList<>(mLastNotifiedRoutesToNonPrivilegedRouters.values()));
             } else if (hasAddedOrModifiedRoutes) {
-                // On system provider updates, regular routers receive the updated default route.
-                // This is the only system route they should receive.
+                // On system provider updates, routers without system routing access
+                // receive the updated default route. This is the only system route they should
+                // receive.
                 mLastNotifiedRoutesToNonPrivilegedRouters.put(defaultRoute.getId(), defaultRoute);
                 notifyRoutesUpdatedToRouterRecords(
-                        routerRecordsWithoutModifyAudioRoutingPermission,
+                        routerRecordsWithoutSystemRoutingPermission,
                         new ArrayList<>(mLastNotifiedRoutesToNonPrivilegedRouters.values()));
             }
         }
@@ -2526,7 +2535,7 @@
             }
         }
 
-        private List<RouterRecord> getRouterRecords(boolean hasModifyAudioRoutingPermission) {
+        private List<RouterRecord> getRouterRecords(boolean hasSystemRoutingPermission) {
             MediaRouter2ServiceImpl service = mServiceRef.get();
             List<RouterRecord> routerRecords = new ArrayList<>();
             if (service == null) {
@@ -2534,7 +2543,7 @@
             }
             synchronized (service.mLock) {
                 for (RouterRecord routerRecord : mUserRecord.mRouterRecords) {
-                    if (hasModifyAudioRoutingPermission
+                    if (hasSystemRoutingPermission
                             == routerRecord.hasSystemRoutingPermission()) {
                         routerRecords.add(routerRecord);
                     }
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index f4c9518..803ab28 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -19,7 +19,6 @@
 import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
 import static android.os.UserHandle.ALL;
 import static android.os.UserHandle.CURRENT;
-
 import static com.android.server.media.MediaKeyDispatcher.KEY_EVENT_LONG_PRESS;
 import static com.android.server.media.MediaKeyDispatcher.isDoubleTapOverridden;
 import static com.android.server.media.MediaKeyDispatcher.isLongPressOverridden;
@@ -85,6 +84,7 @@
 
 import com.android.internal.R;
 import com.android.internal.annotations.GuardedBy;
+import com.android.media.flags.Flags;
 import com.android.server.LocalManagerRegistry;
 import com.android.server.LocalServices;
 import com.android.server.SystemService;
@@ -2192,6 +2192,21 @@
                     isValidLocalStreamType(suggestedStream)
                             && AudioSystem.isStreamActive(suggestedStream, 0);
 
+            if (session != null && session.getUid() != uid
+                    && mAudioPlayerStateMonitor.hasUidPlayedAudioLast(uid)) {
+                if (Flags.adjustVolumeForForegroundAppPlayingAudioWithoutMediaSession()) {
+                    // The app in the foreground has been the last app to play media locally.
+                    // Therefore, We ignore the chosen session so that volume events affect the
+                    // local music stream instead. See b/275185436 for details.
+                    Log.d(TAG, "Ignoring session=" + session + " and adjusting suggestedStream="
+                            + suggestedStream + " instead");
+                    session = null;
+                } else {
+                    Log.d(TAG, "Session=" + session + " will not be not ignored and will receive"
+                            + " the volume adjustment event");
+                }
+            }
+
             if (session == null || preferSuggestedStream) {
                 if (DEBUG_KEY_EVENT) {
                     Log.d(TAG, "Adjusting suggestedStream=" + suggestedStream + " by " + direction
diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
index 515c7fb..69e4a5b 100644
--- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
+++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
@@ -951,9 +951,6 @@
                     throw new SecurityException("Media projections require a foreground service"
                             + " of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION");
                 }
-
-                mCallback = callback;
-                registerCallback(mCallback);
                 try {
                     mToken = callback.asBinder();
                     mDeathEater = () -> {
@@ -998,6 +995,11 @@
                     }
                 }
                 startProjectionLocked(this);
+
+                // Register new callbacks after stop has been dispatched to previous session.
+                mCallback = callback;
+                registerCallback(mCallback);
+
                 // Mark this token as used when the app gets the MediaProjection instance.
                 mCountStarts++;
             }
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index ec071a7..6a5b9d8 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2047,7 +2047,6 @@
     protected class StrongAuthTracker extends LockPatternUtils.StrongAuthTracker {
 
         SparseBooleanArray mUserInLockDownMode = new SparseBooleanArray();
-        boolean mIsInLockDownMode = false;
 
         StrongAuthTracker(Context context) {
             super(context);
@@ -6631,8 +6630,7 @@
         }
     };
 
-    @VisibleForTesting
-    static boolean isBigPictureWithBitmapOrIcon(Notification n) {
+    private static boolean isBigPictureWithBitmapOrIcon(Notification n) {
         final boolean isBigPicture = n.isStyle(Notification.BigPictureStyle.class);
         if (!isBigPicture) {
             return false;
@@ -6650,15 +6648,12 @@
         return false;
     }
 
-    @VisibleForTesting
-    // TODO(b/298414239) Unit test via public API
-    static boolean isBitmapExpired(long timePostedMs, long timeNowMs, long timeToLiveMs) {
+    private static boolean isBitmapExpired(long timePostedMs, long timeNowMs, long timeToLiveMs) {
         final long timeDiff = timeNowMs - timePostedMs;
         return timeDiff > timeToLiveMs;
     }
 
-    @VisibleForTesting
-    void removeBitmapAndRepost(NotificationRecord r) {
+    private void removeBitmapAndRepost(NotificationRecord r) {
         if (!isBigPictureWithBitmapOrIcon(r.getNotification())) {
             return;
         }
diff --git a/services/core/java/com/android/server/notification/OWNERS b/services/core/java/com/android/server/notification/OWNERS
index 6c4dd6d..72c4529 100644
--- a/services/core/java/com/android/server/notification/OWNERS
+++ b/services/core/java/com/android/server/notification/OWNERS
@@ -1,4 +1,4 @@
-# Bug component: 34005
+# Bug component: 1305560
 
 juliacr@google.com
 yurilin@google.com
diff --git a/services/core/java/com/android/server/pm/Android.bp b/services/core/java/com/android/server/pm/Android.bp
deleted file mode 100644
index 89c0124..0000000
--- a/services/core/java/com/android/server/pm/Android.bp
+++ /dev/null
@@ -1,12 +0,0 @@
-aconfig_declarations {
-    name: "pm_flags",
-    package: "com.android.server.pm",
-    srcs: [
-        "*.aconfig",
-    ],
-}
-
-java_aconfig_library {
-    name: "pm_flags_lib",
-    aconfig_declarations: "pm_flags",
-}
diff --git a/services/core/java/com/android/server/pm/AppDataHelper.java b/services/core/java/com/android/server/pm/AppDataHelper.java
index f95f7bc..bd9be30 100644
--- a/services/core/java/com/android/server/pm/AppDataHelper.java
+++ b/services/core/java/com/android/server/pm/AppDataHelper.java
@@ -17,7 +17,6 @@
 package com.android.server.pm;
 
 import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;
-
 import static com.android.server.pm.PackageManagerService.TAG;
 import static com.android.server.pm.PackageManagerServiceUtils.getPackageManagerLocal;
 import static com.android.server.pm.PackageManagerServiceUtils.logCriticalInfo;
@@ -228,7 +227,7 @@
                 userId, flags, appId, seInfo, targetSdkVersion, usesSdk);
         args.previousAppId = previousAppId;
 
-        return batch.createAppData(args).whenComplete((ceDataInode, e) -> {
+        return batch.createAppData(args).whenComplete((createAppDataResult, e) -> {
             // Note: this code block is executed with the Installer lock
             // already held, since it's invoked as a side-effect of
             // executeBatchLI()
@@ -237,7 +236,7 @@
                         + ", but trying to recover: " + e);
                 destroyAppDataLeafLIF(pkg, userId, flags);
                 try {
-                    ceDataInode = mInstaller.createAppData(args).ceDataInode;
+                    createAppDataResult = mInstaller.createAppData(args);
                     logCriticalInfo(Log.DEBUG, "Recovery succeeded!");
                 } catch (Installer.InstallerException e2) {
                     logCriticalInfo(Log.DEBUG, "Recovery failed!");
@@ -279,12 +278,19 @@
                 }
             }
 
+            final long ceDataInode = createAppDataResult.ceDataInode;
+            final long deDataInode = createAppDataResult.deDataInode;
+
             if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && ceDataInode != -1) {
-                // TODO: mark this structure as dirty so we persist it!
                 synchronized (mPm.mLock) {
                     ps.setCeDataInode(ceDataInode, userId);
                 }
             }
+            if ((flags & StorageManager.FLAG_STORAGE_DE) != 0 && deDataInode != -1) {
+                synchronized (mPm.mLock) {
+                    ps.setDeDataInode(deDataInode, userId);
+                }
+            }
 
             prepareAppDataContentsLeafLIF(pkg, ps, userId, flags);
         });
@@ -609,7 +615,7 @@
         destroyAppDataLeafLIF(pkg, userId, flags);
     }
 
-    public void destroyAppDataLeafLIF(AndroidPackage pkg, int userId, int flags) {
+    private void destroyAppDataLeafLIF(AndroidPackage pkg, int userId, int flags) {
         final Computer snapshot = mPm.snapshotComputer();
         final PackageStateInternal packageStateInternal =
                 snapshot.getPackageStateInternal(pkg.getPackageName());
diff --git a/services/core/java/com/android/server/pm/ComputerEngine.java b/services/core/java/com/android/server/pm/ComputerEngine.java
index 69a6c13..ffa2af1 100644
--- a/services/core/java/com/android/server/pm/ComputerEngine.java
+++ b/services/core/java/com/android/server/pm/ComputerEngine.java
@@ -58,6 +58,7 @@
 import static com.android.server.pm.PackageManagerService.EMPTY_INT_ARRAY;
 import static com.android.server.pm.PackageManagerService.HIDE_EPHEMERAL_APIS;
 import static com.android.server.pm.PackageManagerService.TAG;
+import static com.android.server.pm.PackageManagerServiceUtils.compareSignatureArrays;
 import static com.android.server.pm.PackageManagerServiceUtils.compareSignatures;
 import static com.android.server.pm.PackageManagerServiceUtils.isSystemOrRootOrShell;
 import static com.android.server.pm.resolution.ComponentResolver.RESOLVE_PRIORITY_SORTER;
@@ -4215,8 +4216,7 @@
         if (p2SigningDetails == null) {
             return PackageManager.SIGNATURE_SECOND_NOT_SIGNED;
         }
-        int result = compareSignatures(p1SigningDetails.getSignatures(),
-                p2SigningDetails.getSignatures());
+        int result = compareSignatures(p1SigningDetails, p2SigningDetails);
         if (result == PackageManager.SIGNATURE_MATCH) {
             return result;
         }
@@ -4231,7 +4231,7 @@
             Signature[] p2Signatures = p2SigningDetails.hasPastSigningCertificates()
                     ? new Signature[]{p2SigningDetails.getPastSigningCertificates()[0]}
                     : p2SigningDetails.getSignatures();
-            result = compareSignatures(p1Signatures, p2Signatures);
+            result = compareSignatureArrays(p1Signatures, p2Signatures);
         }
         return result;
     }
diff --git a/services/core/java/com/android/server/pm/DeletePackageHelper.java b/services/core/java/com/android/server/pm/DeletePackageHelper.java
index 4d3bf400..7d59210 100644
--- a/services/core/java/com/android/server/pm/DeletePackageHelper.java
+++ b/services/core/java/com/android/server/pm/DeletePackageHelper.java
@@ -464,10 +464,7 @@
                         if (DEBUG_REMOVE) Slog.d(TAG, "Still installed by other users");
                         clearPackageStateAndReturn = true;
                     } else {
-                        // We need to set it back to 'installed' so the uninstall
-                        // broadcasts will be sent correctly.
                         if (DEBUG_REMOVE) Slog.d(TAG, "Not installed by other users, full delete");
-                        ps.setInstalled(true, userId);
                         mPm.mSettings.writeKernelMappingLPr(ps);
                         clearPackageStateAndReturn = false;
                     }
@@ -572,6 +569,7 @@
 
             ps.setUserState(nextUserId,
                     ps.getCeDataInode(nextUserId),
+                    ps.getDeDataInode(nextUserId),
                     COMPONENT_ENABLED_STATE_DEFAULT,
                     false /*installed*/,
                     true /*stopped*/,
diff --git a/services/core/java/com/android/server/pm/IPackageManagerBase.java b/services/core/java/com/android/server/pm/IPackageManagerBase.java
index 8f7b721..76203ac 100644
--- a/services/core/java/com/android/server/pm/IPackageManagerBase.java
+++ b/services/core/java/com/android/server/pm/IPackageManagerBase.java
@@ -30,7 +30,6 @@
 import android.content.IntentFilter;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.IPackageArchiverService;
 import android.content.pm.IPackageDeleteObserver;
 import android.content.pm.IPackageDeleteObserver2;
 import android.content.pm.IPackageInstaller;
@@ -100,9 +99,6 @@
     private final PackageInstallerService mInstallerService;
 
     @NonNull
-    private final PackageArchiverService mPackageArchiverService;
-
-    @NonNull
     private final PackageProperty mPackageProperty;
 
     @NonNull
@@ -131,8 +127,7 @@
             @Nullable ComponentName instantAppResolverSettingsComponent,
             @NonNull String requiredSupplementalProcessPackage,
             @Nullable String servicesExtensionPackageName,
-            @Nullable String sharedSystemSharedLibraryPackageName,
-            @NonNull PackageArchiverService packageArchiverService) {
+            @Nullable String sharedSystemSharedLibraryPackageName) {
         mService = service;
         mContext = context;
         mDexOptHelper = dexOptHelper;
@@ -148,7 +143,6 @@
         mRequiredSupplementalProcessPackage = requiredSupplementalProcessPackage;
         mServicesExtensionPackageName = servicesExtensionPackageName;
         mSharedSystemSharedLibraryPackageName = sharedSystemSharedLibraryPackageName;
-        mPackageArchiverService = packageArchiverService;
     }
 
     protected Computer snapshot() {
@@ -622,12 +616,6 @@
 
     @Override
     @Deprecated
-    public final IPackageArchiverService getPackageArchiverService() {
-        return mPackageArchiverService;
-    }
-
-    @Override
-    @Deprecated
     public final void getPackageSizeInfo(final String packageName, int userId,
             final IPackageStatsObserver observer) {
         throw new UnsupportedOperationException(
diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java
index d668146..2ee0706 100644
--- a/services/core/java/com/android/server/pm/InstallPackageHelper.java
+++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java
@@ -56,7 +56,6 @@
 import static com.android.server.pm.PackageManagerService.DEBUG_REMOVE;
 import static com.android.server.pm.PackageManagerService.DEBUG_UPGRADE;
 import static com.android.server.pm.PackageManagerService.DEBUG_VERIFY;
-import static com.android.server.pm.PackageManagerService.EMPTY_INT_ARRAY;
 import static com.android.server.pm.PackageManagerService.MIN_INSTALLABLE_TARGET_SDK;
 import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
 import static com.android.server.pm.PackageManagerService.POST_INSTALL;
@@ -180,7 +179,6 @@
 import com.android.server.pm.permission.Permission;
 import com.android.server.pm.permission.PermissionManagerServiceInternal;
 import com.android.server.pm.pkg.AndroidPackage;
-import com.android.server.pm.pkg.PackageState;
 import com.android.server.pm.pkg.PackageStateInternal;
 import com.android.server.pm.pkg.SharedLibraryWrapper;
 import com.android.server.pm.pkg.component.ComponentMutateUtils;
@@ -1245,6 +1243,7 @@
         boolean systemApp = false;
         boolean replace = false;
         synchronized (mPm.mLock) {
+            final PackageSetting ps = mPm.mSettings.getPackageLPr(pkgName);
             // Check if installing already existing package
             if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
                 String oldName = mPm.mSettings.getRenamedPackageLPr(pkgName);
@@ -1261,16 +1260,15 @@
                         Slog.d(TAG, "Replacing existing renamed package: oldName="
                                 + oldName + " pkgName=" + pkgName);
                     }
-                } else if (mPm.mPackages.containsKey(pkgName)) {
+                } else if (ps != null) {
                     // This package, under its official name, already exists
                     // on the device; we should replace it.
                     replace = true;
                     if (DEBUG_INSTALL) Slog.d(TAG, "Replace existing package: " + pkgName);
                 }
-
-                if (replace) {
+                final AndroidPackage oldPackage = mPm.mPackages.get(pkgName);
+                if (replace && oldPackage != null) {
                     // Prevent apps opting out from runtime permissions
-                    AndroidPackage oldPackage = mPm.mPackages.get(pkgName);
                     final int oldTargetSdk = oldPackage.getTargetSdkVersion();
                     final int newTargetSdk = parsedPackage.getTargetSdkVersion();
                     if (oldTargetSdk > Build.VERSION_CODES.LOLLIPOP_MR1
@@ -1292,7 +1290,6 @@
                 }
             }
 
-            PackageSetting ps = mPm.mSettings.getPackageLPr(pkgName);
             PackageSetting signatureCheckPs = ps;
 
             // SDK libs can have other major versions with different package names.
@@ -1368,8 +1365,8 @@
                 if (DEBUG_INSTALL) Slog.d(TAG, "Existing package: " + ps);
 
                 systemApp = ps.isSystem();
-                request.setOriginUsers(
-                        ps.queryInstalledUsers(mPm.mUserManager.getUserIds(), true));
+                request.setOriginUsers(ps.queryUsersInstalledOrHasData(
+                        mPm.mUserManager.getUserIds()));
             }
 
             final int numGroups = ArrayUtils.size(parsedPackage.getPermissionGroups());
@@ -1595,7 +1592,7 @@
 
         boolean shouldCloseFreezerBeforeReturn = true;
         try {
-            final PackageState oldPackageState;
+            final PackageSetting oldPackageState;
             final AndroidPackage oldPackage;
             String renamedPackage;
             boolean sysPkg = false;
@@ -1648,7 +1645,7 @@
                         }
                     } else {
                         SigningDetails parsedPkgSigningDetails = parsedPackage.getSigningDetails();
-                        SigningDetails oldPkgSigningDetails = oldPackage.getSigningDetails();
+                        SigningDetails oldPkgSigningDetails = oldPackageState.getSigningDetails();
                         // default to original signature matching
                         if (!parsedPkgSigningDetails.checkCapability(oldPkgSigningDetails,
                                 SigningDetails.CertCapabilities.INSTALLED_DATA)
@@ -1668,7 +1665,8 @@
                     }
 
                     // don't allow a system upgrade unless the upgrade hash matches
-                    if (oldPackage.getRestrictUpdateHash() != null && oldPackageState.isSystem()) {
+                    if (oldPackage != null && oldPackage.getRestrictUpdateHash() != null
+                            && oldPackageState.isSystem()) {
                         final byte[] digestBytes;
                         try {
                             final MessageDigest digest = MessageDigest.getInstance("SHA-512");
@@ -1691,23 +1689,26 @@
                         parsedPackage.setRestrictUpdateHash(oldPackage.getRestrictUpdateHash());
                     }
 
-                    // APK should not change its sharedUserId declarations
-                    final var oldSharedUid = oldPackage.getSharedUserId() != null
-                            ? oldPackage.getSharedUserId() : "<nothing>";
-                    final var newSharedUid = parsedPackage.getSharedUserId() != null
-                            ? parsedPackage.getSharedUserId() : "<nothing>";
-                    if (!oldSharedUid.equals(newSharedUid)) {
-                        throw new PrepareFailure(INSTALL_FAILED_UID_CHANGED,
-                                "Package " + parsedPackage.getPackageName()
-                                        + " shared user changed from "
-                                        + oldSharedUid + " to " + newSharedUid);
-                    }
+                    if (oldPackage != null) {
+                        // APK should not change its sharedUserId declarations
+                        final var oldSharedUid = oldPackage.getSharedUserId() != null
+                                ? oldPackage.getSharedUserId() : "<nothing>";
+                        final var newSharedUid = parsedPackage.getSharedUserId() != null
+                                ? parsedPackage.getSharedUserId() : "<nothing>";
+                        if (!oldSharedUid.equals(newSharedUid)) {
+                            throw new PrepareFailure(INSTALL_FAILED_UID_CHANGED,
+                                    "Package " + parsedPackage.getPackageName()
+                                            + " shared user changed from "
+                                            + oldSharedUid + " to " + newSharedUid);
+                        }
 
-                    // APK should not re-join shared UID
-                    if (oldPackage.isLeavingSharedUser() && !parsedPackage.isLeavingSharedUser()) {
-                        throw new PrepareFailure(INSTALL_FAILED_UID_CHANGED,
-                                "Package " + parsedPackage.getPackageName()
-                                        + " attempting to rejoin " + newSharedUid);
+                        // APK should not re-join shared UID
+                        if (oldPackage.isLeavingSharedUser()
+                                && !parsedPackage.isLeavingSharedUser()) {
+                            throw new PrepareFailure(INSTALL_FAILED_UID_CHANGED,
+                                    "Package " + parsedPackage.getPackageName()
+                                            + " attempting to rejoin " + newSharedUid);
+                        }
                     }
 
                     // In case of rollback, remember per-user/profile install state
@@ -1740,8 +1741,8 @@
 
                 // Update what is removed
                 PackageRemovedInfo removedInfo = new PackageRemovedInfo(mPm);
-                removedInfo.mUid = oldPackage.getUid();
-                removedInfo.mRemovedPackage = oldPackage.getPackageName();
+                removedInfo.mUid = ps.getAppId();
+                removedInfo.mRemovedPackage = ps.getPackageName();
                 removedInfo.mInstallerPackageName =
                         ps.getInstallSource().mInstallerPackageName;
                 removedInfo.mIsStaticSharedLib =
@@ -1760,8 +1761,8 @@
                     removedInfo.mUninstallReasons.put(userId,
                             ps.getUninstallReason(userId));
                 }
-                removedInfo.mIsExternal = oldPackage.isExternalStorage();
-                removedInfo.mRemovedPackageVersionCode = oldPackage.getLongVersionCode();
+                removedInfo.mIsExternal = oldPackageState.isExternalStorage();
+                removedInfo.mRemovedPackageVersionCode = oldPackageState.getVersionCode();
                 request.setRemovedInfo(removedInfo);
 
                 sysPkg = oldPackageState.isSystem();
@@ -1801,7 +1802,7 @@
             } else { // new package install
                 ps = null;
                 disabledPs = null;
-                oldPackage = null;
+                oldPackageState = null;
                 // Remember this for later, in case we need to rollback this install
                 String pkgName1 = parsedPackage.getPackageName();
 
@@ -1832,8 +1833,8 @@
             shouldCloseFreezerBeforeReturn = false;
 
             request.setPrepareResult(replace, targetScanFlags, targetParseFlags,
-                    oldPackage, parsedPackage, replace /* clearCodeCache */, sysPkg,
-                    ps, disabledPs);
+                    oldPackageState, parsedPackage,
+                    replace /* clearCodeCache */, sysPkg, ps, disabledPs);
         } finally {
             request.setFreezer(freezer);
             if (shouldCloseFreezerBeforeReturn) {
@@ -2077,7 +2078,7 @@
 
                 // Set the update and install times
                 PackageStateInternal deletedPkgSetting = mPm.snapshotComputer()
-                        .getPackageStateInternal(oldPackage.getPackageName());
+                        .getPackageStateInternal(packageName);
                 // TODO(b/225756739): For rebootless APEX, consider using lastUpdateMillis provided
                 //  by apexd to be more accurate.
                 installRequest.setScannedPackageSettingFirstInstallTimeFromReplaced(
@@ -2126,8 +2127,10 @@
                         if (oldCodePaths == null) {
                             oldCodePaths = new ArraySet<>();
                         }
-                        Collections.addAll(oldCodePaths, oldPackage.getBaseApkPath());
-                        Collections.addAll(oldCodePaths, oldPackage.getSplitCodePaths());
+                        if (oldPackage != null) {
+                            Collections.addAll(oldCodePaths, oldPackage.getBaseApkPath());
+                            Collections.addAll(oldCodePaths, oldPackage.getSplitCodePaths());
+                        }
                         ps1.setOldCodePaths(oldCodePaths);
                     } else {
                         ps1.setOldCodePaths(null);
@@ -2852,46 +2855,11 @@
             mPm.notifyInstantAppPackageInstalled(request.getPkg().getPackageName(),
                     request.getNewUsers());
 
-            // Determine the set of users who are adding this package for
-            // the first time vs. those who are seeing an update.
-            int[] firstUserIds = EMPTY_INT_ARRAY;
-            int[] firstInstantUserIds = EMPTY_INT_ARRAY;
-            int[] updateUserIds = EMPTY_INT_ARRAY;
-            int[] instantUserIds = EMPTY_INT_ARRAY;
-            final boolean allNewUsers = request.getOriginUsers() == null
-                    || request.getOriginUsers().length == 0;
-            for (int newUser : request.getNewUsers()) {
-                final boolean isInstantApp = pkgSetting.getUserStateOrDefault(newUser)
-                        .isInstantApp();
-                if (allNewUsers) {
-                    if (isInstantApp) {
-                        firstInstantUserIds = ArrayUtils.appendInt(firstInstantUserIds, newUser);
-                    } else {
-                        firstUserIds = ArrayUtils.appendInt(firstUserIds, newUser);
-                    }
-                    continue;
-                }
-                boolean isNew = true;
-                for (int origUser : request.getOriginUsers()) {
-                    if (origUser == newUser) {
-                        isNew = false;
-                        break;
-                    }
-                }
-                if (isNew) {
-                    if (isInstantApp) {
-                        firstInstantUserIds = ArrayUtils.appendInt(firstInstantUserIds, newUser);
-                    } else {
-                        firstUserIds = ArrayUtils.appendInt(firstUserIds, newUser);
-                    }
-                } else {
-                    if (isInstantApp) {
-                        instantUserIds = ArrayUtils.appendInt(instantUserIds, newUser);
-                    } else {
-                        updateUserIds = ArrayUtils.appendInt(updateUserIds, newUser);
-                    }
-                }
-            }
+            request.populateBroadcastUsers();
+            final int[] firstUserIds = request.getFirstTimeBroadcastUserIds();
+            final int[] firstInstantUserIds = request.getFirstTimeBroadcastInstantUserIds();
+            final int[] updateUserIds = request.getUpdateBroadcastUserIds();
+            final int[] instantUserIds = request.getUpdateBroadcastInstantUserIds();
 
             Bundle extras = new Bundle();
             extras.putInt(Intent.EXTRA_UID, request.getAppId());
@@ -2969,12 +2937,10 @@
                 }
                 // If package installer is defined, notify package installer about new
                 // app installed
-                if (mPm.mRequiredInstallerPackage != null) {
-                    mPm.sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED, packageName,
-                            extras, Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND /*flags*/,
-                            mPm.mRequiredInstallerPackage, null /*finishedReceiver*/,
-                            firstUserIds, instantUserIds, null /* broadcastAllowList */, null);
-                }
+                mPm.sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED, packageName,
+                        extras, Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND /*flags*/,
+                        mPm.mRequiredInstallerPackage, null /*finishedReceiver*/,
+                        firstUserIds, instantUserIds, null /* broadcastAllowList */, null);
 
                 // Send replaced for users that don't see the package for the first time
                 if (update) {
@@ -3070,7 +3036,7 @@
                 }
             }
 
-            if (allNewUsers && !update) {
+            if (request.isAllNewUsers() && !update) {
                 mPm.notifyPackageAdded(packageName, request.getAppId());
             } else {
                 mPm.notifyPackageChanged(packageName, request.getAppId());
@@ -4728,8 +4694,7 @@
                 synchronized (mPm.mLock) {
                     platformPkgSetting = mPm.mSettings.getPackageLPr("android");
                 }
-                if (!comparePackageSignatures(platformPkgSetting,
-                        pkg.getSigningDetails().getSignatures())) {
+                if (!comparePackageSignatures(platformPkgSetting, pkg.getSigningDetails())) {
                     throw PackageManagerException.ofInternalError("Overlay "
                             + pkg.getPackageName()
                             + " must target Q or later, "
@@ -4751,8 +4716,7 @@
                     targetPkgSetting = mPm.mSettings.getPackageLPr(pkg.getOverlayTarget());
                 }
                 if (targetPkgSetting != null) {
-                    if (!comparePackageSignatures(targetPkgSetting,
-                            pkg.getSigningDetails().getSignatures())) {
+                    if (!comparePackageSignatures(targetPkgSetting, pkg.getSigningDetails())) {
                         // check reference signature
                         if (mPm.mOverlayConfigSignaturePackage == null) {
                             throw PackageManagerException.ofInternalError("Overlay "
@@ -4767,8 +4731,7 @@
                             refPkgSetting = mPm.mSettings.getPackageLPr(
                                     mPm.mOverlayConfigSignaturePackage);
                         }
-                        if (!comparePackageSignatures(refPkgSetting,
-                                pkg.getSigningDetails().getSignatures())) {
+                        if (!comparePackageSignatures(refPkgSetting, pkg.getSigningDetails())) {
                             throw PackageManagerException.ofInternalError("Overlay "
                                     + pkg.getPackageName() + " signed with a different "
                                     + "certificate than both the reference package and "
@@ -4799,8 +4762,7 @@
                 synchronized (mPm.mLock) {
                     platformPkgSetting = mPm.mSettings.getPackageLPr("android");
                 }
-                if (!comparePackageSignatures(platformPkgSetting,
-                        pkg.getSigningDetails().getSignatures())) {
+                if (!comparePackageSignatures(platformPkgSetting, pkg.getSigningDetails())) {
                     throw PackageManagerException.ofInternalError("Apps that share a user with a "
                             + "privileged app must themselves be marked as privileged. "
                             + pkg.getPackageName() + " shares privileged user "
@@ -4839,10 +4801,8 @@
                     // to allowlist their privileged permissions just like other
                     // priv-apps.
                     PackageSetting platformPkgSetting = mPm.mSettings.getPackageLPr("android");
-                    if ((compareSignatures(
-                            platformPkgSetting.getSigningDetails().getSignatures(),
-                            pkg.getSigningDetails().getSignatures())
-                            != PackageManager.SIGNATURE_MATCH)) {
+                    if ((compareSignatures(platformPkgSetting.getSigningDetails(),
+                            pkg.getSigningDetails()) != PackageManager.SIGNATURE_MATCH)) {
                         scanFlags |= SCAN_AS_PRIVILEGED;
                     }
                 }
diff --git a/services/core/java/com/android/server/pm/InstallRequest.java b/services/core/java/com/android/server/pm/InstallRequest.java
index e1cfc41..3a6d423 100644
--- a/services/core/java/com/android/server/pm/InstallRequest.java
+++ b/services/core/java/com/android/server/pm/InstallRequest.java
@@ -21,6 +21,7 @@
 import static android.content.pm.PackageManager.INSTALL_SCENARIO_DEFAULT;
 import static android.content.pm.PackageManager.INSTALL_SUCCEEDED;
 import static android.os.Process.INVALID_UID;
+import static com.android.server.pm.PackageManagerService.EMPTY_INT_ARRAY;
 import static com.android.server.pm.PackageManagerService.SCAN_AS_INSTANT_APP;
 import static com.android.server.pm.PackageManagerService.TAG;
 
@@ -43,6 +44,7 @@
 import android.util.ExceptionUtils;
 import android.util.Slog;
 
+import com.android.internal.util.ArrayUtils;
 import com.android.server.art.model.DexoptResult;
 import com.android.server.pm.parsing.pkg.ParsedPackage;
 import com.android.server.pm.pkg.AndroidPackage;
@@ -52,6 +54,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 final class InstallRequest {
@@ -69,8 +72,8 @@
     private int mParseFlags;
     private boolean mReplace;
 
-    @Nullable /* The original Package if it is being replaced, otherwise {@code null} */
-    private AndroidPackage mExistingPackage;
+    @Nullable /* The original package's name if it is being replaced, otherwise {@code null} */
+    private String mExistingPackageName;
     /** parsed package to be scanned */
     @Nullable
     private ParsedPackage mParsedPackage;
@@ -132,6 +135,15 @@
 
     private int mDexoptStatus;
 
+    @NonNull
+    private int[] mFirstTimeBroadcastUserIds = EMPTY_INT_ARRAY;
+    @NonNull
+    private int[] mFirstTimeBroadcastInstantUserIds = EMPTY_INT_ARRAY;
+    @NonNull
+    private int[] mUpdateBroadcastUserIds = EMPTY_INT_ARRAY;
+    @NonNull
+    private int[] mUpdateBroadcastInstantUserIds = EMPTY_INT_ARRAY;
+
     // New install
     InstallRequest(InstallingSession params) {
         mUserId = params.getUser().getIdentifier();
@@ -413,11 +425,6 @@
     }
 
     @Nullable
-    public AndroidPackage getExistingPackage() {
-        return mExistingPackage;
-    }
-
-    @Nullable
     public List<String> getAllowlistedRestrictedPermissions() {
         return mInstallArgs == null ? null : mInstallArgs.mAllowlistedRestrictedPermissions;
     }
@@ -453,10 +460,7 @@
 
     @Nullable
     public String getExistingPackageName() {
-        if (mExistingPackage != null) {
-            return mExistingPackage.getPackageName();
-        }
-        return null;
+        return mExistingPackageName;
     }
 
     @Nullable
@@ -627,6 +631,25 @@
         return mDexoptStatus;
     }
 
+    public boolean isAllNewUsers() {
+        return mOrigUsers == null || mOrigUsers.length == 0;
+    }
+    public int[] getFirstTimeBroadcastUserIds() {
+        return mFirstTimeBroadcastUserIds;
+    }
+
+    public int[] getFirstTimeBroadcastInstantUserIds() {
+        return mFirstTimeBroadcastInstantUserIds;
+    }
+
+    public int[] getUpdateBroadcastUserIds() {
+        return mUpdateBroadcastUserIds;
+    }
+
+    public int[] getUpdateBroadcastInstantUserIds() {
+        return mUpdateBroadcastInstantUserIds;
+    }
+
     public void setScanFlags(int scanFlags) {
         mScanFlags = scanFlags;
     }
@@ -729,13 +752,14 @@
     }
 
     public void setPrepareResult(boolean replace, int scanFlags,
-            int parseFlags, AndroidPackage existingPackage,
+            int parseFlags, PackageState existingPackageState,
             ParsedPackage packageToScan, boolean clearCodeCache, boolean system,
             PackageSetting originalPs, PackageSetting disabledPs) {
         mReplace = replace;
         mScanFlags = scanFlags;
         mParseFlags = parseFlags;
-        mExistingPackage = existingPackage;
+        mExistingPackageName =
+                existingPackageState != null ? existingPackageState.getPackageName() : null;
         mParsedPackage = packageToScan;
         mClearCodeCache = clearCodeCache;
         mSystem = system;
@@ -769,6 +793,58 @@
         }
     }
 
+    /**
+     *  Determine the set of users who are adding this package for the first time vs. those who are
+     *  seeing an update.
+     */
+    public void populateBroadcastUsers() {
+        assertScanResultExists();
+        mFirstTimeBroadcastUserIds = EMPTY_INT_ARRAY;
+        mFirstTimeBroadcastInstantUserIds = EMPTY_INT_ARRAY;
+        mUpdateBroadcastUserIds = EMPTY_INT_ARRAY;
+        mUpdateBroadcastInstantUserIds = EMPTY_INT_ARRAY;
+
+        final boolean allNewUsers = isAllNewUsers();
+        if (allNewUsers) {
+            // App was not currently installed on any user
+            for (int newUser : mNewUsers) {
+                final boolean isInstantApp =
+                        mScanResult.mPkgSetting.getUserStateOrDefault(newUser).isInstantApp();
+                if (isInstantApp) {
+                    mFirstTimeBroadcastInstantUserIds =
+                            ArrayUtils.appendInt(mFirstTimeBroadcastInstantUserIds, newUser);
+                } else {
+                    mFirstTimeBroadcastUserIds =
+                            ArrayUtils.appendInt(mFirstTimeBroadcastUserIds, newUser);
+                }
+            }
+            return;
+        }
+        // App was already installed on some users, but is new to some other users
+        for (int newUser : mNewUsers) {
+            boolean isFirstTimeUser = !ArrayUtils.contains(mOrigUsers, newUser);
+            final boolean isInstantApp =
+                    mScanResult.mPkgSetting.getUserStateOrDefault(newUser).isInstantApp();
+            if (isFirstTimeUser) {
+                if (isInstantApp) {
+                    mFirstTimeBroadcastInstantUserIds =
+                            ArrayUtils.appendInt(mFirstTimeBroadcastInstantUserIds, newUser);
+                } else {
+                    mFirstTimeBroadcastUserIds =
+                            ArrayUtils.appendInt(mFirstTimeBroadcastUserIds, newUser);
+                }
+            } else {
+                if (isInstantApp) {
+                    mUpdateBroadcastInstantUserIds =
+                            ArrayUtils.appendInt(mUpdateBroadcastInstantUserIds, newUser);
+                } else {
+                    mUpdateBroadcastUserIds =
+                            ArrayUtils.appendInt(mUpdateBroadcastUserIds, newUser);
+                }
+            }
+        }
+    }
+
     public void onPrepareStarted() {
         if (mPackageMetrics != null) {
             mPackageMetrics.onStepStarted(PackageMetrics.STEP_PREPARE);
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index 6233c9b..0ebd33b 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -257,6 +257,7 @@
     private static CreateAppDataResult buildPlaceholderCreateAppDataResult() {
         final CreateAppDataResult result = new CreateAppDataResult();
         result.ceDataInode = -1;
+        result.deDataInode = -1;
         result.exceptionCode = 0;
         result.exceptionMessage = null;
         return result;
@@ -361,7 +362,7 @@
         private boolean mExecuted;
 
         private final List<CreateAppDataArgs> mArgs = new ArrayList<>();
-        private final List<CompletableFuture<Long>> mFutures = new ArrayList<>();
+        private final List<CompletableFuture<CreateAppDataResult>> mFutures = new ArrayList<>();
 
         /**
          * Enqueue the given {@code installd} operation to be executed in the
@@ -371,11 +372,12 @@
          * {@link Installer} object.
          */
         @NonNull
-        public synchronized CompletableFuture<Long> createAppData(CreateAppDataArgs args) {
+        public synchronized CompletableFuture<CreateAppDataResult> createAppData(
+                CreateAppDataArgs args) {
             if (mExecuted) {
                 throw new IllegalStateException();
             }
-            final CompletableFuture<Long> future = new CompletableFuture<>();
+            final CompletableFuture<CreateAppDataResult> future = new CompletableFuture<>();
             mArgs.add(args);
             mFutures.add(future);
             return future;
@@ -402,9 +404,9 @@
                 final CreateAppDataResult[] results = installer.createAppDataBatched(args);
                 for (int j = 0; j < results.length; j++) {
                     final CreateAppDataResult result = results[j];
-                    final CompletableFuture<Long> future = mFutures.get(i + j);
+                    final CompletableFuture<CreateAppDataResult> future = mFutures.get(i + j);
                     if (result.exceptionCode == 0) {
-                        future.complete(result.ceDataInode);
+                        future.complete(result);
                     } else {
                         future.completeExceptionally(
                                 new InstallerException(result.exceptionMessage));
diff --git a/services/core/java/com/android/server/pm/PackageArchiverService.java b/services/core/java/com/android/server/pm/PackageArchiver.java
similarity index 61%
rename from services/core/java/com/android/server/pm/PackageArchiverService.java
rename to services/core/java/com/android/server/pm/PackageArchiver.java
index c7f067b..64cdca3 100644
--- a/services/core/java/com/android/server/pm/PackageArchiverService.java
+++ b/services/core/java/com/android/server/pm/PackageArchiver.java
@@ -16,6 +16,7 @@
 
 package com.android.server.pm;
 
+import static android.app.ComponentOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
 import static android.content.pm.PackageManager.DELETE_KEEP_DATA;
 import static android.os.PowerExemptionManager.REASON_PACKAGE_UNARCHIVE;
 import static android.os.PowerExemptionManager.TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_ALLOWED;
@@ -24,33 +25,45 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
+import android.annotation.UserIdInt;
 import android.app.AppOpsManager;
 import android.app.BroadcastOptions;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentSender;
-import android.content.pm.IPackageArchiverService;
 import android.content.pm.LauncherActivityInfo;
 import android.content.pm.LauncherApps;
-import android.content.pm.PackageArchiver;
+import android.content.pm.PackageInstaller;
 import android.content.pm.PackageManager;
 import android.content.pm.VersionedPackage;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
 import android.os.Binder;
 import android.os.Bundle;
+import android.os.Environment;
 import android.os.ParcelableException;
+import android.os.SELinux;
 import android.os.UserHandle;
 import android.text.TextUtils;
+import android.util.Slog;
 
 import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.server.pm.pkg.ArchiveState;
 import com.android.server.pm.pkg.ArchiveState.ArchiveActivityInfo;
 import com.android.server.pm.pkg.PackageStateInternal;
 import com.android.server.pm.pkg.PackageUserStateInternal;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
 
 /**
  * Responsible archiving apps and returning information about archived apps.
@@ -59,7 +72,9 @@
  * while the data directory is kept. Archived apps are included in the list of launcher apps where
  * tapping them re-installs the full app.
  */
-public class PackageArchiverService extends IPackageArchiverService.Stub {
+public class PackageArchiver {
+
+    private static final String TAG = "PackageArchiverService";
 
     /**
      * The maximum time granted for an app store to start a foreground service when unarchival
@@ -68,19 +83,20 @@
     // TODO(b/297358628) Make this configurable through a flag.
     private static final int DEFAULT_UNARCHIVE_FOREGROUND_TIMEOUT_MS = 120 * 1000;
 
+    private static final String ARCHIVE_ICONS_DIR = "package_archiver";
+
     private final Context mContext;
     private final PackageManagerService mPm;
 
     @Nullable
     private LauncherApps mLauncherApps;
 
-    public PackageArchiverService(Context context, PackageManagerService mPm) {
+    PackageArchiver(Context context, PackageManagerService mPm) {
         this.mContext = context;
         this.mPm = mPm;
     }
 
-    @Override
-    public void requestArchive(
+    void requestArchive(
             @NonNull String packageName,
             @NonNull String callerPackageName,
             @NonNull IntentSender intentSender,
@@ -93,29 +109,49 @@
         Computer snapshot = mPm.snapshotComputer();
         int userId = userHandle.getIdentifier();
         int binderUid = Binder.getCallingUid();
-        int providedUid = snapshot.getPackageUid(callerPackageName, 0, userId);
+        if (!PackageManagerServiceUtils.isRootOrShell(binderUid)) {
+            verifyCaller(snapshot.getPackageUid(callerPackageName, 0, userId), binderUid);
+        }
         snapshot.enforceCrossUserPermission(binderUid, userId, true, true,
                 "archiveApp");
-        verifyCaller(providedUid, binderUid);
-        ArchiveState archiveState;
+        CompletableFuture<ArchiveState> archiveStateFuture;
         try {
-            archiveState = createArchiveState(packageName, userId);
-            // TODO(b/282952870) Should be reverted if uninstall fails/cancels
-            storeArchiveState(packageName, archiveState, userId);
+            archiveStateFuture = createArchiveState(packageName, userId);
         } catch (PackageManager.NameNotFoundException e) {
+            Slog.d(TAG, TextUtils.formatSimple("Failed to archive %s with message %s",
+                    packageName, e.getMessage()));
             throw new ParcelableException(e);
         }
 
-        // TODO(b/278553670) Add special strings for the delete dialog
-        mPm.mInstallerService.uninstall(
-                new VersionedPackage(packageName, PackageManager.VERSION_CODE_HIGHEST),
-                callerPackageName, DELETE_KEEP_DATA, intentSender, userId);
+        archiveStateFuture
+                .thenAccept(
+                        archiveState -> {
+                            // TODO(b/282952870) Should be reverted if uninstall fails/cancels
+                            try {
+                                storeArchiveState(packageName, archiveState, userId);
+                            } catch (PackageManager.NameNotFoundException e) {
+                                sendFailureStatus(intentSender, packageName, e.getMessage());
+                                return;
+                            }
+
+                            // TODO(b/278553670) Add special strings for the delete dialog
+                            mPm.mInstallerService.uninstall(
+                                    new VersionedPackage(packageName,
+                                            PackageManager.VERSION_CODE_HIGHEST),
+                                    callerPackageName, DELETE_KEEP_DATA, intentSender, userId,
+                                    binderUid);
+                        })
+                .exceptionally(
+                        e -> {
+                            sendFailureStatus(intentSender, packageName, e.getMessage());
+                            return null;
+                        });
     }
 
     /**
      * Creates archived state for the package and user.
      */
-    public ArchiveState createArchiveState(String packageName, int userId)
+    public CompletableFuture<ArchiveState> createArchiveState(String packageName, int userId)
             throws PackageManager.NameNotFoundException {
         PackageStateInternal ps = getPackageState(packageName, mPm.snapshotComputer(),
                 Binder.getCallingUid(), userId);
@@ -123,16 +159,56 @@
         verifyInstaller(responsibleInstallerPackage);
 
         List<LauncherActivityInfo> mainActivities = getLauncherActivityInfos(ps, userId);
+        final CompletableFuture<ArchiveState> archiveState = new CompletableFuture<>();
+        mPm.mHandler.post(() -> {
+            try {
+                archiveState.complete(
+                        createArchiveStateInternal(packageName, userId, mainActivities,
+                                responsibleInstallerPackage));
+            } catch (IOException e) {
+                archiveState.completeExceptionally(e);
+            }
+        });
+        return archiveState;
+    }
+
+    private ArchiveState createArchiveStateInternal(String packageName, int userId,
+            List<LauncherActivityInfo> mainActivities, String installerPackage)
+            throws IOException {
         List<ArchiveActivityInfo> archiveActivityInfos = new ArrayList<>();
         for (int i = 0; i < mainActivities.size(); i++) {
-            // TODO(b/278553670) Extract and store launcher icons
+            LauncherActivityInfo mainActivity = mainActivities.get(i);
+            Path iconPath = storeIcon(packageName, mainActivity, userId);
             ArchiveActivityInfo activityInfo = new ArchiveActivityInfo(
-                    mainActivities.get(i).getLabel().toString(),
-                    Path.of("/TODO"), null);
+                    mainActivity.getLabel().toString(), iconPath, null);
             archiveActivityInfos.add(activityInfo);
         }
 
-        return new ArchiveState(archiveActivityInfos, responsibleInstallerPackage);
+        return new ArchiveState(archiveActivityInfos, installerPackage);
+    }
+
+    // TODO(b/298452477) Handle monochrome icons.
+    @VisibleForTesting
+    Path storeIcon(String packageName, LauncherActivityInfo mainActivity,
+            @UserIdInt int userId)
+            throws IOException {
+        int iconResourceId = mainActivity.getActivityInfo().getIconResource();
+        if (iconResourceId == 0) {
+            // The app doesn't define an icon. No need to store anything.
+            return null;
+        }
+        File iconsDir = createIconsDir(userId);
+        File iconFile = new File(iconsDir, packageName + "-" + mainActivity.getName() + ".png");
+        Bitmap icon = drawableToBitmap(mainActivity.getIcon(/* density= */ 0));
+        try (FileOutputStream out = new FileOutputStream(iconFile)) {
+            // Note: Quality is ignored for PNGs.
+            if (!icon.compress(Bitmap.CompressFormat.PNG, /* quality= */ 100, out)) {
+                throw new IOException(TextUtils.formatSimple("Failure to store icon file %s",
+                        iconFile.getName()));
+            }
+            out.flush();
+        }
+        return iconFile.toPath();
     }
 
     private void verifyInstaller(String installerPackage)
@@ -155,8 +231,7 @@
         return true;
     }
 
-    @Override
-    public void requestUnarchive(
+    void requestUnarchive(
             @NonNull String packageName,
             @NonNull String callerPackageName,
             @NonNull UserHandle userHandle) {
@@ -167,10 +242,11 @@
         Computer snapshot = mPm.snapshotComputer();
         int userId = userHandle.getIdentifier();
         int binderUid = Binder.getCallingUid();
-        int providedUid = snapshot.getPackageUid(callerPackageName, 0, userId);
+        if (!PackageManagerServiceUtils.isRootOrShell(binderUid)) {
+            verifyCaller(snapshot.getPackageUid(callerPackageName, 0, userId), binderUid);
+        }
         snapshot.enforceCrossUserPermission(binderUid, userId, true, true,
                 "unarchiveApp");
-        verifyCaller(providedUid, binderUid);
         PackageStateInternal ps;
         try {
             ps = getPackageState(packageName, snapshot, binderUid, userId);
@@ -212,8 +288,8 @@
         int userId = userHandle.getIdentifier();
         Intent unarchiveIntent = new Intent(Intent.ACTION_UNARCHIVE_PACKAGE);
         unarchiveIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
-        unarchiveIntent.putExtra(PackageArchiver.EXTRA_UNARCHIVE_PACKAGE_NAME, packageName);
-        unarchiveIntent.putExtra(PackageArchiver.EXTRA_UNARCHIVE_ALL_USERS,
+        unarchiveIntent.putExtra(PackageInstaller.EXTRA_UNARCHIVE_PACKAGE_NAME, packageName);
+        unarchiveIntent.putExtra(PackageInstaller.EXTRA_UNARCHIVE_ALL_USERS,
                 userId == UserHandle.USER_ALL);
         unarchiveIntent.setPackage(installerPackage);
 
@@ -313,6 +389,29 @@
         return ps;
     }
 
+    private void sendFailureStatus(IntentSender statusReceiver, String packageName,
+            String message) {
+        Slog.d(TAG, TextUtils.formatSimple("Failed to archive %s with message %s", packageName,
+                message));
+        final Intent fillIn = new Intent();
+        fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, packageName);
+        fillIn.putExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE);
+        fillIn.putExtra(PackageInstaller.EXTRA_STATUS_MESSAGE, message);
+        try {
+            final BroadcastOptions options = BroadcastOptions.makeBasic();
+            options.setPendingIntentBackgroundActivityStartMode(
+                    MODE_BACKGROUND_ACTIVITY_START_DENIED);
+            statusReceiver.sendIntent(mContext, 0, fillIn, /* onFinished= */ null,
+                    /* handler= */ null, /* requiredPermission= */ null, options.toBundle());
+        } catch (IntentSender.SendIntentException e) {
+            Slog.e(
+                    TAG,
+                    TextUtils.formatSimple("Failed to send failure status for %s with message %s",
+                            packageName, message),
+                    e);
+        }
+    }
+
     private static void verifyCaller(int providedUid, int binderUid) {
         if (providedUid != binderUid) {
             throw new SecurityException(
@@ -323,4 +422,44 @@
                             binderUid));
         }
     }
+
+    private File createIconsDir(@UserIdInt int userId) throws IOException {
+        File iconsDir = getIconsDir(userId);
+        if (!iconsDir.isDirectory()) {
+            iconsDir.delete();
+            iconsDir.mkdirs();
+            if (!iconsDir.isDirectory()) {
+                throw new IOException("Unable to create directory " + iconsDir);
+            }
+        }
+        SELinux.restorecon(iconsDir);
+        return iconsDir;
+    }
+
+    private File getIconsDir(int userId) {
+        return new File(Environment.getDataSystemCeDirectory(userId), ARCHIVE_ICONS_DIR);
+    }
+
+    private static Bitmap drawableToBitmap(Drawable drawable) {
+        if (drawable instanceof BitmapDrawable) {
+            return ((BitmapDrawable) drawable).getBitmap();
+
+        }
+
+        Bitmap bitmap;
+        if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
+            // Needed for drawables that are just a single color.
+            bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
+        } else {
+            bitmap =
+                    Bitmap.createBitmap(
+                            drawable.getIntrinsicWidth(),
+                            drawable.getIntrinsicHeight(),
+                            Bitmap.Config.ARGB_8888);
+        }
+        Canvas canvas = new Canvas(bitmap);
+        drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+        drawable.draw(canvas);
+        return bitmap;
+    }
 }
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index e360256..95b565d 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -18,9 +18,7 @@
 
 import static android.app.admin.DevicePolicyResources.Strings.Core.PACKAGE_DELETED_BY_DO;
 import static android.os.Process.INVALID_UID;
-
 import static com.android.server.pm.PackageManagerService.SHELL_PACKAGE_NAME;
-
 import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
 import static org.xmlpull.v1.XmlPullParser.START_TAG;
 
@@ -182,6 +180,8 @@
             Manifest.permission.USE_FULL_SCREEN_INTENT
     );
 
+    final PackageArchiver mPackageArchiver;
+
     private final Context mContext;
     private final PackageManagerService mPm;
     private final ApexManager mApexManager;
@@ -301,6 +301,7 @@
                 apexParserSupplier, mInstallThread.getLooper());
         mGentleUpdateHelper = new GentleUpdateHelper(
                 context, mInstallThread.getLooper(), new AppStateHelper(context));
+        mPackageArchiver = new PackageArchiver(mContext, mPm);
 
         LocalServices.getService(SystemServiceManager.class).startService(
                 new Lifecycle(context, this));
@@ -1240,8 +1241,18 @@
     @Override
     public void uninstall(VersionedPackage versionedPackage, String callerPackageName, int flags,
                 IntentSender statusReceiver, int userId) {
+        uninstall(
+                versionedPackage,
+                callerPackageName,
+                flags,
+                statusReceiver,
+                userId,
+                Binder.getCallingUid());
+    }
+
+    void uninstall(VersionedPackage versionedPackage, String callerPackageName, int flags,
+            IntentSender statusReceiver, int userId, int callingUid) {
         final Computer snapshot = mPm.snapshotComputer();
-        final int callingUid = Binder.getCallingUid();
         snapshot.enforceCrossUserPermission(callingUid, userId, true, true, "uninstall");
         if (!PackageManagerServiceUtils.isRootOrShell(callingUid)) {
             mAppOps.checkPackage(callingUid, callerPackageName);
@@ -1257,7 +1268,7 @@
         final PackageDeleteObserverAdapter adapter = new PackageDeleteObserverAdapter(mContext,
                 statusReceiver, versionedPackage.getPackageName(),
                 canSilentlyInstallPackage, userId);
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DELETE_PACKAGES)
+        if (mContext.checkCallingOrSelfPermission(Manifest.permission.DELETE_PACKAGES)
                     == PackageManager.PERMISSION_GRANTED) {
             // Sweet, call straight through!
             mPm.deletePackageVersioned(versionedPackage, adapter.getBinder(), userId, flags);
@@ -1494,6 +1505,24 @@
         mSilentUpdatePolicy.setSilentUpdatesThrottleTime(throttleTimeInSeconds);
     }
 
+    @Override
+    public void requestArchive(
+            @NonNull String packageName,
+            @NonNull String callerPackageName,
+            @NonNull IntentSender intentSender,
+            @NonNull UserHandle userHandle) {
+        mPackageArchiver.requestArchive(packageName, callerPackageName, intentSender,
+                userHandle);
+    }
+
+    @Override
+    public void requestUnarchive(
+            @NonNull String packageName,
+            @NonNull String callerPackageName,
+            @NonNull UserHandle userHandle) {
+        mPackageArchiver.requestUnarchive(packageName, callerPackageName, userHandle);
+    }
+
     private static int getSessionCount(SparseArray<PackageInstallerSession> sessions,
             int installerUid) {
         int count = 0;
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index e8e6470..2e9da09 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -3396,7 +3396,7 @@
             }
 
             if (!isInstalledByAdb(getInstallSource().mInitiatingPackageName)
-                    && !mPm.mArchiverService.verifySupportsUnarchival(
+                    && !mPm.mInstallerService.mPackageArchiver.verifySupportsUnarchival(
                     getInstallSource().mInstallerPackageName)) {
                 throw new PackageManagerException(
                         PackageManager.INSTALL_FAILED_SESSION_INVALID,
@@ -3641,7 +3641,7 @@
     @GuardedBy("mLock")
     private void maybeStageFsveritySignatureLocked(File origFile, File targetFile,
             boolean fsVerityRequired) throws PackageManagerException {
-        if (com.android.server.security.Flags.deprecateFsvSig()) {
+        if (android.security.Flags.deprecateFsvSig()) {
             return;
         }
         final File originalSignature = new File(
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index e3ff6f6b..d23dcbc 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -84,6 +84,7 @@
 import android.content.pm.DataLoaderType;
 import android.content.pm.FallbackCategoryProvider;
 import android.content.pm.FeatureInfo;
+import android.content.pm.Flags;
 import android.content.pm.IDexModuleRegisterCallback;
 import android.content.pm.IOnChecksumsReadyListener;
 import android.content.pm.IPackageDataObserver;
@@ -799,9 +800,6 @@
     final SparseArray<VerifyingSession> mPendingEnableRollback = new SparseArray<>();
 
     final PackageInstallerService mInstallerService;
-
-    final PackageArchiverService mArchiverService;
-
     final ArtManagerService mArtManagerService;
 
     // TODO(b/260124949): Remove these.
@@ -1630,8 +1628,7 @@
                 (i, pm) -> new CrossProfileIntentFilterHelper(i.getSettings(),
                         i.getUserManagerService(), i.getLock(), i.getUserManagerInternal(),
                         context),
-                (i, pm) -> new UpdateOwnershipHelper(),
-                (i, pm) -> new PackageArchiverService(i.getContext(), pm));
+                (i, pm) -> new UpdateOwnershipHelper());
 
         if (Build.VERSION.SDK_INT <= 0) {
             Slog.w(TAG, "**** ro.build.version.sdk not set!");
@@ -1776,7 +1773,6 @@
         mFactoryTest = testParams.factoryTest;
         mIncrementalManager = testParams.incrementalManager;
         mInstallerService = testParams.installerService;
-        mArchiverService = testParams.archiverService;
         mInstantAppRegistry = testParams.instantAppRegistry;
         mChangedPackagesTracker = testParams.changedPackagesTracker;
         mInstantAppResolverConnection = testParams.instantAppResolverConnection;
@@ -2356,7 +2352,6 @@
             });
 
             mInstallerService = mInjector.getPackageInstallerService();
-            mArchiverService = mInjector.getPackageArchiverService();
             final ComponentName instantAppResolverComponent = getInstantAppResolver(computer);
             if (instantAppResolverComponent != null) {
                 if (DEBUG_INSTANT) {
@@ -4621,7 +4616,7 @@
                     mDomainVerificationConnection, mInstallerService, mPackageProperty,
                     mResolveComponentName, mInstantAppResolverSettingsComponent,
                     mRequiredSdkSandboxPackage, mServicesExtensionPackageName,
-                    mSharedSystemSharedLibraryPackageName, mArchiverService);
+                    mSharedSystemSharedLibraryPackageName);
         }
 
         @Override
@@ -5926,15 +5921,15 @@
                     }
                 }
 
-                Signature[] callerSignature;
+                SigningDetails callerSigningDetails;
                 final int appId = UserHandle.getAppId(callingUid);
                 Pair<PackageStateInternal, SharedUserApi> either =
                         snapshot.getPackageOrSharedUser(appId);
                 if (either != null) {
                     if (either.first != null) {
-                        callerSignature = either.first.getSigningDetails().getSignatures();
+                        callerSigningDetails = either.first.getSigningDetails();
                     } else {
-                        callerSignature = either.second.getSigningDetails().getSignatures();
+                        callerSigningDetails = either.second.getSigningDetails();
                     }
                 } else {
                     throw new SecurityException("Unknown calling UID: " + callingUid);
@@ -5943,8 +5938,8 @@
                 // Verify: can't set installerPackageName to a package that is
                 // not signed with the same cert as the caller.
                 if (installerPackageState != null) {
-                    if (compareSignatures(callerSignature,
-                            installerPackageState.getSigningDetails().getSignatures())
+                    if (compareSignatures(callerSigningDetails,
+                            installerPackageState.getSigningDetails())
                             != PackageManager.SIGNATURE_MATCH) {
                         throw new SecurityException(
                                 "Caller does not have same cert as new installer package "
@@ -5960,8 +5955,8 @@
                         ? null : snapshot.getPackageStateInternal(targetInstallerPackageName);
 
                 if (targetInstallerPkgSetting != null) {
-                    if (compareSignatures(callerSignature,
-                            targetInstallerPkgSetting.getSigningDetails().getSignatures())
+                    if (compareSignatures(callerSigningDetails,
+                            targetInstallerPkgSetting.getSigningDetails())
                             != PackageManager.SIGNATURE_MATCH) {
                         throw new SecurityException(
                                 "Caller does not have same cert as old installer package "
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java b/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
index 9495279..0c2e082 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceInjector.java
@@ -127,8 +127,7 @@
             mPreparingPackageParserProducer;
     private final Singleton<PackageInstallerService>
             mPackageInstallerServiceProducer;
-    private final Singleton<PackageArchiverService>
-            mPackageArchiverServiceProducer;
+
     private final ProducerWithArgument<InstantAppResolverConnection, ComponentName>
             mInstantAppResolverConnectionProducer;
     private final Singleton<LegacyPermissionManagerInternal>
@@ -187,8 +186,7 @@
             Producer<IBackupManager> iBackupManager,
             Producer<SharedLibrariesImpl> sharedLibrariesProducer,
             Producer<CrossProfileIntentFilterHelper> crossProfileIntentFilterHelperProducer,
-            Producer<UpdateOwnershipHelper> updateOwnershipHelperProducer,
-            Producer<PackageArchiverService> packageArchiverServiceProducer) {
+            Producer<UpdateOwnershipHelper> updateOwnershipHelperProducer) {
         mContext = context;
         mLock = lock;
         mInstaller = installer;
@@ -244,7 +242,6 @@
         mCrossProfileIntentFilterHelperProducer = new Singleton<>(
                 crossProfileIntentFilterHelperProducer);
         mUpdateOwnershipHelperProducer = new Singleton<>(updateOwnershipHelperProducer);
-        mPackageArchiverServiceProducer = new Singleton<>(packageArchiverServiceProducer);
     }
 
     /**
@@ -391,10 +388,6 @@
         return mPackageInstallerServiceProducer.get(this, mPackageManager);
     }
 
-    public PackageArchiverService getPackageArchiverService() {
-        return mPackageArchiverServiceProducer.get(this, mPackageManager);
-    }
-
     public InstantAppResolverConnection getInstantAppResolverConnection(
             ComponentName instantAppResolverComponent) {
         return mInstantAppResolverConnectionProducer.produce(
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
index b91ce4b..ca57209 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java
@@ -60,7 +60,6 @@
     public @Nullable String incidentReportApproverPackage;
     public IncrementalManager incrementalManager;
     public PackageInstallerService installerService;
-    public PackageArchiverService archiverService;
     public InstantAppRegistry instantAppRegistry;
     public ChangedPackagesTracker changedPackagesTracker = new ChangedPackagesTracker();
     public InstantAppResolverConnection instantAppResolverConnection;
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
index 0423249..38f241d 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
@@ -403,7 +403,11 @@
      * <br />
      * {@link PackageManager#SIGNATURE_NO_MATCH}: if the two signature sets differ.
      */
-    public static int compareSignatures(Signature[] s1, Signature[] s2) {
+    public static int compareSignatures(SigningDetails sd1, SigningDetails sd2) {
+        return compareSignatureArrays(sd1.getSignatures(), sd2.getSignatures());
+    }
+
+    static int compareSignatureArrays(Signature[] s1, Signature[] s2) {
         if (s1 == null) {
             return s2 == null
                     ? PackageManager.SIGNATURE_NEITHER_SIGNED
@@ -445,10 +449,10 @@
      * set or if the signing details of the package are unknown.
      */
     public static boolean comparePackageSignatures(PackageSetting pkgSetting,
-            Signature[] signatures) {
+            SigningDetails otherSigningDetails) {
         final SigningDetails signingDetails = pkgSetting.getSigningDetails();
         return signingDetails == SigningDetails.UNKNOWN
-                || compareSignatures(signingDetails.getSignatures(), signatures)
+                || compareSignatures(signingDetails, otherSigningDetails)
                 == PackageManager.SIGNATURE_MATCH;
     }
 
@@ -543,7 +547,7 @@
 
     /** Returns true if standard APK Verity is enabled. */
     static boolean isApkVerityEnabled() {
-        if (com.android.server.security.Flags.deprecateFsvSig()) {
+        if (android.security.Flags.deprecateFsvSig()) {
             return false;
         }
         return Build.VERSION.DEVICE_INITIAL_SDK_INT >= Build.VERSION_CODES.R
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
index d9f1df5..8d82085 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java
@@ -26,7 +26,6 @@
 import static android.content.pm.PackageManager.RESTRICTION_HIDE_FROM_SUGGESTIONS;
 import static android.content.pm.PackageManager.RESTRICTION_HIDE_NOTIFICATIONS;
 import static android.content.pm.PackageManager.RESTRICTION_NONE;
-
 import static com.android.server.LocalManagerRegistry.ManagerNotFoundException;
 import static com.android.server.pm.PackageManagerService.PLATFORM_PACKAGE_NAME;
 
@@ -334,6 +333,8 @@
                     return runRenameUser();
                 case "set-user-restriction":
                     return runSetUserRestriction();
+                case "get-user-restriction":
+                    return runGetUserRestriction();
                 case "supports-multiple-users":
                     return runSupportsMultipleUsers();
                 case "get-max-users":
@@ -379,6 +380,10 @@
                     return runWaitForHandler(/* forBackgroundHandler= */ false);
                 case "wait-for-background-handler":
                     return runWaitForHandler(/* forBackgroundHandler= */ true);
+                case "archive":
+                    return runArchive();
+                case "request-unarchive":
+                    return runUnarchive();
                 default: {
                     if (ART_SERVICE_COMMANDS.contains(cmd)) {
                         if (DexOptHelper.useArtService()) {
@@ -2784,33 +2789,111 @@
     private int runGrantRevokePermission(boolean grant) throws RemoteException {
         int userId = UserHandle.USER_SYSTEM;
 
-        String opt = null;
+        String opt;
+        boolean allPermissions = false;
         while ((opt = getNextOption()) != null) {
             if (opt.equals("--user")) {
                 userId = UserHandle.parseUserArg(getNextArgRequired());
             }
+            if (opt.equals("--all-permissions")) {
+                allPermissions = true;
+            }
         }
 
         String pkg = getNextArg();
-        if (pkg == null) {
+        if (!allPermissions && pkg == null) {
             getErrPrintWriter().println("Error: no package specified");
             return 1;
         }
         String perm = getNextArg();
-        if (perm == null) {
+        if (!allPermissions && perm == null) {
             getErrPrintWriter().println("Error: no permission specified");
             return 1;
         }
+        if (allPermissions && perm != null) {
+            getErrPrintWriter().println("Error: permission specified but not expected");
+            return 1;
+        }
         final UserHandle translatedUser = UserHandle.of(translateUserId(userId,
                 UserHandle.USER_NULL, "runGrantRevokePermission"));
-        if (grant) {
-            mPermissionManager.grantRuntimePermission(pkg, perm, translatedUser);
+
+        List<PackageInfo> packageInfos;
+        if (pkg == null) {
+            packageInfos = mContext.getPackageManager().getInstalledPackages(
+                    PackageManager.GET_PERMISSIONS);
         } else {
-            mPermissionManager.revokeRuntimePermission(pkg, perm, translatedUser, null);
+            try {
+                packageInfos = Collections.singletonList(
+                        mContext.getPackageManager().getPackageInfo(pkg,
+                                PackageManager.GET_PERMISSIONS));
+            } catch (NameNotFoundException e) {
+                getErrPrintWriter().println("Error: package not found");
+                return 1;
+            }
+        }
+
+        for (PackageInfo packageInfo : packageInfos) {
+            List<String> permissions = Collections.singletonList(perm);
+            if (allPermissions) {
+                permissions = getRequestedRuntimePermissions(packageInfo);
+            }
+            for (String permission : permissions) {
+                if (grant) {
+                    try {
+                        mPermissionManager.grantRuntimePermission(packageInfo.packageName,
+                                permission,
+                                translatedUser);
+                    } catch (Exception e) {
+                        if (!allPermissions) {
+                            throw e;
+                        } else {
+                            Slog.w(TAG, "Could not grant permission " + permission, e);
+                        }
+                    }
+                } else {
+                    try {
+                        mPermissionManager.revokeRuntimePermission(packageInfo.packageName,
+                                permission,
+                                translatedUser, null);
+                    } catch (Exception e) {
+                        if (!allPermissions) {
+                            throw e;
+                        } else {
+                            Slog.w(TAG, "Could not grant permission " + permission, e);
+                        }
+                    }
+                }
+            }
         }
         return 0;
     }
 
+    private List<String> getRequestedRuntimePermissions(PackageInfo info) {
+        // No requested permissions
+        if (info.requestedPermissions == null) {
+            return new ArrayList<>();
+        }
+        List<String> result = new ArrayList<>();
+        PackageManager pm = mContext.getPackageManager();
+        // Iterate through requested permissions for denied ones
+        for (String permission : info.requestedPermissions) {
+            PermissionInfo pi = null;
+            try {
+                pi = pm.getPermissionInfo(permission, 0);
+            } catch (NameNotFoundException nnfe) {
+                // ignore
+            }
+            if (pi == null) {
+                continue;
+            }
+            if (pi.getProtection() != PermissionInfo.PROTECTION_DANGEROUS) {
+                continue;
+            }
+            result.add(permission);
+        }
+        return result;
+    }
+
     private int runResetPermissions() throws RemoteException {
         mLegacyPermissionManager.resetRuntimePermissions();
         return 0;
@@ -3327,6 +3410,51 @@
         return 0;
     }
 
+    private int runGetUserRestriction() throws RemoteException {
+        final PrintWriter pw = getOutPrintWriter();
+        int userId = UserHandle.USER_SYSTEM;
+        boolean getAllRestrictions = false;
+
+        String opt;
+        while ((opt = getNextOption()) != null) {
+            switch (opt) {
+                case "--user":
+                    userId = UserHandle.parseUserArg(getNextArgRequired());
+                    break;
+                case "--all":
+                    getAllRestrictions = true;
+                    if (getNextArg() != null) {
+                        throw new IllegalArgumentException("Argument unexpected after \"--all\"");
+                    }
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unknown option " + opt);
+            }
+        }
+
+        final int translatedUserId =
+                translateUserId(userId, UserHandle.USER_NULL, "runGetUserRestriction");
+        final IUserManager um = IUserManager.Stub.asInterface(
+                ServiceManager.getService(Context.USER_SERVICE));
+
+        if (getAllRestrictions) {
+            final Bundle restrictions = um.getUserRestrictions(translatedUserId);
+            pw.println("All restrictions:");
+            pw.println(restrictions.toString());
+        } else {
+            String restriction = getNextArg();
+            if (restriction == null) {
+                throw new IllegalArgumentException("No restriction key specified");
+            }
+            String unexpectedArgument = getNextArg();
+            if (unexpectedArgument != null) {
+                throw new IllegalArgumentException("Argument unexpected after restriction key");
+            }
+            pw.println(um.hasUserRestriction(restriction, translatedUserId));
+        }
+        return 0;
+    }
+
     public int runSupportsMultipleUsers() {
         getOutPrintWriter().println("Is multiuser supported: "
                 + UserManager.supportsMultipleUsers());
@@ -4407,6 +4535,105 @@
         }
     }
 
+    private int runArchive() throws RemoteException {
+        final PrintWriter pw = getOutPrintWriter();
+        int userId = UserHandle.USER_ALL;
+
+        String opt;
+        while ((opt = getNextOption()) != null) {
+            if (opt.equals("--user")) {
+                userId = UserHandle.parseUserArg(getNextArgRequired());
+                if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT) {
+                    UserManagerInternal umi =
+                            LocalServices.getService(UserManagerInternal.class);
+                    UserInfo userInfo = umi.getUserInfo(userId);
+                    if (userInfo == null) {
+                        pw.println("Failure [user " + userId + " doesn't exist]");
+                        return 1;
+                    }
+                }
+            } else {
+                pw.println("Error: Unknown option: " + opt);
+                return 1;
+            }
+        }
+
+        final String packageName = getNextArg();
+        if (packageName == null) {
+            pw.println("Error: package name not specified");
+            return 1;
+        }
+
+        final int translatedUserId =
+                translateUserId(userId, UserHandle.USER_SYSTEM, "runArchive");
+        final LocalIntentReceiver receiver = new LocalIntentReceiver();
+
+        try {
+            mInterface.getPackageInstaller().requestArchive(packageName,
+                    /* callerPackageName= */ "", receiver.getIntentSender(),
+                    new UserHandle(translatedUserId));
+        } catch (Exception e) {
+            pw.println("Failure [" + e.getMessage() + "]");
+            return 1;
+        }
+
+        final Intent result = receiver.getResult();
+        final int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS,
+                PackageInstaller.STATUS_FAILURE);
+        if (status == PackageInstaller.STATUS_SUCCESS) {
+            pw.println("Success");
+            return 0;
+        } else {
+            pw.println("Failure ["
+                    + result.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) + "]");
+            return 1;
+        }
+    }
+
+    private int runUnarchive() throws RemoteException {
+        final PrintWriter pw = getOutPrintWriter();
+        int userId = UserHandle.USER_ALL;
+
+        String opt;
+        while ((opt = getNextOption()) != null) {
+            if (opt.equals("--user")) {
+                userId = UserHandle.parseUserArg(getNextArgRequired());
+                if (userId != UserHandle.USER_ALL && userId != UserHandle.USER_CURRENT) {
+                    UserManagerInternal umi =
+                            LocalServices.getService(UserManagerInternal.class);
+                    UserInfo userInfo = umi.getUserInfo(userId);
+                    if (userInfo == null) {
+                        pw.println("Failure [user " + userId + " doesn't exist]");
+                        return 1;
+                    }
+                }
+            } else {
+                pw.println("Error: Unknown option: " + opt);
+                return 1;
+            }
+        }
+
+        final String packageName = getNextArg();
+        if (packageName == null) {
+            pw.println("Error: package name not specified");
+            return 1;
+        }
+
+        final int translatedUserId =
+                translateUserId(userId, UserHandle.USER_SYSTEM, "runArchive");
+
+        try {
+            mInterface.getPackageInstaller().requestUnarchive(packageName,
+                    /* callerPackageName= */ "", new UserHandle(translatedUserId));
+        } catch (Exception e) {
+            pw.println("Failure [" + e.getMessage() + "]");
+            return 1;
+        }
+
+        pw.println("Success");
+        return 0;
+    }
+
     @Override
     public void onHelp() {
         final PrintWriter pw = getOutPrintWriter();
@@ -4643,11 +4870,15 @@
         pw.println("  get-distracting-restriction [--user USER_ID] PACKAGE [PACKAGE...]");
         pw.println("    Gets the specified restriction flags of given package(s) (of the user).");
         pw.println("");
-        pw.println("  grant [--user USER_ID] PACKAGE PERMISSION");
-        pw.println("  revoke [--user USER_ID] PACKAGE PERMISSION");
+        pw.println("  grant [--user USER_ID] [--all-permissions] PACKAGE PERMISSION");
+        pw.println("  revoke [--user USER_ID] [--all-permissions] PACKAGE PERMISSION");
         pw.println("    These commands either grant or revoke permissions to apps.  The permissions");
         pw.println("    must be declared as used in the app's manifest, be runtime permissions");
         pw.println("    (protection level dangerous), and the app targeting SDK greater than Lollipop MR1.");
+        pw.println("    Flags are:");
+        pw.println("    --user: Specifies the user for which the operation needs to be performed");
+        pw.println("    --all-permissions: If specified all the missing runtime permissions will");
+        pw.println("       be granted to the PACKAGE or to all the packages if none is specified.");
         pw.println("");
         pw.println("  set-permission-flags [--user USER_ID] PACKAGE PERMISSION [FLAGS..]");
         pw.println("  clear-permission-flags [--user USER_ID] PACKAGE PERMISSION [FLAGS..]");
@@ -4706,6 +4937,12 @@
         pw.println("");
         pw.println("  set-user-restriction [--user USER_ID] RESTRICTION VALUE");
         pw.println("");
+        pw.println("  get-user-restriction [--user USER_ID] [--all] RESTRICTION_KEY");
+        pw.println("    Display the value of restriction for the given restriction key if the");
+        pw.println("    given user is valid.");
+        pw.println("      --all: display all restrictions for the given user");
+        pw.println("          This option is used without restriction key");
+        pw.println("");
         pw.println("  get-max-users");
         pw.println("");
         pw.println("  get-max-running-users");
@@ -4769,6 +5006,16 @@
         pw.println("      --timeout: wait for a given number of milliseconds. If the handler(s)");
         pw.println("        fail to finish before the timeout, the command returns error.");
         pw.println("");
+        pw.println("  archive [--user USER_ID] PACKAGE ");
+        pw.println("    During the archival process, the apps APKs and cache are removed from the");
+        pw.println("    device while the user data is kept. Options are:");
+        pw.println("      --user: archive the app from the given user.");
+        pw.println("");
+        pw.println("  request-unarchive [--user USER_ID] PACKAGE ");
+        pw.println("    Requests to unarchive a currently archived package by sending a request");
+        pw.println("    to unarchive an app to the responsible installer. Options are:");
+        pw.println("      --user: request unarchival of the app from the given user.");
+        pw.println("");
         if (DexOptHelper.useArtService()) {
             printArtServiceHelp();
         } else {
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index 88184c0..1884caf 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -35,6 +35,7 @@
 import android.os.UserHandle;
 import android.os.incremental.IncrementalManager;
 import android.service.pm.PackageProto;
+import android.service.pm.PackageProto.UserInfoProto.ArchiveState.ArchiveActivityInfo;
 import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.ArraySet;
@@ -843,15 +844,42 @@
         return res;
     }
 
+    int[] queryUsersInstalledOrHasData(int[] users) {
+        int num = 0;
+        for (int user : users) {
+            if (getInstalled(user) || readUserState(user).dataExists()) {
+                num++;
+            }
+        }
+        int[] res = new int[num];
+        num = 0;
+        for (int user : users) {
+            if (getInstalled(user) || readUserState(user).dataExists()) {
+                res[num] = user;
+                num++;
+            }
+        }
+        return res;
+    }
+
     long getCeDataInode(int userId) {
         return readUserState(userId).getCeDataInode();
     }
 
+    long getDeDataInode(int userId) {
+        return readUserState(userId).getDeDataInode();
+    }
+
     void setCeDataInode(long ceDataInode, int userId) {
         modifyUserState(userId).setCeDataInode(ceDataInode);
         onChanged();
     }
 
+    void setDeDataInode(long deDataInode, int userId) {
+        modifyUserState(userId).setDeDataInode(deDataInode);
+        onChanged();
+    }
+
     boolean getStopped(int userId) {
         return readUserState(userId).isStopped();
     }
@@ -906,17 +934,18 @@
         onChanged();
     }
 
-    void setUserState(int userId, long ceDataInode, int enabled, boolean installed, boolean stopped,
-            boolean notLaunched, boolean hidden, int distractionFlags,
-            ArrayMap<String, SuspendParams> suspendParams, boolean instantApp,
-            boolean virtualPreload, String lastDisableAppCaller,
-            ArraySet<String> enabledComponents, ArraySet<String> disabledComponents,
-            int installReason, int uninstallReason,
-            String harmfulAppWarning, String splashScreenTheme,
-            long firstInstallTime, int aspectRatio, ArchiveState archiveState) {
+    void setUserState(int userId, long ceDataInode, long deDataInode, int enabled,
+                      boolean installed, boolean stopped, boolean notLaunched, boolean hidden,
+                      int distractionFlags, ArrayMap<String, SuspendParams> suspendParams,
+                      boolean instantApp, boolean virtualPreload, String lastDisableAppCaller,
+                      ArraySet<String> enabledComponents, ArraySet<String> disabledComponents,
+                      int installReason, int uninstallReason,
+                      String harmfulAppWarning, String splashScreenTheme,
+                      long firstInstallTime, int aspectRatio, ArchiveState archiveState) {
         modifyUserState(userId)
                 .setSuspendParams(suspendParams)
                 .setCeDataInode(ceDataInode)
+                .setDeDataInode(deDataInode)
                 .setEnabledState(enabled)
                 .setInstalled(installed)
                 .setStopped(stopped)
@@ -939,9 +968,9 @@
     }
 
     void setUserState(int userId, PackageUserStateInternal otherState) {
-        setUserState(userId, otherState.getCeDataInode(), otherState.getEnabledState(),
-                otherState.isInstalled(), otherState.isStopped(), otherState.isNotLaunched(),
-                otherState.isHidden(), otherState.getDistractionFlags(),
+        setUserState(userId, otherState.getCeDataInode(), otherState.getDeDataInode(),
+                otherState.getEnabledState(), otherState.isInstalled(), otherState.isStopped(),
+                otherState.isNotLaunched(), otherState.isHidden(), otherState.getDistractionFlags(),
                 otherState.getSuspendParams() == null
                         ? null : otherState.getSuspendParams().untrackedStorage(),
                 otherState.isInstantApp(), otherState.isVirtualPreload(),
@@ -1161,18 +1190,15 @@
         for (ArchiveState.ArchiveActivityInfo activityInfo : archiveState.getActivityInfos()) {
             long activityInfoToken = proto.start(
                     PackageProto.UserInfoProto.ArchiveState.ACTIVITY_INFOS);
-            proto.write(PackageProto.UserInfoProto.ArchiveState.ArchiveActivityInfo.TITLE,
-                    activityInfo.getTitle());
-            proto.write(
-                    PackageProto.UserInfoProto.ArchiveState.ArchiveActivityInfo.ICON_BITMAP_PATH,
-                    activityInfo.getIconBitmap().toAbsolutePath().toString());
-            proto.write(
-                    PackageProto
-                            .UserInfoProto
-                            .ArchiveState
-                            .ArchiveActivityInfo
-                            .MONOCHROME_ICON_BITMAP_PATH,
-                    activityInfo.getMonochromeIconBitmap().toAbsolutePath().toString());
+            proto.write(ArchiveActivityInfo.TITLE, activityInfo.getTitle());
+            if (activityInfo.getIconBitmap() != null) {
+                proto.write(ArchiveActivityInfo.ICON_BITMAP_PATH,
+                        activityInfo.getIconBitmap().toAbsolutePath().toString());
+            }
+            if (activityInfo.getMonochromeIconBitmap() != null) {
+                proto.write(ArchiveActivityInfo.MONOCHROME_ICON_BITMAP_PATH,
+                        activityInfo.getMonochromeIconBitmap().toAbsolutePath().toString());
+            }
             proto.end(activityInfoToken);
         }
 
@@ -1679,10 +1705,10 @@
     }
 
     @DataClass.Generated(
-            time = 1691185420362L,
+            time = 1694196905013L,
             codegenVersion = "1.0.23",
             sourceFile = "frameworks/base/services/core/java/com/android/server/pm/PackageSetting.java",
-            inputSignatures = "private  int mBooleans\nprivate  int mSharedUserAppId\nprivate @android.annotation.Nullable java.util.Map<java.lang.String,java.util.Set<java.lang.String>> mimeGroups\nprivate @java.lang.Deprecated @android.annotation.Nullable java.util.Set<java.lang.String> mOldCodePaths\nprivate @android.annotation.Nullable java.lang.String[] usesSdkLibraries\nprivate @android.annotation.Nullable long[] usesSdkLibrariesVersionsMajor\nprivate @android.annotation.Nullable java.lang.String[] usesStaticLibraries\nprivate @android.annotation.Nullable long[] usesStaticLibrariesVersions\nprivate @android.annotation.Nullable @java.lang.Deprecated java.lang.String legacyNativeLibraryPath\nprivate @android.annotation.NonNull java.lang.String mName\nprivate @android.annotation.Nullable java.lang.String mRealName\nprivate  int mAppId\nprivate @android.annotation.Nullable com.android.server.pm.parsing.pkg.AndroidPackageInternal pkg\nprivate @android.annotation.NonNull java.io.File mPath\nprivate @android.annotation.NonNull java.lang.String mPathString\nprivate  float mLoadingProgress\nprivate  long mLoadingCompletedTime\nprivate @android.annotation.Nullable java.lang.String mPrimaryCpuAbi\nprivate @android.annotation.Nullable java.lang.String mSecondaryCpuAbi\nprivate @android.annotation.Nullable java.lang.String mCpuAbiOverride\nprivate  long mLastModifiedTime\nprivate  long lastUpdateTime\nprivate  long versionCode\nprivate @android.annotation.NonNull com.android.server.pm.PackageSignatures signatures\nprivate @android.annotation.NonNull com.android.server.pm.PackageKeySetData keySetData\nprivate final @android.annotation.NonNull android.util.SparseArray<com.android.server.pm.pkg.PackageUserStateImpl> mUserStates\nprivate @android.annotation.NonNull com.android.server.pm.InstallSource installSource\nprivate @android.annotation.Nullable java.lang.String volumeUuid\nprivate  int categoryOverride\nprivate final @android.annotation.NonNull com.android.server.pm.pkg.PackageStateUnserialized pkgState\nprivate @android.annotation.NonNull java.util.UUID mDomainSetId\nprivate @android.annotation.Nullable java.lang.String mAppMetadataFilePath\nprivate final @android.annotation.NonNull com.android.server.utils.SnapshotCache<com.android.server.pm.PackageSetting> mSnapshot\nprivate  void setBoolean(int,boolean)\nprivate  boolean getBoolean(int)\nprivate  com.android.server.utils.SnapshotCache<com.android.server.pm.PackageSetting> makeCache()\npublic  com.android.server.pm.PackageSetting snapshot()\npublic  void dumpDebug(android.util.proto.ProtoOutputStream,long,java.util.List<android.content.pm.UserInfo>,com.android.server.pm.permission.LegacyPermissionDataProvider)\npublic  com.android.server.pm.PackageSetting setAppId(int)\npublic  com.android.server.pm.PackageSetting setCpuAbiOverride(java.lang.String)\npublic  com.android.server.pm.PackageSetting setFirstInstallTimeFromReplaced(com.android.server.pm.pkg.PackageStateInternal,int[])\npublic  com.android.server.pm.PackageSetting setFirstInstallTime(long,int)\npublic  com.android.server.pm.PackageSetting setForceQueryableOverride(boolean)\npublic  com.android.server.pm.PackageSetting setInstallerPackage(java.lang.String,int)\npublic  com.android.server.pm.PackageSetting setUpdateOwnerPackage(java.lang.String)\npublic  com.android.server.pm.PackageSetting setInstallSource(com.android.server.pm.InstallSource)\n  com.android.server.pm.PackageSetting removeInstallerPackage(java.lang.String)\npublic  com.android.server.pm.PackageSetting setIsOrphaned(boolean)\npublic  com.android.server.pm.PackageSetting setKeySetData(com.android.server.pm.PackageKeySetData)\npublic  com.android.server.pm.PackageSetting setLastModifiedTime(long)\npublic  com.android.server.pm.PackageSetting setLastUpdateTime(long)\npublic  com.android.server.pm.PackageSetting setLongVersionCode(long)\npublic  boolean setMimeGroup(java.lang.String,android.util.ArraySet<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setPkg(com.android.server.pm.pkg.AndroidPackage)\npublic  com.android.server.pm.PackageSetting setPkgStateLibraryFiles(java.util.Collection<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setPrimaryCpuAbi(java.lang.String)\npublic  com.android.server.pm.PackageSetting setSecondaryCpuAbi(java.lang.String)\npublic  com.android.server.pm.PackageSetting setSignatures(com.android.server.pm.PackageSignatures)\npublic  com.android.server.pm.PackageSetting setVolumeUuid(java.lang.String)\npublic  com.android.server.pm.PackageSetting setDefaultToDeviceProtectedStorage(boolean)\npublic @java.lang.Override boolean isExternalStorage()\npublic  com.android.server.pm.PackageSetting setUpdateAvailable(boolean)\npublic  void setSharedUserAppId(int)\npublic @java.lang.Override int getSharedUserAppId()\npublic @java.lang.Override boolean hasSharedUser()\npublic @java.lang.Override java.lang.String toString()\nprotected  void copyMimeGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>>)\npublic  void updateFrom(com.android.server.pm.PackageSetting)\n  com.android.server.pm.PackageSetting updateMimeGroups(java.util.Set<java.lang.String>)\npublic @java.lang.Deprecated @java.lang.Override com.android.server.pm.permission.LegacyPermissionState getLegacyPermissionState()\npublic  com.android.server.pm.PackageSetting setInstallPermissionsFixed(boolean)\npublic  boolean isPrivileged()\npublic  boolean isOem()\npublic  boolean isVendor()\npublic  boolean isProduct()\npublic @java.lang.Override boolean isRequiredForSystemUser()\npublic  boolean isSystemExt()\npublic  boolean isOdm()\npublic  boolean isSystem()\npublic  android.content.pm.SigningDetails getSigningDetails()\npublic  com.android.server.pm.PackageSetting setSigningDetails(android.content.pm.SigningDetails)\npublic  void copyPackageSetting(com.android.server.pm.PackageSetting,boolean)\n @com.android.internal.annotations.VisibleForTesting com.android.server.pm.pkg.PackageUserStateImpl modifyUserState(int)\npublic  com.android.server.pm.pkg.PackageUserStateImpl getOrCreateUserState(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateInternal readUserState(int)\n  void setEnabled(int,int,java.lang.String)\n  int getEnabled(int)\n  void setInstalled(boolean,int)\n  boolean getInstalled(int)\n  int getInstallReason(int)\n  void setInstallReason(int,int)\n  int getUninstallReason(int)\n  void setUninstallReason(int,int)\n @android.annotation.NonNull android.content.pm.overlay.OverlayPaths getOverlayPaths(int)\n  boolean setOverlayPathsForLibrary(java.lang.String,android.content.pm.overlay.OverlayPaths,int)\n  boolean isAnyInstalled(int[])\n  int[] queryInstalledUsers(int[],boolean)\n  long getCeDataInode(int)\n  void setCeDataInode(long,int)\n  boolean getStopped(int)\n  void setStopped(boolean,int)\n  boolean getNotLaunched(int)\n  void setNotLaunched(boolean,int)\n  boolean getHidden(int)\n  void setHidden(boolean,int)\n  int getDistractionFlags(int)\n  void setDistractionFlags(int,int)\npublic  boolean getInstantApp(int)\n  void setInstantApp(boolean,int)\n  boolean getVirtualPreload(int)\n  void setVirtualPreload(boolean,int)\n  void setUserState(int,long,int,boolean,boolean,boolean,boolean,int,android.util.ArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams>,boolean,boolean,java.lang.String,android.util.ArraySet<java.lang.String>,android.util.ArraySet<java.lang.String>,int,int,java.lang.String,java.lang.String,long,int,com.android.server.pm.pkg.ArchiveState)\n  void setUserState(int,com.android.server.pm.pkg.PackageUserStateInternal)\n  com.android.server.utils.WatchedArraySet<java.lang.String> getEnabledComponents(int)\n  com.android.server.utils.WatchedArraySet<java.lang.String> getDisabledComponents(int)\n  void setEnabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setDisabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setEnabledComponentsCopy(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setDisabledComponentsCopy(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  com.android.server.pm.pkg.PackageUserStateImpl modifyUserStateComponents(int,boolean,boolean)\n  void addDisabledComponent(java.lang.String,int)\n  void addEnabledComponent(java.lang.String,int)\n  boolean enableComponentLPw(java.lang.String,int)\n  boolean disableComponentLPw(java.lang.String,int)\n  boolean restoreComponentLPw(java.lang.String,int)\n  int getCurrentEnabledStateLPr(java.lang.String,int)\n  void removeUser(int)\npublic  int[] getNotInstalledUserIds()\n  void writePackageUserPermissionsProto(android.util.proto.ProtoOutputStream,long,java.util.List<android.content.pm.UserInfo>,com.android.server.pm.permission.LegacyPermissionDataProvider)\nprotected  void writeUsersInfoToProto(android.util.proto.ProtoOutputStream,long)\nprivate static  void writeArchiveState(android.util.proto.ProtoOutputStream,com.android.server.pm.pkg.ArchiveState)\n  com.android.server.pm.PackageSetting setPath(java.io.File)\npublic @com.android.internal.annotations.VisibleForTesting boolean overrideNonLocalizedLabelAndIcon(android.content.ComponentName,java.lang.String,java.lang.Integer,int)\npublic  void resetOverrideComponentLabelIcon(int)\npublic @android.annotation.Nullable java.lang.String getSplashScreenTheme(int)\npublic  boolean isIncremental()\npublic  boolean isLoading()\npublic  com.android.server.pm.PackageSetting setLoadingProgress(float)\npublic  com.android.server.pm.PackageSetting setLoadingCompletedTime(long)\npublic  com.android.server.pm.PackageSetting setAppMetadataFilePath(java.lang.String)\npublic @android.annotation.NonNull @java.lang.Override long getVersionCode()\npublic @android.annotation.Nullable @java.lang.Override java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getMimeGroups()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String getPackageName()\npublic @android.annotation.Nullable @java.lang.Override com.android.server.pm.pkg.AndroidPackage getAndroidPackage()\npublic @android.annotation.NonNull android.content.pm.SigningInfo getSigningInfo()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String[] getUsesSdkLibraries()\npublic @android.annotation.NonNull @java.lang.Override long[] getUsesSdkLibrariesVersionsMajor()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String[] getUsesStaticLibraries()\npublic @android.annotation.NonNull @java.lang.Override long[] getUsesStaticLibrariesVersions()\npublic @android.annotation.NonNull @java.lang.Override java.util.List<com.android.server.pm.pkg.SharedLibrary> getSharedLibraryDependencies()\npublic @android.annotation.NonNull com.android.server.pm.PackageSetting addUsesLibraryInfo(android.content.pm.SharedLibraryInfo)\npublic @android.annotation.NonNull @java.lang.Override java.util.List<java.lang.String> getUsesLibraryFiles()\npublic @android.annotation.NonNull com.android.server.pm.PackageSetting addUsesLibraryFile(java.lang.String)\npublic @java.lang.Override boolean isHiddenUntilInstalled()\npublic @android.annotation.NonNull @java.lang.Override long[] getLastPackageUsageTime()\npublic @java.lang.Override boolean isUpdatedSystemApp()\npublic @java.lang.Override boolean isApkInUpdatedApex()\npublic @android.annotation.Nullable @java.lang.Override java.lang.String getApexModuleName()\npublic  com.android.server.pm.PackageSetting setDomainSetId(java.util.UUID)\npublic  com.android.server.pm.PackageSetting setCategoryOverride(int)\npublic  com.android.server.pm.PackageSetting setLegacyNativeLibraryPath(java.lang.String)\npublic  com.android.server.pm.PackageSetting setMimeGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>>)\npublic  com.android.server.pm.PackageSetting setOldCodePaths(java.util.Set<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setUsesSdkLibraries(java.lang.String[])\npublic  com.android.server.pm.PackageSetting setUsesSdkLibrariesVersionsMajor(long[])\npublic  com.android.server.pm.PackageSetting setUsesStaticLibraries(java.lang.String[])\npublic  com.android.server.pm.PackageSetting setUsesStaticLibrariesVersions(long[])\npublic  com.android.server.pm.PackageSetting setApexModuleName(java.lang.String)\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageStateUnserialized getTransientState()\npublic @android.annotation.NonNull android.util.SparseArray<? extends PackageUserStateInternal> getUserStates()\npublic  com.android.server.pm.PackageSetting addMimeTypes(java.lang.String,java.util.Set<java.lang.String>)\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageUserState getStateForUser(android.os.UserHandle)\npublic @android.annotation.Nullable java.lang.String getPrimaryCpuAbi()\npublic @android.annotation.Nullable java.lang.String getSecondaryCpuAbi()\npublic @android.annotation.Nullable @java.lang.Override java.lang.String getSeInfo()\npublic @android.annotation.Nullable java.lang.String getPrimaryCpuAbiLegacy()\npublic @android.annotation.Nullable java.lang.String getSecondaryCpuAbiLegacy()\npublic @android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy @java.lang.Override int getHiddenApiEnforcementPolicy()\npublic @java.lang.Override boolean isApex()\npublic @java.lang.Override boolean isForceQueryableOverride()\npublic @java.lang.Override boolean isUpdateAvailable()\npublic @java.lang.Override boolean isInstallPermissionsFixed()\npublic @java.lang.Override boolean isDefaultToDeviceProtectedStorage()\nclass PackageSetting extends com.android.server.pm.SettingBase implements [com.android.server.pm.pkg.PackageStateInternal]\nprivate static final  int INSTALL_PERMISSION_FIXED\nprivate static final  int DEFAULT_TO_DEVICE_PROTECTED_STORAGE\nprivate static final  int UPDATE_AVAILABLE\nprivate static final  int FORCE_QUERYABLE_OVERRIDE\nclass Booleans extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genGetters=true, genConstructor=false, genSetters=false, genBuilder=false)")
+            inputSignatures = "private  int mBooleans\nprivate  int mSharedUserAppId\nprivate @android.annotation.Nullable java.util.Map<java.lang.String,java.util.Set<java.lang.String>> mimeGroups\nprivate @java.lang.Deprecated @android.annotation.Nullable java.util.Set<java.lang.String> mOldCodePaths\nprivate @android.annotation.Nullable java.lang.String[] usesSdkLibraries\nprivate @android.annotation.Nullable long[] usesSdkLibrariesVersionsMajor\nprivate @android.annotation.Nullable java.lang.String[] usesStaticLibraries\nprivate @android.annotation.Nullable long[] usesStaticLibrariesVersions\nprivate @android.annotation.Nullable @java.lang.Deprecated java.lang.String legacyNativeLibraryPath\nprivate @android.annotation.NonNull java.lang.String mName\nprivate @android.annotation.Nullable java.lang.String mRealName\nprivate  int mAppId\nprivate @android.annotation.Nullable com.android.server.pm.parsing.pkg.AndroidPackageInternal pkg\nprivate @android.annotation.NonNull java.io.File mPath\nprivate @android.annotation.NonNull java.lang.String mPathString\nprivate  float mLoadingProgress\nprivate  long mLoadingCompletedTime\nprivate @android.annotation.Nullable java.lang.String mPrimaryCpuAbi\nprivate @android.annotation.Nullable java.lang.String mSecondaryCpuAbi\nprivate @android.annotation.Nullable java.lang.String mCpuAbiOverride\nprivate  long mLastModifiedTime\nprivate  long lastUpdateTime\nprivate  long versionCode\nprivate @android.annotation.NonNull com.android.server.pm.PackageSignatures signatures\nprivate @android.annotation.NonNull com.android.server.pm.PackageKeySetData keySetData\nprivate final @android.annotation.NonNull android.util.SparseArray<com.android.server.pm.pkg.PackageUserStateImpl> mUserStates\nprivate @android.annotation.NonNull com.android.server.pm.InstallSource installSource\nprivate @android.annotation.Nullable java.lang.String volumeUuid\nprivate  int categoryOverride\nprivate final @android.annotation.NonNull com.android.server.pm.pkg.PackageStateUnserialized pkgState\nprivate @android.annotation.NonNull java.util.UUID mDomainSetId\nprivate @android.annotation.Nullable java.lang.String mAppMetadataFilePath\nprivate final @android.annotation.NonNull com.android.server.utils.SnapshotCache<com.android.server.pm.PackageSetting> mSnapshot\nprivate  void setBoolean(int,boolean)\nprivate  boolean getBoolean(int)\nprivate  com.android.server.utils.SnapshotCache<com.android.server.pm.PackageSetting> makeCache()\npublic  com.android.server.pm.PackageSetting snapshot()\npublic  void dumpDebug(android.util.proto.ProtoOutputStream,long,java.util.List<android.content.pm.UserInfo>,com.android.server.pm.permission.LegacyPermissionDataProvider)\npublic  com.android.server.pm.PackageSetting setAppId(int)\npublic  com.android.server.pm.PackageSetting setCpuAbiOverride(java.lang.String)\npublic  com.android.server.pm.PackageSetting setFirstInstallTimeFromReplaced(com.android.server.pm.pkg.PackageStateInternal,int[])\npublic  com.android.server.pm.PackageSetting setFirstInstallTime(long,int)\npublic  com.android.server.pm.PackageSetting setForceQueryableOverride(boolean)\npublic  com.android.server.pm.PackageSetting setInstallerPackage(java.lang.String,int)\npublic  com.android.server.pm.PackageSetting setUpdateOwnerPackage(java.lang.String)\npublic  com.android.server.pm.PackageSetting setInstallSource(com.android.server.pm.InstallSource)\n  com.android.server.pm.PackageSetting removeInstallerPackage(java.lang.String)\npublic  com.android.server.pm.PackageSetting setIsOrphaned(boolean)\npublic  com.android.server.pm.PackageSetting setKeySetData(com.android.server.pm.PackageKeySetData)\npublic  com.android.server.pm.PackageSetting setLastModifiedTime(long)\npublic  com.android.server.pm.PackageSetting setLastUpdateTime(long)\npublic  com.android.server.pm.PackageSetting setLongVersionCode(long)\npublic  boolean setMimeGroup(java.lang.String,android.util.ArraySet<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setPkg(com.android.server.pm.pkg.AndroidPackage)\npublic  com.android.server.pm.PackageSetting setPkgStateLibraryFiles(java.util.Collection<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setPrimaryCpuAbi(java.lang.String)\npublic  com.android.server.pm.PackageSetting setSecondaryCpuAbi(java.lang.String)\npublic  com.android.server.pm.PackageSetting setSignatures(com.android.server.pm.PackageSignatures)\npublic  com.android.server.pm.PackageSetting setVolumeUuid(java.lang.String)\npublic  com.android.server.pm.PackageSetting setDefaultToDeviceProtectedStorage(boolean)\npublic @java.lang.Override boolean isExternalStorage()\npublic  com.android.server.pm.PackageSetting setUpdateAvailable(boolean)\npublic  void setSharedUserAppId(int)\npublic @java.lang.Override int getSharedUserAppId()\npublic @java.lang.Override boolean hasSharedUser()\npublic @java.lang.Override java.lang.String toString()\nprotected  void copyMimeGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>>)\npublic  void updateFrom(com.android.server.pm.PackageSetting)\n  com.android.server.pm.PackageSetting updateMimeGroups(java.util.Set<java.lang.String>)\npublic @java.lang.Deprecated @java.lang.Override com.android.server.pm.permission.LegacyPermissionState getLegacyPermissionState()\npublic  com.android.server.pm.PackageSetting setInstallPermissionsFixed(boolean)\npublic  boolean isPrivileged()\npublic  boolean isOem()\npublic  boolean isVendor()\npublic  boolean isProduct()\npublic @java.lang.Override boolean isRequiredForSystemUser()\npublic  boolean isSystemExt()\npublic  boolean isOdm()\npublic  boolean isSystem()\npublic  android.content.pm.SigningDetails getSigningDetails()\npublic  com.android.server.pm.PackageSetting setSigningDetails(android.content.pm.SigningDetails)\npublic  void copyPackageSetting(com.android.server.pm.PackageSetting,boolean)\n @com.android.internal.annotations.VisibleForTesting com.android.server.pm.pkg.PackageUserStateImpl modifyUserState(int)\npublic  com.android.server.pm.pkg.PackageUserStateImpl getOrCreateUserState(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateInternal readUserState(int)\n  void setEnabled(int,int,java.lang.String)\n  int getEnabled(int)\n  void setInstalled(boolean,int)\n  boolean getInstalled(int)\n  int getInstallReason(int)\n  void setInstallReason(int,int)\n  int getUninstallReason(int)\n  void setUninstallReason(int,int)\n @android.annotation.NonNull android.content.pm.overlay.OverlayPaths getOverlayPaths(int)\n  boolean setOverlayPathsForLibrary(java.lang.String,android.content.pm.overlay.OverlayPaths,int)\n  boolean isInstalledOrHasDataOnAnyOtherUser(int[],int)\n  int[] queryInstalledUsers(int[],boolean)\n  long getCeDataInode(int)\n  void setCeDataInode(long,int)\n  void setDeDataInode(long,int)\n  boolean getStopped(int)\n  void setStopped(boolean,int)\n  boolean getNotLaunched(int)\n  void setNotLaunched(boolean,int)\n  boolean getHidden(int)\n  void setHidden(boolean,int)\n  int getDistractionFlags(int)\n  void setDistractionFlags(int,int)\npublic  boolean getInstantApp(int)\n  void setInstantApp(boolean,int)\n  boolean getVirtualPreload(int)\n  void setVirtualPreload(boolean,int)\n  void setUserState(int,long,int,boolean,boolean,boolean,boolean,int,android.util.ArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams>,boolean,boolean,java.lang.String,android.util.ArraySet<java.lang.String>,android.util.ArraySet<java.lang.String>,int,int,java.lang.String,java.lang.String,long,int,com.android.server.pm.pkg.ArchiveState)\n  void setUserState(int,com.android.server.pm.pkg.PackageUserStateInternal)\n  com.android.server.utils.WatchedArraySet<java.lang.String> getEnabledComponents(int)\n  com.android.server.utils.WatchedArraySet<java.lang.String> getDisabledComponents(int)\n  void setEnabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setDisabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setEnabledComponentsCopy(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  void setDisabledComponentsCopy(com.android.server.utils.WatchedArraySet<java.lang.String>,int)\n  com.android.server.pm.pkg.PackageUserStateImpl modifyUserStateComponents(int,boolean,boolean)\n  void addDisabledComponent(java.lang.String,int)\n  void addEnabledComponent(java.lang.String,int)\n  boolean enableComponentLPw(java.lang.String,int)\n  boolean disableComponentLPw(java.lang.String,int)\n  boolean restoreComponentLPw(java.lang.String,int)\n  int getCurrentEnabledStateLPr(java.lang.String,int)\n  void removeUser(int)\npublic  int[] getNotInstalledUserIds()\n  void writePackageUserPermissionsProto(android.util.proto.ProtoOutputStream,long,java.util.List<android.content.pm.UserInfo>,com.android.server.pm.permission.LegacyPermissionDataProvider)\nprotected  void writeUsersInfoToProto(android.util.proto.ProtoOutputStream,long)\nprivate static  void writeArchiveState(android.util.proto.ProtoOutputStream,com.android.server.pm.pkg.ArchiveState)\n  com.android.server.pm.PackageSetting setPath(java.io.File)\npublic @com.android.internal.annotations.VisibleForTesting boolean overrideNonLocalizedLabelAndIcon(android.content.ComponentName,java.lang.String,java.lang.Integer,int)\npublic  void resetOverrideComponentLabelIcon(int)\npublic @android.annotation.Nullable java.lang.String getSplashScreenTheme(int)\npublic  boolean isIncremental()\npublic  boolean isLoading()\npublic  com.android.server.pm.PackageSetting setLoadingProgress(float)\npublic  com.android.server.pm.PackageSetting setLoadingCompletedTime(long)\npublic  com.android.server.pm.PackageSetting setAppMetadataFilePath(java.lang.String)\npublic @android.annotation.NonNull @java.lang.Override long getVersionCode()\npublic @android.annotation.Nullable @java.lang.Override java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getMimeGroups()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String getPackageName()\npublic @android.annotation.Nullable @java.lang.Override com.android.server.pm.pkg.AndroidPackage getAndroidPackage()\npublic @android.annotation.NonNull android.content.pm.SigningInfo getSigningInfo()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String[] getUsesSdkLibraries()\npublic @android.annotation.NonNull @java.lang.Override long[] getUsesSdkLibrariesVersionsMajor()\npublic @android.annotation.NonNull @java.lang.Override java.lang.String[] getUsesStaticLibraries()\npublic @android.annotation.NonNull @java.lang.Override long[] getUsesStaticLibrariesVersions()\npublic @android.annotation.NonNull @java.lang.Override java.util.List<com.android.server.pm.pkg.SharedLibrary> getSharedLibraryDependencies()\npublic @android.annotation.NonNull com.android.server.pm.PackageSetting addUsesLibraryInfo(android.content.pm.SharedLibraryInfo)\npublic @android.annotation.NonNull @java.lang.Override java.util.List<java.lang.String> getUsesLibraryFiles()\npublic @android.annotation.NonNull com.android.server.pm.PackageSetting addUsesLibraryFile(java.lang.String)\npublic @java.lang.Override boolean isHiddenUntilInstalled()\npublic @android.annotation.NonNull @java.lang.Override long[] getLastPackageUsageTime()\npublic @java.lang.Override boolean isUpdatedSystemApp()\npublic @java.lang.Override boolean isApkInUpdatedApex()\npublic @android.annotation.Nullable @java.lang.Override java.lang.String getApexModuleName()\npublic  com.android.server.pm.PackageSetting setDomainSetId(java.util.UUID)\npublic  com.android.server.pm.PackageSetting setCategoryOverride(int)\npublic  com.android.server.pm.PackageSetting setLegacyNativeLibraryPath(java.lang.String)\npublic  com.android.server.pm.PackageSetting setMimeGroups(java.util.Map<java.lang.String,java.util.Set<java.lang.String>>)\npublic  com.android.server.pm.PackageSetting setOldCodePaths(java.util.Set<java.lang.String>)\npublic  com.android.server.pm.PackageSetting setUsesSdkLibraries(java.lang.String[])\npublic  com.android.server.pm.PackageSetting setUsesSdkLibrariesVersionsMajor(long[])\npublic  com.android.server.pm.PackageSetting setUsesStaticLibraries(java.lang.String[])\npublic  com.android.server.pm.PackageSetting setUsesStaticLibrariesVersions(long[])\npublic  com.android.server.pm.PackageSetting setApexModuleName(java.lang.String)\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageStateUnserialized getTransientState()\npublic @android.annotation.NonNull android.util.SparseArray<? extends PackageUserStateInternal> getUserStates()\npublic  com.android.server.pm.PackageSetting addMimeTypes(java.lang.String,java.util.Set<java.lang.String>)\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageUserState getStateForUser(android.os.UserHandle)\npublic @android.annotation.Nullable java.lang.String getPrimaryCpuAbi()\npublic @android.annotation.Nullable java.lang.String getSecondaryCpuAbi()\npublic @android.annotation.Nullable @java.lang.Override java.lang.String getSeInfo()\npublic @android.annotation.Nullable java.lang.String getPrimaryCpuAbiLegacy()\npublic @android.annotation.Nullable java.lang.String getSecondaryCpuAbiLegacy()\npublic @android.content.pm.ApplicationInfo.HiddenApiEnforcementPolicy @java.lang.Override int getHiddenApiEnforcementPolicy()\npublic @java.lang.Override boolean isApex()\npublic @java.lang.Override boolean isForceQueryableOverride()\npublic @java.lang.Override boolean isUpdateAvailable()\npublic @java.lang.Override boolean isInstallPermissionsFixed()\npublic @java.lang.Override boolean isDefaultToDeviceProtectedStorage()\nclass PackageSetting extends com.android.server.pm.SettingBase implements [com.android.server.pm.pkg.PackageStateInternal]\nprivate static final  int INSTALL_PERMISSION_FIXED\nprivate static final  int DEFAULT_TO_DEVICE_PROTECTED_STORAGE\nprivate static final  int UPDATE_AVAILABLE\nprivate static final  int FORCE_QUERYABLE_OVERRIDE\nclass Booleans extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genGetters=true, genConstructor=false, genSetters=false, genBuilder=false)")
     @Deprecated
     private void __metadata() {}
 
diff --git a/services/core/java/com/android/server/pm/RemovePackageHelper.java b/services/core/java/com/android/server/pm/RemovePackageHelper.java
index 2aedf0d..d989c90 100644
--- a/services/core/java/com/android/server/pm/RemovePackageHelper.java
+++ b/services/core/java/com/android/server/pm/RemovePackageHelper.java
@@ -22,7 +22,6 @@
 import static android.os.storage.StorageManager.FLAG_STORAGE_CE;
 import static android.os.storage.StorageManager.FLAG_STORAGE_DE;
 import static android.os.storage.StorageManager.FLAG_STORAGE_EXTERNAL;
-
 import static com.android.server.pm.InstructionSets.getDexCodeInstructionSets;
 import static com.android.server.pm.PackageManagerService.DEBUG_INSTALL;
 import static com.android.server.pm.PackageManagerService.DEBUG_REMOVE;
@@ -278,6 +277,7 @@
                 mAppDataHelper.destroyAppDataLIF(pkg, nextUserId,
                         FLAG_STORAGE_DE | FLAG_STORAGE_CE | FLAG_STORAGE_EXTERNAL);
                 ps.setCeDataInode(-1, nextUserId);
+                ps.setDeDataInode(-1, nextUserId);
             }
             mAppDataHelper.clearKeystoreData(nextUserId, ps.getAppId());
             preferredActivityHelper.clearPackagePreferredActivities(ps.getPackageName(),
@@ -400,6 +400,21 @@
                         changedUsers);
                 mPm.postPreferredActivityChangedBroadcast(UserHandle.USER_ALL);
             }
+        } else if (!deletedPs.isSystem() && outInfo != null && !outInfo.mIsUpdate
+                && outInfo.mRemovedUsers != null) {
+            // For non-system uninstalls with DELETE_KEEP_DATA, set the installed state to false
+            // for affected users. This does not apply to app updates where the old apk is replaced
+            // but the old data remains.
+            if (DEBUG_REMOVE) {
+                Slog.d(TAG, "Updating installed state to false because of DELETE_KEEP_DATA");
+            }
+            for (int userId : outInfo.mRemovedUsers) {
+                if (DEBUG_REMOVE) {
+                    final boolean wasInstalled = deletedPs.getInstalled(userId);
+                    Slog.d(TAG, "    user " + userId + ": " + wasInstalled + " => " + false);
+                }
+                deletedPs.setInstalled(/* installed= */ false, userId);
+            }
         }
         // make sure to preserve per-user installed state if this removal was just
         // a downgrade of a system app to the factory package
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java
index a8cdef4..cf5aa7b 100644
--- a/services/core/java/com/android/server/pm/SELinuxMMAC.java
+++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java
@@ -605,7 +605,7 @@
         // Check for exact signature matches across all certs.
         Signature[] certs = mCerts.toArray(new Signature[0]);
         if (pkg.getSigningDetails() != SigningDetails.UNKNOWN
-                && !Signature.areExactMatch(certs, pkg.getSigningDetails().getSignatures())) {
+                && !Signature.areExactMatch(pkg.getSigningDetails(), certs)) {
 
             // certs aren't exact match, but the package may have rotated from the known system cert
             if (certs.length > 1 || !pkg.getSigningDetails().hasCertificate(certs[0])) {
diff --git a/services/core/java/com/android/server/pm/ScanPackageUtils.java b/services/core/java/com/android/server/pm/ScanPackageUtils.java
index f4dca3f..0cac790 100644
--- a/services/core/java/com/android/server/pm/ScanPackageUtils.java
+++ b/services/core/java/com/android/server/pm/ScanPackageUtils.java
@@ -911,8 +911,8 @@
         parsedPackage.setSignedWithPlatformKey(
                 (PLATFORM_PACKAGE_NAME.equals(parsedPackage.getPackageName())
                         || (platformPkg != null && compareSignatures(
-                        platformPkg.getSigningDetails().getSignatures(),
-                        parsedPackage.getSigningDetails().getSignatures()
+                        platformPkg.getSigningDetails(),
+                        parsedPackage.getSigningDetails()
                 ) == PackageManager.SIGNATURE_MATCH))
         );
 
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 1137681..c263978 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -327,6 +327,7 @@
     private static final String ATTR_VERSION = "version";
 
     private static final String ATTR_CE_DATA_INODE = "ceDataInode";
+    private static final String ATTR_DE_DATA_INODE = "deDataInode";
     private static final String ATTR_INSTALLED = "inst";
     private static final String ATTR_STOPPED = "stopped";
     private static final String ATTR_NOT_LAUNCHED = "nl";
@@ -1121,7 +1122,7 @@
                                     + "installed=%b)",
                                     pkgName, installUserId, user.toFullString(), installed);
                         }
-                        pkgSetting.setUserState(user.id, 0, COMPONENT_ENABLED_STATE_DEFAULT,
+                        pkgSetting.setUserState(user.id, 0, 0, COMPONENT_ENABLED_STATE_DEFAULT,
                                 installed,
                                 true /*stopped*/,
                                 true /*notLaunched*/,
@@ -1798,7 +1799,8 @@
                         // in the stopped state, but not at first boot.  Also
                         // consider all applications to be installed.
                         for (PackageSetting pkg : mPackages.values()) {
-                            pkg.setUserState(userId, 0, COMPONENT_ENABLED_STATE_DEFAULT,
+                            pkg.setUserState(userId, pkg.getCeDataInode(userId),
+                                    pkg.getDeDataInode(userId), COMPONENT_ENABLED_STATE_DEFAULT,
                                     true  /*installed*/,
                                     false /*stopped*/,
                                     false /*notLaunched*/,
@@ -1861,6 +1863,8 @@
 
                         final long ceDataInode =
                                 parser.getAttributeLong(null, ATTR_CE_DATA_INODE, 0);
+                        final long deDataInode =
+                                parser.getAttributeLong(null, ATTR_DE_DATA_INODE, 0);
                         final boolean installed =
                                 parser.getAttributeBoolean(null, ATTR_INSTALLED, true);
                         final boolean stopped =
@@ -1989,7 +1993,8 @@
                         if (blockUninstall) {
                             setBlockUninstallLPw(userId, name, true);
                         }
-                        ps.setUserState(userId, ceDataInode, enabled, installed, stopped,
+                        ps.setUserState(
+                                userId, ceDataInode, deDataInode, enabled, installed, stopped,
                                 notLaunched, hidden, distractionFlags, suspendParamsMap, instantApp,
                                 virtualPreload, enabledCaller, enabledComponents,
                                 disabledComponents, installReason, uninstallReason,
@@ -2062,8 +2067,9 @@
             if (tagName.equals(TAG_ARCHIVE_ACTIVITY_INFO)) {
                 String title = parser.getAttributeValue(null,
                         ATTR_ARCHIVE_ACTIVITY_TITLE);
-                Path iconPath = Path.of(parser.getAttributeValue(null,
-                        ATTR_ARCHIVE_ICON_PATH));
+                String iconAttribute = parser.getAttributeValue(null,
+                        ATTR_ARCHIVE_ICON_PATH);
+                Path iconPath = iconAttribute == null ? null : Path.of(iconAttribute);
                 String monochromeAttribute = parser.getAttributeValue(null,
                         ATTR_ARCHIVE_MONOCHROME_ICON_PATH);
                 Path monochromeIconPath = monochromeAttribute == null ? null : Path.of(
@@ -2305,6 +2311,10 @@
                             serializer.attributeLong(null, ATTR_CE_DATA_INODE,
                                     ustate.getCeDataInode());
                         }
+                        if (ustate.getDeDataInode() != 0) {
+                            serializer.attributeLong(null, ATTR_DE_DATA_INODE,
+                                    ustate.getDeDataInode());
+                        }
                         if (!ustate.isInstalled()) {
                             serializer.attributeBoolean(null, ATTR_INSTALLED, false);
                         }
@@ -2447,8 +2457,10 @@
         for (ArchiveState.ArchiveActivityInfo activityInfo : archiveState.getActivityInfos()) {
             serializer.startTag(null, TAG_ARCHIVE_ACTIVITY_INFO);
             serializer.attribute(null, ATTR_ARCHIVE_ACTIVITY_TITLE, activityInfo.getTitle());
-            serializer.attribute(null, ATTR_ARCHIVE_ICON_PATH,
-                    activityInfo.getIconBitmap().toAbsolutePath().toString());
+            if (activityInfo.getIconBitmap() != null) {
+                serializer.attribute(null, ATTR_ARCHIVE_ICON_PATH,
+                        activityInfo.getIconBitmap().toAbsolutePath().toString());
+            }
             if (activityInfo.getMonochromeIconBitmap() != null) {
                 serializer.attribute(null, ATTR_ARCHIVE_MONOCHROME_ICON_PATH,
                         activityInfo.getMonochromeIconBitmap().toAbsolutePath().toString());
@@ -5169,6 +5181,8 @@
             pw.print(prefix); pw.print("  User "); pw.print(user.id); pw.print(": ");
             pw.print("ceDataInode=");
             pw.print(userState.getCeDataInode());
+            pw.print(" deDataInode=");
+            pw.print(userState.getDeDataInode());
             pw.print(" installed=");
             pw.print(userState.isInstalled());
             pw.print(" hidden=");
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 803b94b..e365e83 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -2750,7 +2750,8 @@
         }
     }
 
-    private void setUserRestrictionInner(int userId, @NonNull String key, boolean value) {
+    @VisibleForTesting
+    void setUserRestrictionInner(int userId, @NonNull String key, boolean value) {
         if (!UserRestrictionsUtils.isValidRestriction(key)) {
             Slog.e(LOG_TAG, "Setting invalid restriction " + key);
             return;
@@ -4360,11 +4361,11 @@
 
             UserRestrictionsUtils.writeRestrictions(serializer,
                     mDevicePolicyUserRestrictions.getRestrictions(UserHandle.USER_ALL),
-                    TAG_DEVICE_POLICY_RESTRICTIONS);
+                    TAG_DEVICE_POLICY_GLOBAL_RESTRICTIONS);
 
             UserRestrictionsUtils.writeRestrictions(serializer,
                     mDevicePolicyUserRestrictions.getRestrictions(userInfo.id),
-                    TAG_DEVICE_POLICY_RESTRICTIONS);
+                    TAG_DEVICE_POLICY_LOCAL_RESTRICTIONS);
         }
 
         if (userData.account != null) {
diff --git a/services/core/java/com/android/server/pm/flags.aconfig b/services/core/java/com/android/server/pm/flags.aconfig
deleted file mode 100644
index e584801..0000000
--- a/services/core/java/com/android/server/pm/flags.aconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-package: "com.android.server.pm"
-
-flag {
-    name: "quarantined_enabled"
-    namespace: "package_manager_service"
-    description: "Feature flag for Quarantined state"
-    bug: "269127435"
-}
-
diff --git a/services/core/java/com/android/server/pm/pkg/ArchiveState.java b/services/core/java/com/android/server/pm/pkg/ArchiveState.java
index d44ae16..4916a4a 100644
--- a/services/core/java/com/android/server/pm/pkg/ArchiveState.java
+++ b/services/core/java/com/android/server/pm/pkg/ArchiveState.java
@@ -56,8 +56,11 @@
         @NonNull
         private final String mTitle;
 
-        /** The path to the stored icon of the activity in the app's locale. */
-        @NonNull
+        /**
+         * The path to the stored icon of the activity in the app's locale. Null if the app does
+         * not define any icon (default icon would be shown on the launcher).
+         */
+        @Nullable
         private final Path mIconBitmap;
 
         /** See {@link #mIconBitmap}. Only set if the app defined a monochrome icon. */
@@ -85,21 +88,20 @@
          * @param title
          *   Corresponds to the activity's android:label in the app's locale.
          * @param iconBitmap
-         *   The path to the stored icon of the activity in the app's locale.
+         *   The path to the stored icon of the activity in the app's locale. Null if the app does
+         *   not define any icon (default icon would be shown on the launcher).
          * @param monochromeIconBitmap
          *   See {@link #mIconBitmap}. Only set if the app defined a monochrome icon.
          */
         @DataClass.Generated.Member
         public ArchiveActivityInfo(
                 @NonNull String title,
-                @NonNull Path iconBitmap,
+                @Nullable Path iconBitmap,
                 @Nullable Path monochromeIconBitmap) {
             this.mTitle = title;
             com.android.internal.util.AnnotationValidations.validate(
                     NonNull.class, null, mTitle);
             this.mIconBitmap = iconBitmap;
-            com.android.internal.util.AnnotationValidations.validate(
-                    NonNull.class, null, mIconBitmap);
             this.mMonochromeIconBitmap = monochromeIconBitmap;
 
             // onConstructed(); // You can define this method to get a callback
@@ -114,10 +116,11 @@
         }
 
         /**
-         * The path to the stored icon of the activity in the app's locale.
+         * The path to the stored icon of the activity in the app's locale. Null if the app does
+         * not define any icon (default icon would be shown on the launcher).
          */
         @DataClass.Generated.Member
-        public @NonNull Path getIconBitmap() {
+        public @Nullable Path getIconBitmap() {
             return mIconBitmap;
         }
 
@@ -174,10 +177,10 @@
         }
 
         @DataClass.Generated(
-                time = 1689169065133L,
+                time = 1693590309015L,
                 codegenVersion = "1.0.23",
                 sourceFile = "frameworks/base/services/core/java/com/android/server/pm/pkg/ArchiveState.java",
-                inputSignatures = "private final @android.annotation.NonNull java.lang.String mTitle\nprivate final @android.annotation.NonNull java.nio.file.Path mIconBitmap\nprivate final @android.annotation.Nullable java.nio.file.Path mMonochromeIconBitmap\nclass ArchiveActivityInfo extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true)")
+                inputSignatures = "private final @android.annotation.NonNull java.lang.String mTitle\nprivate final @android.annotation.Nullable java.nio.file.Path mIconBitmap\nprivate final @android.annotation.Nullable java.nio.file.Path mMonochromeIconBitmap\nclass ArchiveActivityInfo extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true)")
         @Deprecated
         private void __metadata() {}
 
@@ -292,7 +295,7 @@
     }
 
     @DataClass.Generated(
-            time = 1689169065144L,
+            time = 1693590309027L,
             codegenVersion = "1.0.23",
             sourceFile = "frameworks/base/services/core/java/com/android/server/pm/pkg/ArchiveState.java",
             inputSignatures = "private final @android.annotation.NonNull java.util.List<com.android.server.pm.pkg.ArchiveActivityInfo> mActivityInfos\nprivate final @android.annotation.NonNull java.lang.String mInstallerTitle\nclass ArchiveState extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true)")
diff --git a/services/core/java/com/android/server/pm/pkg/PackageUserState.java b/services/core/java/com/android/server/pm/pkg/PackageUserState.java
index c05b3c2..2a81a86 100644
--- a/services/core/java/com/android/server/pm/pkg/PackageUserState.java
+++ b/services/core/java/com/android/server/pm/pkg/PackageUserState.java
@@ -86,6 +86,13 @@
     long getCeDataInode();
 
     /**
+     * Device encrypted /data partition inode.
+     *
+     * @hide
+     */
+    long getDeDataInode();
+
+    /**
      * Fully qualified class names of components explicitly disabled.
      *
      * @hide
diff --git a/services/core/java/com/android/server/pm/pkg/PackageUserStateDefault.java b/services/core/java/com/android/server/pm/pkg/PackageUserStateDefault.java
index fc4b686..2f4ad2d8 100644
--- a/services/core/java/com/android/server/pm/pkg/PackageUserStateDefault.java
+++ b/services/core/java/com/android/server/pm/pkg/PackageUserStateDefault.java
@@ -77,6 +77,11 @@
     }
 
     @Override
+    public long getDeDataInode() {
+        return 0;
+    }
+
+    @Override
     public int getDistractionFlags() {
         return 0;
     }
diff --git a/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java b/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java
index 0b35d8a..12795c6 100644
--- a/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java
+++ b/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java
@@ -91,6 +91,7 @@
     protected WatchedArraySet<String> mEnabledComponentsWatched;
 
     private long mCeDataInode;
+    private long mDeDataInode;
     private int mDistractionFlags;
     @PackageManager.EnabledState
     private int mEnabledState = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
@@ -172,6 +173,7 @@
         mSharedLibraryOverlayPaths = other.mSharedLibraryOverlayPaths == null
                 ? null : other.mSharedLibraryOverlayPaths.snapshot();
         mCeDataInode = other.mCeDataInode;
+        mDeDataInode = other.mDeDataInode;
         mDistractionFlags = other.mDistractionFlags;
         mEnabledState = other.mEnabledState;
         mInstallReason = other.mInstallReason;
@@ -444,6 +446,12 @@
         return this;
     }
 
+    public @NonNull PackageUserStateImpl setDeDataInode(long value) {
+        mDeDataInode = value;
+        onChanged();
+        return this;
+    }
+
     public @NonNull PackageUserStateImpl setInstalled(boolean value) {
         setBoolean(Booleans.INSTALLED, value);
         onChanged();
@@ -687,7 +695,7 @@
 
     @Override
     public boolean dataExists() {
-        return getCeDataInode() > 0;
+        return getCeDataInode() > 0 || getDeDataInode() > 0;
     }
 
 
@@ -721,6 +729,11 @@
     }
 
     @DataClass.Generated.Member
+    public long getDeDataInode() {
+        return mDeDataInode;
+    }
+
+    @DataClass.Generated.Member
     public int getDistractionFlags() {
         return mDistractionFlags;
     }
@@ -849,6 +862,7 @@
                 && Objects.equals(mDisabledComponentsWatched, that.mDisabledComponentsWatched)
                 && Objects.equals(mEnabledComponentsWatched, that.mEnabledComponentsWatched)
                 && mCeDataInode == that.mCeDataInode
+                && mDeDataInode == that.mDeDataInode
                 && mDistractionFlags == that.mDistractionFlags
                 && mEnabledState == that.mEnabledState
                 && mInstallReason == that.mInstallReason
@@ -878,6 +892,7 @@
         _hash = 31 * _hash + Objects.hashCode(mDisabledComponentsWatched);
         _hash = 31 * _hash + Objects.hashCode(mEnabledComponentsWatched);
         _hash = 31 * _hash + Long.hashCode(mCeDataInode);
+        _hash = 31 * _hash + Long.hashCode(mDeDataInode);
         _hash = 31 * _hash + mDistractionFlags;
         _hash = 31 * _hash + mEnabledState;
         _hash = 31 * _hash + mInstallReason;
@@ -898,10 +913,10 @@
     }
 
     @DataClass.Generated(
-            time = 1691601685901L,
+            time = 1694196888631L,
             codegenVersion = "1.0.23",
             sourceFile = "frameworks/base/services/core/java/com/android/server/pm/pkg/PackageUserStateImpl.java",
-            inputSignatures = "private  int mBooleans\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArraySet<java.lang.String> mDisabledComponentsWatched\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArraySet<java.lang.String> mEnabledComponentsWatched\nprivate  long mCeDataInode\nprivate  int mDistractionFlags\nprivate @android.content.pm.PackageManager.EnabledState int mEnabledState\nprivate @android.content.pm.PackageManager.InstallReason int mInstallReason\nprivate @android.content.pm.PackageManager.UninstallReason int mUninstallReason\nprivate @android.annotation.Nullable java.lang.String mHarmfulAppWarning\nprivate @android.annotation.Nullable java.lang.String mLastDisableAppCaller\nprivate @android.annotation.Nullable android.content.pm.overlay.OverlayPaths mOverlayPaths\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<java.lang.String,android.content.pm.overlay.OverlayPaths> mSharedLibraryOverlayPaths\nprivate @android.annotation.Nullable java.lang.String mSplashScreenTheme\nprivate @android.content.pm.PackageManager.UserMinAspectRatio int mMinAspectRatio\nprivate @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams> mSuspendParams\nprivate @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<android.content.ComponentName,android.util.Pair<java.lang.String,java.lang.Integer>> mComponentLabelIconOverrideMap\nprivate @android.annotation.CurrentTimeMillisLong long mFirstInstallTimeMillis\nprivate @android.annotation.Nullable com.android.server.utils.Watchable mWatchable\nprivate @android.annotation.Nullable com.android.server.pm.pkg.ArchiveState mArchiveState\nfinal @android.annotation.NonNull com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl> mSnapshot\nprivate  void setBoolean(int,boolean)\nprivate  boolean getBoolean(int)\nprivate  com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl> makeCache()\nprivate  void onChanged()\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageUserStateImpl snapshot()\npublic @android.annotation.Nullable boolean setOverlayPaths(android.content.pm.overlay.OverlayPaths)\npublic  boolean setSharedLibraryOverlayPaths(java.lang.String,android.content.pm.overlay.OverlayPaths)\npublic @android.annotation.Nullable @java.lang.Override com.android.server.utils.WatchedArraySet<java.lang.String> getDisabledComponentsNoCopy()\npublic @android.annotation.Nullable @java.lang.Override com.android.server.utils.WatchedArraySet<java.lang.String> getEnabledComponentsNoCopy()\npublic @android.annotation.NonNull @java.lang.Override android.util.ArraySet<java.lang.String> getDisabledComponents()\npublic @android.annotation.NonNull @java.lang.Override android.util.ArraySet<java.lang.String> getEnabledComponents()\npublic @java.lang.Override boolean isComponentEnabled(java.lang.String)\npublic @java.lang.Override boolean isComponentDisabled(java.lang.String)\npublic @java.lang.Override android.content.pm.overlay.OverlayPaths getAllOverlayPaths()\npublic @com.android.internal.annotations.VisibleForTesting boolean overrideLabelAndIcon(android.content.ComponentName,java.lang.String,java.lang.Integer)\npublic  void resetOverrideComponentLabelIcon()\npublic @android.annotation.Nullable android.util.Pair<java.lang.String,java.lang.Integer> getOverrideLabelIconForComponent(android.content.ComponentName)\npublic @java.lang.Override boolean isSuspended()\npublic  com.android.server.pm.pkg.PackageUserStateImpl putSuspendParams(java.lang.String,com.android.server.pm.pkg.SuspendParams)\npublic  com.android.server.pm.pkg.PackageUserStateImpl removeSuspension(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDisabledComponents(android.util.ArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledComponents(android.util.ArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDisabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setCeDataInode(long)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstalled(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setStopped(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setNotLaunched(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setHidden(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDistractionFlags(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstantApp(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setVirtualPreload(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledState(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstallReason(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setUninstallReason(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setHarmfulAppWarning(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setLastDisableAppCaller(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSharedLibraryOverlayPaths(android.util.ArrayMap<java.lang.String,android.content.pm.overlay.OverlayPaths>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSplashScreenTheme(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setMinAspectRatio(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSuspendParams(android.util.ArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setComponentLabelIconOverrideMap(android.util.ArrayMap<android.content.ComponentName,android.util.Pair<java.lang.String,java.lang.Integer>>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setFirstInstallTimeMillis(long)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setArchiveState(com.android.server.pm.pkg.ArchiveState)\npublic @android.annotation.NonNull @java.lang.Override java.util.Map<java.lang.String,android.content.pm.overlay.OverlayPaths> getSharedLibraryOverlayPaths()\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setWatchable(com.android.server.utils.Watchable)\nprivate  boolean watchableEquals(com.android.server.utils.Watchable)\nprivate  int watchableHashCode()\nprivate  boolean snapshotEquals(com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl>)\nprivate  int snapshotHashCode()\npublic @java.lang.Override boolean isInstalled()\npublic @java.lang.Override boolean isStopped()\npublic @java.lang.Override boolean isNotLaunched()\npublic @java.lang.Override boolean isHidden()\npublic @java.lang.Override boolean isInstantApp()\npublic @java.lang.Override boolean isVirtualPreload()\nclass PackageUserStateImpl extends com.android.server.utils.WatchableImpl implements [com.android.server.pm.pkg.PackageUserStateInternal, com.android.server.utils.Snappable]\nprivate static final  int INSTALLED\nprivate static final  int STOPPED\nprivate static final  int NOT_LAUNCHED\nprivate static final  int HIDDEN\nprivate static final  int INSTANT_APP\nprivate static final  int VIRTUAL_PRELOADED\nclass Booleans extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=false, genEqualsHashCode=true)")
+            inputSignatures = "private  int mBooleans\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArraySet<java.lang.String> mDisabledComponentsWatched\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArraySet<java.lang.String> mEnabledComponentsWatched\nprivate  long mCeDataInode\nprivate  long mDeDataInode\nprivate  int mDistractionFlags\nprivate @android.content.pm.PackageManager.EnabledState int mEnabledState\nprivate @android.content.pm.PackageManager.InstallReason int mInstallReason\nprivate @android.content.pm.PackageManager.UninstallReason int mUninstallReason\nprivate @android.annotation.Nullable java.lang.String mHarmfulAppWarning\nprivate @android.annotation.Nullable java.lang.String mLastDisableAppCaller\nprivate @android.annotation.Nullable android.content.pm.overlay.OverlayPaths mOverlayPaths\nprotected @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<java.lang.String,android.content.pm.overlay.OverlayPaths> mSharedLibraryOverlayPaths\nprivate @android.annotation.Nullable java.lang.String mSplashScreenTheme\nprivate @android.content.pm.PackageManager.UserMinAspectRatio int mMinAspectRatio\nprivate @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams> mSuspendParams\nprivate @android.annotation.Nullable com.android.server.utils.WatchedArrayMap<android.content.ComponentName,android.util.Pair<java.lang.String,java.lang.Integer>> mComponentLabelIconOverrideMap\nprivate @android.annotation.CurrentTimeMillisLong long mFirstInstallTimeMillis\nprivate @android.annotation.Nullable com.android.server.utils.Watchable mWatchable\nprivate @android.annotation.Nullable com.android.server.pm.pkg.ArchiveState mArchiveState\nfinal @android.annotation.NonNull com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl> mSnapshot\nprivate  void setBoolean(int,boolean)\nprivate  boolean getBoolean(int)\nprivate  com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl> makeCache()\nprivate  void onChanged()\npublic @android.annotation.NonNull @java.lang.Override com.android.server.pm.pkg.PackageUserStateImpl snapshot()\npublic @android.annotation.Nullable boolean setOverlayPaths(android.content.pm.overlay.OverlayPaths)\npublic  boolean setSharedLibraryOverlayPaths(java.lang.String,android.content.pm.overlay.OverlayPaths)\npublic @android.annotation.Nullable @java.lang.Override com.android.server.utils.WatchedArraySet<java.lang.String> getDisabledComponentsNoCopy()\npublic @android.annotation.Nullable @java.lang.Override com.android.server.utils.WatchedArraySet<java.lang.String> getEnabledComponentsNoCopy()\npublic @android.annotation.NonNull @java.lang.Override android.util.ArraySet<java.lang.String> getDisabledComponents()\npublic @android.annotation.NonNull @java.lang.Override android.util.ArraySet<java.lang.String> getEnabledComponents()\npublic @java.lang.Override boolean isComponentEnabled(java.lang.String)\npublic @java.lang.Override boolean isComponentDisabled(java.lang.String)\npublic @java.lang.Override android.content.pm.overlay.OverlayPaths getAllOverlayPaths()\npublic @com.android.internal.annotations.VisibleForTesting boolean overrideLabelAndIcon(android.content.ComponentName,java.lang.String,java.lang.Integer)\npublic  void resetOverrideComponentLabelIcon()\npublic @android.annotation.Nullable android.util.Pair<java.lang.String,java.lang.Integer> getOverrideLabelIconForComponent(android.content.ComponentName)\npublic @java.lang.Override boolean isSuspended()\npublic  com.android.server.pm.pkg.PackageUserStateImpl putSuspendParams(java.lang.String,com.android.server.pm.pkg.SuspendParams)\npublic  com.android.server.pm.pkg.PackageUserStateImpl removeSuspension(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDisabledComponents(android.util.ArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledComponents(android.util.ArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDisabledComponents(com.android.server.utils.WatchedArraySet<java.lang.String>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setCeDataInode(long)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDeDataInode(long)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstalled(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setStopped(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setNotLaunched(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setHidden(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setDistractionFlags(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstantApp(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setVirtualPreload(boolean)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setEnabledState(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setInstallReason(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setUninstallReason(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setHarmfulAppWarning(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setLastDisableAppCaller(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSharedLibraryOverlayPaths(android.util.ArrayMap<java.lang.String,android.content.pm.overlay.OverlayPaths>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSplashScreenTheme(java.lang.String)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setMinAspectRatio(int)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setSuspendParams(android.util.ArrayMap<java.lang.String,com.android.server.pm.pkg.SuspendParams>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setComponentLabelIconOverrideMap(android.util.ArrayMap<android.content.ComponentName,android.util.Pair<java.lang.String,java.lang.Integer>>)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setFirstInstallTimeMillis(long)\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setArchiveState(com.android.server.pm.pkg.ArchiveState)\npublic @android.annotation.NonNull @java.lang.Override java.util.Map<java.lang.String,android.content.pm.overlay.OverlayPaths> getSharedLibraryOverlayPaths()\npublic @android.annotation.NonNull com.android.server.pm.pkg.PackageUserStateImpl setWatchable(com.android.server.utils.Watchable)\nprivate  boolean watchableEquals(com.android.server.utils.Watchable)\nprivate  int watchableHashCode()\nprivate  boolean snapshotEquals(com.android.server.utils.SnapshotCache<com.android.server.pm.pkg.PackageUserStateImpl>)\nprivate  int snapshotHashCode()\npublic @java.lang.Override boolean isInstalled()\npublic @java.lang.Override boolean isStopped()\npublic @java.lang.Override boolean isNotLaunched()\npublic @java.lang.Override boolean isHidden()\npublic @java.lang.Override boolean isInstantApp()\npublic @java.lang.Override boolean isVirtualPreload()\npublic @java.lang.Override boolean isQuarantined()\npublic @java.lang.Override boolean dataExists()\nclass PackageUserStateImpl extends com.android.server.utils.WatchableImpl implements [com.android.server.pm.pkg.PackageUserStateInternal, com.android.server.utils.Snappable]\nprivate static final  int INSTALLED\nprivate static final  int STOPPED\nprivate static final  int NOT_LAUNCHED\nprivate static final  int HIDDEN\nprivate static final  int INSTANT_APP\nprivate static final  int VIRTUAL_PRELOADED\nclass Booleans extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=false, genEqualsHashCode=true)")
     @Deprecated
     private void __metadata() {}
 
diff --git a/services/core/java/com/android/server/pm/pkg/SuspendParams.java b/services/core/java/com/android/server/pm/pkg/SuspendParams.java
index 4e08106..86391c9 100644
--- a/services/core/java/com/android/server/pm/pkg/SuspendParams.java
+++ b/services/core/java/com/android/server/pm/pkg/SuspendParams.java
@@ -17,6 +17,7 @@
 package com.android.server.pm.pkg;
 
 import android.annotation.Nullable;
+import android.content.pm.Flags;
 import android.content.pm.SuspendDialogInfo;
 import android.os.BaseBundle;
 import android.os.PersistableBundle;
@@ -24,7 +25,6 @@
 
 import com.android.modules.utils.TypedXmlPullParser;
 import com.android.modules.utils.TypedXmlSerializer;
-import com.android.server.pm.Flags;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
diff --git a/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java b/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java
index 81c2f07..812e228 100644
--- a/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java
+++ b/services/core/java/com/android/server/pm/pkg/parsing/ParsingPackageUtils.java
@@ -3267,8 +3267,7 @@
         if (existingSigningDetails == SigningDetails.UNKNOWN) {
             return verified;
         } else {
-            if (!Signature.areExactMatch(existingSigningDetails.getSignatures(),
-                    verified.getResult().getSignatures())) {
+            if (!Signature.areExactMatch(existingSigningDetails, verified.getResult())) {
                 return input.error(INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES,
                         baseCodePath + " has mismatched certificates");
             }
diff --git a/services/core/java/com/android/server/security/Android.bp b/services/core/java/com/android/server/security/Android.bp
deleted file mode 100644
index 3f644c44..0000000
--- a/services/core/java/com/android/server/security/Android.bp
+++ /dev/null
@@ -1,17 +0,0 @@
-aconfig_declarations {
-    name: "com.android.server.security.flags-aconfig",
-    package: "com.android.server.security",
-    srcs: ["*.aconfig"],
-}
-
-java_aconfig_library {
-    name: "com.android.server.security.flags-aconfig-java",
-    aconfig_declarations: "com.android.server.security.flags-aconfig",
-}
-
-java_aconfig_library {
-    name: "com.android.server.security.flags-aconfig-java-host",
-    aconfig_declarations: "com.android.server.security.flags-aconfig",
-    host_supported: true,
-    test: true,
-}
diff --git a/services/core/java/com/android/server/security/FileIntegrityService.java b/services/core/java/com/android/server/security/FileIntegrityService.java
index 0879d95..a49df50 100644
--- a/services/core/java/com/android/server/security/FileIntegrityService.java
+++ b/services/core/java/com/android/server/security/FileIntegrityService.java
@@ -90,7 +90,7 @@
                 @NonNull String packageName) {
             checkCallerPermission(packageName);
 
-            if (Flags.deprecateFsvSig()) {
+            if (android.security.Flags.deprecateFsvSig()) {
                 // When deprecated, stop telling the caller that any app source certificate is
                 // trusted on the current device. This behavior is also consistent with devices
                 // without this feature support.
diff --git a/services/core/java/com/android/server/security/TEST_MAPPING b/services/core/java/com/android/server/security/TEST_MAPPING
new file mode 100644
index 0000000..673456f
--- /dev/null
+++ b/services/core/java/com/android/server/security/TEST_MAPPING
@@ -0,0 +1,13 @@
+{
+    "postsubmit": [
+        {
+            "name": "CtsSecurityTestCases",
+            "options": [
+                {
+                    "include-filter": "android.security.cts.FileIntegrityManagerTest"
+                }
+            ],
+            "file_patterns": ["FileIntegrity[^/]*\\.java"]
+        }
+    ]
+}
diff --git a/services/core/java/com/android/server/security/flags.aconfig b/services/core/java/com/android/server/security/flags.aconfig
deleted file mode 100644
index 0440989f..0000000
--- a/services/core/java/com/android/server/security/flags.aconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-package: "com.android.server.security"
-
-flag {
-    name: "deprecate_fsv_sig"
-    namespace: "hardware_backed_security"
-    description: "Feature flag for deprecating .fsv_sig"
-    bug: "277916185"
-}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 9905ddf..635e11b 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -159,10 +159,26 @@
     private VirtualDeviceManagerInternal mVirtualDeviceManager;
 
     private enum TrustState {
-        UNTRUSTED, // the phone is not unlocked by any trustagents
-        TRUSTABLE, // the phone is in a semi-locked state that can be unlocked if
-        // FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE is passed and a trustagent is trusted
-        TRUSTED // the phone is unlocked
+        // UNTRUSTED means that TrustManagerService is currently *not* giving permission for the
+        // user's Keyguard to be dismissed, and grants of trust by trust agents are remembered in
+        // the corresponding TrustAgentWrapper but are not recognized until the device is unlocked
+        // for the user.  I.e., if the device is locked and the state is UNTRUSTED, it cannot be
+        // unlocked by a trust agent.  Automotive devices are an exception; grants of trust are
+        // always recognized on them.
+        UNTRUSTED,
+
+        // TRUSTABLE is the same as UNTRUSTED except that new grants of trust using
+        // FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE are recognized for moving to TRUSTED.  I.e., if
+        // the device is locked and the state is TRUSTABLE, it can be unlocked by a trust agent,
+        // provided that the trust agent chooses to use Active Unlock.  The TRUSTABLE state is only
+        // possible as a result of a downgrade from TRUSTED, after a trust agent used
+        // FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE in its most recent grant.
+        TRUSTABLE,
+
+        // TRUSTED means that TrustManagerService is currently giving permission for the user's
+        // Keyguard to be dismissed.  This implies that the device is unlocked for the user (where
+        // the case of Keyguard showing but dismissible just with swipe counts as "unlocked").
+        TRUSTED
     };
 
     @GuardedBy("mUserTrustState")
@@ -744,6 +760,12 @@
         }
     }
 
+    private TrustState getUserTrustStateInner(int userId) {
+        synchronized (mUserTrustState) {
+            return mUserTrustState.get(userId, TrustState.UNTRUSTED);
+        }
+    }
+
     boolean isDeviceLockedInner(int userId) {
         synchronized (mDeviceLockedForUser) {
             return mDeviceLockedForUser.get(userId, true);
@@ -806,7 +828,12 @@
                 continue;
             }
 
-            boolean trusted = aggregateIsTrusted(id);
+            final boolean trusted;
+            if (android.security.Flags.fixUnlockedDeviceRequiredKeys()) {
+                trusted = getUserTrustStateInner(id) == TrustState.TRUSTED;
+            } else {
+                trusted = aggregateIsTrusted(id);
+            }
             boolean showingKeyguard = true;
             boolean biometricAuthenticated = false;
             boolean currentUserIsUnlocked = false;
@@ -1627,7 +1654,7 @@
             if (isCurrent) {
                 fout.print(" (current)");
             }
-            fout.print(": trusted=" + dumpBool(aggregateIsTrusted(user.id)));
+            fout.print(": trustState=" + getUserTrustStateInner(user.id));
             fout.print(", trustManaged=" + dumpBool(aggregateIsTrustManaged(user.id)));
             fout.print(", deviceLocked=" + dumpBool(isDeviceLockedInner(user.id)));
             fout.print(", isActiveUnlockRunning=" + dumpBool(
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index ddc0519..3c2d0fc 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -326,9 +326,6 @@
                             if (DEBUG) {
                                 Slog.d(TAG, "publish system wallpaper changed!");
                             }
-                            if (localSync != null) {
-                                localSync.complete();
-                            }
                             notifyWallpaperChanged(wallpaper);
                         }
                     };
@@ -336,7 +333,7 @@
                     // If this was the system wallpaper, rebind...
                     bindWallpaperComponentLocked(mImageWallpaper, true, false, wallpaper,
                             callback);
-                    notifyColorsWhich |= FLAG_SYSTEM;
+                    notifyColorsWhich |= wallpaper.mWhich;
                 }
 
                 if (lockWallpaperChanged) {
@@ -350,9 +347,6 @@
                             if (DEBUG) {
                                 Slog.d(TAG, "publish lock wallpaper changed!");
                             }
-                            if (localSync != null) {
-                                localSync.complete();
-                            }
                             notifyWallpaperChanged(wallpaper);
                         }
                     };
@@ -377,9 +371,8 @@
                 }
 
                 saveSettingsLocked(wallpaper.userId);
-                // Notify the client immediately if only lockscreen wallpaper changed.
-                if (lockWallpaperChanged && !sysWallpaperChanged) {
-                    notifyWallpaperChanged(wallpaper);
+                if ((sysWallpaperChanged || lockWallpaperChanged) && localSync != null) {
+                    localSync.complete();
                 }
             }
 
@@ -1012,11 +1005,11 @@
                     return;
                 }
 
-                if (!mWallpaper.wallpaperUpdating
-                        && mWallpaper.userId == mCurrentUserId) {
+                if (!mWallpaper.wallpaperUpdating && mWallpaper.userId == mCurrentUserId) {
                     Slog.w(TAG, "Wallpaper reconnect timed out for " + mWallpaper.wallpaperComponent
                             + ", reverting to built-in wallpaper!");
-                    clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+                    int which = mIsLockscreenLiveWallpaperEnabled ? mWallpaper.mWhich : FLAG_SYSTEM;
+                    clearWallpaperLocked(which, mWallpaper.userId, null);
                 }
             }
         };
@@ -1196,7 +1189,7 @@
                 } else {
                     // Timeout
                     Slog.w(TAG, "Reverting to built-in wallpaper!");
-                    clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+                    clearWallpaperLocked(mWallpaper.mWhich, mWallpaper.userId, null);
                     final String flattened = wpService.flattenToString();
                     EventLog.writeEvent(EventLogTags.WP_WALLPAPER_CRASHED,
                             flattened.substring(0, Math.min(flattened.length(),
@@ -1235,7 +1228,8 @@
                             } else {
                                 if (mLmkLimitRebindRetries <= 0) {
                                     Slog.w(TAG, "Reverting to built-in wallpaper due to lmk!");
-                                    clearWallpaperLocked(FLAG_SYSTEM, mWallpaper.userId, null);
+                                    clearWallpaperLocked(
+                                            mWallpaper.mWhich, mWallpaper.userId, null);
                                     mLmkLimitRebindRetries = LMK_RECONNECT_REBIND_RETRIES;
                                     return;
                                 }
@@ -1426,7 +1420,6 @@
                             lockWp.connection.mWallpaper = lockWp;
                             mOriginalSystem.mWhich = FLAG_LOCK;
                             updateEngineFlags(mOriginalSystem);
-                            notifyWallpaperColorsChanged(lockWp, FLAG_LOCK);
                         } else {
                             // Failed rename, use current system wp for both
                             if (DEBUG) {
@@ -1446,7 +1439,6 @@
                         updateEngineFlags(mOriginalSystem);
                         mLockWallpaperMap.put(mNewWallpaper.userId, mOriginalSystem);
                         mLastLockWallpaper = mOriginalSystem;
-                        notifyWallpaperColorsChanged(mOriginalSystem, FLAG_LOCK);
                     }
                 } else if (mNewWallpaper.mWhich == FLAG_LOCK) {
                     // New wp is lock only, so old system+lock is now system only
@@ -1460,10 +1452,7 @@
                     }
                 }
             }
-
-            synchronized (mLock) {
-                saveSettingsLocked(mNewWallpaper.userId);
-            }
+            saveSettingsLocked(mNewWallpaper.userId);
 
             if (DEBUG) {
                 Slog.v(TAG, "--- wallpaper changed --");
@@ -1482,8 +1471,7 @@
                 if (mCurrentUserId != getChangingUserId()) {
                     return;
                 }
-                WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
-                if (wallpaper != null) {
+                for (WallpaperData wallpaper: getWallpapers()) {
                     final ComponentName wpService = wallpaper.wallpaperComponent;
                     if (wpService != null && wpService.getPackageName().equals(packageName)) {
                         if (DEBUG_LIVE) {
@@ -1495,7 +1483,9 @@
                                 wallpaper, null)) {
                             Slog.w(TAG, "Wallpaper " + wpService
                                     + " no longer available; reverting to default");
-                            clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+                            int which = mIsLockscreenLiveWallpaperEnabled
+                                    ? wallpaper.mWhich : FLAG_SYSTEM;
+                            clearWallpaperLocked(which, wallpaper.userId, null);
                         }
                     }
                 }
@@ -1508,13 +1498,11 @@
                 if (mCurrentUserId != getChangingUserId()) {
                     return;
                 }
-                WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
-                if (wallpaper != null) {
-                    if (wallpaper.wallpaperComponent == null
-                            || !wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
-                        return;
+                for (WallpaperData wallpaper: getWallpapers()) {
+                    if (wallpaper.wallpaperComponent != null
+                            && wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
+                        doPackagesChangedLocked(true, wallpaper);
                     }
-                    doPackagesChangedLocked(true, wallpaper);
                 }
             }
         }
@@ -1525,8 +1513,7 @@
                 if (mCurrentUserId != getChangingUserId()) {
                     return;
                 }
-                WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
-                if (wallpaper != null) {
+                for (WallpaperData wallpaper: getWallpapers()) {
                     if (wallpaper.wallpaperComponent != null
                             && wallpaper.wallpaperComponent.getPackageName().equals(packageName)) {
                         if (DEBUG_LIVE) {
@@ -1550,8 +1537,7 @@
                 if (mCurrentUserId != getChangingUserId()) {
                     return false;
                 }
-                WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
-                if (wallpaper != null) {
+                for (WallpaperData wallpaper: getWallpapers()) {
                     boolean res = doPackagesChangedLocked(doit, wallpaper);
                     changed |= res;
                 }
@@ -1565,8 +1551,7 @@
                 if (mCurrentUserId != getChangingUserId()) {
                     return;
                 }
-                WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
-                if (wallpaper != null) {
+                for (WallpaperData wallpaper: getWallpapers()) {
                     doPackagesChangedLocked(true, wallpaper);
                 }
             }
@@ -1574,6 +1559,7 @@
 
         boolean doPackagesChangedLocked(boolean doit, WallpaperData wallpaper) {
             boolean changed = false;
+            int which = mIsLockscreenLiveWallpaperEnabled ? wallpaper.mWhich : FLAG_SYSTEM;
             if (wallpaper.wallpaperComponent != null) {
                 int change = isPackageDisappearing(wallpaper.wallpaperComponent
                         .getPackageName());
@@ -1583,7 +1569,7 @@
                     if (doit) {
                         Slog.w(TAG, "Wallpaper uninstalled, removing: "
                                 + wallpaper.wallpaperComponent);
-                        clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+                        clearWallpaperLocked(which, wallpaper.userId, null);
                     }
                 }
             }
@@ -1604,7 +1590,7 @@
                 } catch (NameNotFoundException e) {
                     Slog.w(TAG, "Wallpaper component gone, removing: "
                             + wallpaper.wallpaperComponent);
-                    clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
+                    clearWallpaperLocked(which, wallpaper.userId, null);
                 }
             }
             if (wallpaper.nextWallpaperComponent != null
@@ -1720,7 +1706,8 @@
                 if (DEBUG) {
                     Slog.i(TAG, "Unable to regenerate crop; resetting");
                 }
-                clearWallpaperLocked(FLAG_SYSTEM, UserHandle.USER_SYSTEM, null);
+                int which = isLockscreenLiveWallpaperEnabled() ? wallpaper.mWhich : FLAG_SYSTEM;
+                clearWallpaperLocked(which, UserHandle.USER_SYSTEM, null);
             }
         } else {
             if (DEBUG) {
@@ -2000,12 +1987,7 @@
             WallpaperData wallpaper, IRemoteCallback reply, ServiceInfo serviceInfo) {
 
         if (serviceInfo == null) {
-            if (wallpaper.mWhich == (FLAG_LOCK | FLAG_SYSTEM)) {
-                clearWallpaperLocked(FLAG_SYSTEM, wallpaper.userId, null);
-                clearWallpaperLocked(FLAG_LOCK, wallpaper.userId, reply);
-            } else {
-                clearWallpaperLocked(wallpaper.mWhich, wallpaper.userId, reply);
-            }
+            clearWallpaperLocked(wallpaper.mWhich, wallpaper.userId, reply);
             return;
         }
         Slog.w(TAG, "Wallpaper isn't direct boot aware; using fallback until unlocked");
@@ -2026,7 +2008,7 @@
 
     @Override
     public void clearWallpaper(String callingPackage, int which, int userId) {
-        if (DEBUG) Slog.v(TAG, "clearWallpaper");
+        if (DEBUG) Slog.v(TAG, "clearWallpaper: " + which);
         checkPermission(android.Manifest.permission.SET_WALLPAPER);
         if (!isWallpaperSupported(callingPackage) || !isSetWallpaperAllowed(callingPackage)) {
             return;
@@ -2037,7 +2019,8 @@
         WallpaperData data = null;
         synchronized (mLock) {
             if (mIsLockscreenLiveWallpaperEnabled) {
-                clearWallpaperLocked(callingPackage, which, userId);
+                boolean fromForeground = isFromForegroundApp(callingPackage);
+                clearWallpaperLocked(which, userId, fromForeground, null);
             } else {
                 clearWallpaperLocked(which, userId, null);
             }
@@ -2057,7 +2040,8 @@
         }
     }
 
-    private void clearWallpaperLocked(String callingPackage, int which, int userId) {
+    private void clearWallpaperLocked(int which, int userId, boolean fromForeground,
+            IRemoteCallback reply) {
 
         // Might need to bring it in the first time to establish our rewrite
         if (!mWallpaperMap.contains(userId)) {
@@ -2096,8 +2080,10 @@
                 finalWhich = which;
             }
 
-            boolean success = withCleanCallingIdentity(() -> setWallpaperComponent(
-                    component, callingPackage, finalWhich, userId));
+            // except for the lock case (for which we keep the system wallpaper as-is), force rebind
+            boolean force = which != FLAG_LOCK;
+            boolean success = withCleanCallingIdentity(() -> setWallpaperComponentInternal(
+                    component, finalWhich, userId, force, fromForeground, reply));
             if (success) return;
         } catch (IllegalArgumentException e1) {
             e = e1;
@@ -2109,10 +2095,23 @@
         // wallpaper.
         Slog.e(TAG, "Default wallpaper component not found!", e);
         withCleanCallingIdentity(() -> clearWallpaperComponentLocked(wallpaper));
+        if (reply != null) {
+            try {
+                reply.sendResult(null);
+            } catch (RemoteException e1) {
+                Slog.w(TAG, "Failed to notify callback after wallpaper clear", e1);
+            }
+        }
     }
 
-    // TODO(b/266818039) remove this version of the method
+    // TODO(b/266818039) remove
     private void clearWallpaperLocked(int which, int userId, IRemoteCallback reply) {
+
+        if (mIsLockscreenLiveWallpaperEnabled) {
+            clearWallpaperLocked(which, userId, false, reply);
+            return;
+        }
+
         if (which != FLAG_SYSTEM && which != FLAG_LOCK) {
             throw new IllegalArgumentException("Must specify exactly one kind of wallpaper to clear");
         }
@@ -2827,6 +2826,18 @@
                 : new WallpaperData[0];
     }
 
+    // TODO(b/266818039) remove
+    private WallpaperData[] getWallpapers() {
+        WallpaperData systemWallpaper = mWallpaperMap.get(mCurrentUserId);
+        WallpaperData lockWallpaper = mLockWallpaperMap.get(mCurrentUserId);
+        boolean systemValid = systemWallpaper != null;
+        boolean lockValid = lockWallpaper != null && !isLockscreenLiveWallpaperEnabled();
+        return systemValid && lockValid ? new WallpaperData[]{systemWallpaper, lockWallpaper}
+                : systemValid ? new WallpaperData[]{systemWallpaper}
+                : lockValid ? new WallpaperData[]{lockWallpaper}
+                : new WallpaperData[0];
+    }
+
     private IWallpaperEngine getEngine(int which, int userId, int displayId) {
         WallpaperData wallpaperData = findWallpaperAtDisplay(userId, displayId);
         if (wallpaperData == null) return null;
@@ -3284,15 +3295,16 @@
     boolean setWallpaperComponent(ComponentName name, String callingPackage,
             @SetWallpaperFlags int which, int userId) {
         if (mIsLockscreenLiveWallpaperEnabled) {
-            return setWallpaperComponentInternal(name, callingPackage, which, userId);
+            boolean fromForeground = isFromForegroundApp(callingPackage);
+            return setWallpaperComponentInternal(name, which, userId, false, fromForeground, null);
         } else {
             setWallpaperComponentInternalLegacy(name, callingPackage, which, userId);
             return true;
         }
     }
 
-    private boolean setWallpaperComponentInternal(ComponentName name, String callingPackage,
-            @SetWallpaperFlags int which, int userIdIn) {
+    private boolean setWallpaperComponentInternal(ComponentName name,  @SetWallpaperFlags int which,
+            int userIdIn, boolean force, boolean fromForeground, IRemoteCallback reply) {
         if (DEBUG) {
             Slog.v(TAG, "Setting new live wallpaper: which=" + which + ", component: " + name);
         }
@@ -3306,7 +3318,7 @@
         final WallpaperData newWallpaper;
 
         synchronized (mLock) {
-            Slog.v(TAG, "setWallpaperComponent name=" + name);
+            Slog.v(TAG, "setWallpaperComponent name=" + name + ", which = " + which);
             final WallpaperData originalSystemWallpaper = mWallpaperMap.get(userId);
             if (originalSystemWallpaper == null) {
                 throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3329,30 +3341,21 @@
                 newWallpaper.imageWallpaperPending = false;
                 newWallpaper.mWhich = which;
                 newWallpaper.mSystemWasBoth = systemIsBoth;
-                newWallpaper.fromForegroundApp = isFromForegroundApp(callingPackage);
+                newWallpaper.fromForegroundApp = fromForeground;
                 final WallpaperDestinationChangeHandler
                         liveSync = new WallpaperDestinationChangeHandler(
                         newWallpaper);
                 boolean same = changingToSame(name, newWallpaper);
-                IRemoteCallback.Stub callback = new IRemoteCallback.Stub() {
-                    @Override
-                    public void sendResult(Bundle data) throws RemoteException {
-                        if (DEBUG) {
-                            Slog.d(TAG, "publish system wallpaper changed!");
-                        }
-                        liveSync.complete();
-                    }
-                };
 
                 /*
                  * If we have a shared system+lock wallpaper, and we reapply the same wallpaper
                  * to system only, force rebind: the current wallpaper will be migrated to lock
                  * and a new engine with the same wallpaper will be applied to system.
                  */
-                boolean forceRebind = same && systemIsBoth && which == FLAG_SYSTEM;
+                boolean forceRebind = force || (same && systemIsBoth && which == FLAG_SYSTEM);
 
                 bindSuccess = bindWallpaperComponentLocked(name, /* force */
-                        forceRebind, /* fromUser */ true, newWallpaper, callback);
+                        forceRebind, /* fromUser */ true, newWallpaper, reply);
                 if (bindSuccess) {
                     if (!same) {
                         newWallpaper.primaryColors = null;
@@ -3396,6 +3399,7 @@
                         }
                         mLockWallpaperMap.remove(newWallpaper.userId);
                     }
+                    if (liveSync != null) liveSync.complete();
                 }
             } finally {
                 Binder.restoreCallingIdentity(ident);
@@ -3421,7 +3425,7 @@
         WallpaperData wallpaper;
 
         synchronized (mLock) {
-            Slog.v(TAG, "setWallpaperComponent name=" + name + ", which=" + which);
+            Slog.v(TAG, "setWallpaperComponentLegacy name=" + name + ", which=" + which);
             wallpaper = mWallpaperMap.get(userId);
             if (wallpaper == null) {
                 throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -3514,6 +3518,11 @@
         }
         // Has the component changed?
         if (!force && changingToSame(componentName, wallpaper)) {
+            try {
+                if (reply != null) reply.sendResult(null);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Failed to send callback", e);
+            }
             return true;
         }
 
diff --git a/services/core/java/com/android/server/wm/ActivityClientController.java b/services/core/java/com/android/server/wm/ActivityClientController.java
index d430dda..4c9ec9d 100644
--- a/services/core/java/com/android/server/wm/ActivityClientController.java
+++ b/services/core/java/com/android/server/wm/ActivityClientController.java
@@ -492,6 +492,8 @@
                 final boolean res;
                 final boolean finishWithRootActivity =
                         finishTask == Activity.FINISH_TASK_WITH_ROOT_ACTIVITY;
+                mTaskSupervisor.getBackgroundActivityLaunchController()
+                        .onActivityRequestedFinishing(r);
                 if (finishTask == Activity.FINISH_TASK_WITH_ACTIVITY
                         || (finishWithRootActivity && r == rootR)) {
                     // If requested, remove the task that is associated to this activity only if it
@@ -1018,7 +1020,7 @@
         try {
             final ClientTransaction transaction = ClientTransaction.obtain(
                     r.app.getThread(), r.token);
-            transaction.addCallback(EnterPipRequestedItem.obtain());
+            transaction.addCallback(EnterPipRequestedItem.obtain(r.token));
             mService.getLifecycleManager().scheduleTransaction(transaction);
             return true;
         } catch (Exception e) {
@@ -1040,7 +1042,7 @@
         try {
             final ClientTransaction transaction = ClientTransaction.obtain(
                     r.app.getThread(), r.token);
-            transaction.addCallback(PipStateTransactionItem.obtain(pipState));
+            transaction.addCallback(PipStateTransactionItem.obtain(r.token, pipState));
             mService.getLifecycleManager().scheduleTransaction(transaction);
         } catch (Exception e) {
             Slog.w(TAG, "Failed to send pip state transaction item: "
@@ -1170,9 +1172,7 @@
                 fullscreenRequest, r);
         reportMultiwindowFullscreenRequestValidatingResult(callback, validateResult);
         if (validateResult != RESULT_APPROVED) {
-            if (queued) {
-                transition.abort();
-            }
+            transition.abort();
             return;
         }
         transition.collect(topFocusedRootTask);
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 582536b..dca2b6f 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -324,7 +324,6 @@
 import android.util.EventLog;
 import android.util.Log;
 import android.util.MergedConfiguration;
-import android.util.Pair;
 import android.util.Slog;
 import android.util.TimeUtils;
 import android.util.proto.ProtoOutputStream;
@@ -725,9 +724,9 @@
     private final boolean mIsUserAlwaysVisible;
 
     /** Allow activity launches which would otherwise be blocked by
-     * {@link ActivityTransitionSecurityController#checkActivityAllowedToStart}
+     * {@link BackgroundActivityStartController#checkActivityAllowedToStart}
      */
-    private boolean mAllowCrossUidActivitySwitchFromBelow;
+    boolean mAllowCrossUidActivitySwitchFromBelow;
 
     /** Have we been asked to have this token keep the screen frozen? */
     private boolean mFreezingScreen;
@@ -1444,7 +1443,7 @@
                     config);
 
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    MoveToDisplayItem.obtain(displayId, config));
+                    MoveToDisplayItem.obtain(token, displayId, config));
         } catch (RemoteException e) {
             // If process died, whatever.
         }
@@ -1461,7 +1460,7 @@
                     + "config: %s", this, config);
 
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    ActivityConfigurationChangeItem.obtain(config));
+                    ActivityConfigurationChangeItem.obtain(token, config));
         } catch (RemoteException e) {
             // If process died, whatever.
         }
@@ -1482,7 +1481,7 @@
                     this, onTop);
 
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    TopResumedActivityChangeItem.obtain(onTop));
+                    TopResumedActivityChangeItem.obtain(token, onTop));
         } catch (RemoteException e) {
             // If process died, whatever.
             Slog.w(TAG, "Failed to send top-resumed=" + onTop + " to " + this, e);
@@ -2729,7 +2728,7 @@
         try {
             mTransferringSplashScreenState = TRANSFER_SPLASH_SCREEN_ATTACH_TO_CLIENT;
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    TransferSplashScreenViewStateItem.obtain(parcelable,
+                    TransferSplashScreenViewStateItem.obtain(token, parcelable,
                             windowAnimationLeash));
             scheduleTransferSplashScreenTimeout();
         } catch (Exception e) {
@@ -3896,7 +3895,7 @@
             try {
                 if (DEBUG_SWITCH) Slog.i(TAG_SWITCH, "Destroying: " + this);
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                        DestroyActivityItem.obtain(finishing, configChangeFlags));
+                        DestroyActivityItem.obtain(token, finishing, configChangeFlags));
             } catch (Exception e) {
                 // We can just ignore exceptions here...  if the process has crashed, our death
                 // notification will clean things up.
@@ -4804,7 +4803,7 @@
                 final ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
                 list.add(new ResultInfo(resultWho, requestCode, resultCode, data));
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                        ActivityResultItem.obtain(list));
+                        ActivityResultItem.obtain(token, list));
                 return;
             } catch (Exception e) {
                 Slog.w(TAG, "Exception thrown sending result to " + this, e);
@@ -4817,7 +4816,7 @@
             final ClientTransaction transaction = ClientTransaction.obtain(app.getThread(), token);
             // Build result to be returned immediately.
             transaction.addCallback(ActivityResultItem.obtain(
-                    List.of(new ResultInfo(resultWho, requestCode, resultCode, data))));
+                    token, List.of(new ResultInfo(resultWho, requestCode, resultCode, data))));
             // When the activity result is delivered, the activity will transition to RESUMED.
             // Since the activity is only resumed so the result can be immediately delivered,
             // return it to its original lifecycle state.
@@ -4858,13 +4857,13 @@
     private ActivityLifecycleItem getLifecycleItemForCurrentStateForResult() {
         switch (mState) {
             case STARTED:
-                return StartActivityItem.obtain(null);
+                return StartActivityItem.obtain(token, null);
             case PAUSING:
             case PAUSED:
-                return PauseActivityItem.obtain();
+                return PauseActivityItem.obtain(token);
             case STOPPING:
             case STOPPED:
-                return StopActivityItem.obtain(configChangeFlags);
+                return StopActivityItem.obtain(token, configChangeFlags);
             default:
                 // Do not send a result immediately if the activity is in state INITIALIZING,
                 // RESTARTING_PROCESS, FINISHING, DESTROYING, or DESTROYED.
@@ -4910,7 +4909,7 @@
                 // so only if activity is currently RESUMED. Otherwise, client may have extra
                 // life-cycle calls to RESUMED (and PAUSED later).
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                        NewIntentItem.obtain(ar, mState == RESUMED));
+                        NewIntentItem.obtain(token, ar, mState == RESUMED));
                 unsent = false;
             } catch (RemoteException e) {
                 Slog.w(TAG, "Exception thrown sending new intent to " + this, e);
@@ -6145,7 +6144,7 @@
                     shortComponentName, "userLeaving=false", "make-active");
             try {
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                        PauseActivityItem.obtain(finishing, false /* userLeaving */,
+                        PauseActivityItem.obtain(token, finishing, false /* userLeaving */,
                                 configChangeFlags, false /* dontReport */, mAutoEnteringPip));
             } catch (Exception e) {
                 Slog.w(TAG, "Exception thrown sending pause: " + intent.getComponent(), e);
@@ -6158,7 +6157,7 @@
 
             try {
                 mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                        StartActivityItem.obtain(takeOptions()));
+                        StartActivityItem.obtain(token, takeOptions()));
             } catch (Exception e) {
                 Slog.w(TAG, "Exception thrown sending start: " + intent.getComponent(), e);
             }
@@ -6456,7 +6455,7 @@
             EventLogTags.writeWmStopActivity(
                     mUserId, System.identityHashCode(this), shortComponentName);
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    StopActivityItem.obtain(configChangeFlags));
+                    StopActivityItem.obtain(token, configChangeFlags));
 
             mAtmService.mH.postDelayed(mStopTimeoutRunnable, STOP_TIMEOUT);
         } catch (Exception e) {
@@ -9871,17 +9870,17 @@
                     (andResume ? "RESUMED" : "PAUSED"), this, Debug.getCallers(6));
             forceNewConfig = false;
             startRelaunching();
-            final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(pendingResults,
-                    pendingNewIntents, configChangeFlags,
+            final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(token,
+                    pendingResults, pendingNewIntents, configChangeFlags,
                     new MergedConfiguration(getProcessGlobalConfiguration(),
                             getMergedOverrideConfiguration()),
                     preserveWindow);
             final ActivityLifecycleItem lifecycleItem;
             if (andResume) {
-                lifecycleItem = ResumeActivityItem.obtain(isTransitionForward(),
+                lifecycleItem = ResumeActivityItem.obtain(token, isTransitionForward(),
                         shouldSendCompatFakeFocus());
             } else {
-                lifecycleItem = PauseActivityItem.obtain();
+                lifecycleItem = PauseActivityItem.obtain(token);
             }
             final ClientTransaction transaction = ClientTransaction.obtain(app.getThread(), token);
             transaction.addCallback(callbackItem);
@@ -9978,7 +9977,7 @@
         // {@link ActivityTaskManagerService.activityStopped}).
         try {
             mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
-                    StopActivityItem.obtain(0 /* configChanges */));
+                    StopActivityItem.obtain(token, 0 /* configChanges */));
         } catch (RemoteException e) {
             Slog.w(TAG, "Exception thrown during restart " + this, e);
         }
@@ -10191,50 +10190,6 @@
         mAllowCrossUidActivitySwitchFromBelow = allowed;
     }
 
-    /**
-     * Determines if a source is allowed to add or remove activities from the task,
-     * if the current ActivityRecord is above it in the stack
-     *
-     * A transition is blocked ({@code false} returned) if all of the following are met:
-     * <pre>
-     * 1. The source activity and the current activity record belong to different apps
-     * (i.e, have different UIDs).
-     * 2. Both the source activity and the current activity target U+
-     * 3. The current activity has not set
-     * {@link ActivityRecord#setAllowCrossUidActivitySwitchFromBelow(boolean)} to {@code true}
-     * </pre>
-     *
-     * Returns a pair where the elements mean:
-     * <pre>
-     * First: {@code false} if we should actually block the transition (takes into consideration
-     * feature flag and targetSdk).
-     * Second: {@code false} if we should warn about the transition via toasts. This happens if
-     * the transition would be blocked in case both the app was targeting U+ and the feature was
-     * enabled.
-     * </pre>
-     *
-     * @param sourceUid The source (s) activity performing the state change
-     */
-    Pair<Boolean, Boolean> allowCrossUidActivitySwitchFromBelow(int sourceUid) {
-        int myUid = info.applicationInfo.uid;
-        if (sourceUid == myUid) {
-            return new Pair<>(true, true);
-        }
-
-        // If mAllowCrossUidActivitySwitchFromBelow is set, honor it.
-        if (mAllowCrossUidActivitySwitchFromBelow) {
-            return new Pair<>(true, true);
-        }
-
-        // If it is not set, default to true if both records target ≥ U, false otherwise
-        // TODO(b/258792202) Replace with CompatChanges and replace Pair with boolean once feature
-        // flag is removed
-        boolean restrictActivitySwitch =
-                ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(myUid)
-                    && ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(sourceUid);
-        return new Pair<>(!restrictActivitySwitch, false);
-    }
-
     boolean getTurnScreenOnFlag() {
         return mTurnScreenOn || containsTurnScreenOnWindow();
     }
diff --git a/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java b/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
index 19d8129..f1a2159 100644
--- a/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
+++ b/services/core/java/com/android/server/wm/ActivitySecurityModelFeatureFlags.java
@@ -43,7 +43,7 @@
     static final String DOC_LINK = "go/android-asm";
 
     /** Used to determine which version of the ASM logic was used in logs while we iterate */
-    static final int ASM_VERSION = 7;
+    static final int ASM_VERSION = 8;
 
     private static final String NAMESPACE = NAMESPACE_WINDOW_MANAGER;
     private static final String KEY_ASM_PREFIX = "ActivitySecurity__";
@@ -53,7 +53,7 @@
     private static final String KEY_ASM_EXEMPTED_PACKAGES = KEY_ASM_PREFIX
             + "asm_exempted_packages";
     private static final int VALUE_DISABLE = 0;
-    private static final int VALUE_ENABLE_FOR_U = 1;
+    private static final int VALUE_ENABLE_FOR_V = 1;
     private static final int VALUE_ENABLE_FOR_ALL = 2;
 
     private static final int DEFAULT_VALUE = VALUE_DISABLE;
@@ -84,7 +84,7 @@
 
     private static boolean flagEnabledForUid(int flag, int uid) {
         boolean flagEnabled = flag == VALUE_ENABLE_FOR_ALL
-                || (flag == VALUE_ENABLE_FOR_U
+                || (flag == VALUE_ENABLE_FOR_V
                     && CompatChanges.isChangeEnabled(ASM_RESTRICTIONS, uid));
 
         if (flagEnabled) {
diff --git a/services/core/java/com/android/server/wm/ActivityStartController.java b/services/core/java/com/android/server/wm/ActivityStartController.java
index a6e5040..c39b266 100644
--- a/services/core/java/com/android/server/wm/ActivityStartController.java
+++ b/services/core/java/com/android/server/wm/ActivityStartController.java
@@ -98,8 +98,6 @@
     /** Whether an {@link ActivityStarter} is currently executing (starting an Activity). */
     private boolean mInExecution = false;
 
-    private final BackgroundActivityStartController mBalController;
-
     /**
      * TODO(b/64750076): Capture information necessary for dump and
      * {@link #postStartActivityProcessingForLastStarter} rather than keeping the entire object
@@ -122,7 +120,6 @@
         mFactory.setController(this);
         mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service.mGlobalLock,
                 service.mH);
-        mBalController = new BackgroundActivityStartController(mService, mSupervisor);
     }
 
     /**
@@ -666,8 +663,4 @@
             pw.println("(nothing)");
         }
     }
-
-    BackgroundActivityStartController getBackgroundActivityLaunchController() {
-        return mBalController;
-    }
 }
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index 458d1e8..27315bb 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -74,16 +74,8 @@
 import static com.android.server.wm.ActivityTaskSupervisor.DEFER_RESUME;
 import static com.android.server.wm.ActivityTaskSupervisor.ON_TOP;
 import static com.android.server.wm.ActivityTaskSupervisor.PRESERVE_WINDOWS;
-import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_ALLOWLISTED_COMPONENT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_ALLOWLISTED_UID;
 import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_DEFAULT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PENDING_INTENT;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PERMISSION;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_SAW_PERMISSION;
-import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_VISIBLE_WINDOW;
 import static com.android.server.wm.BackgroundActivityStartController.BAL_BLOCK;
-import static com.android.server.wm.BackgroundActivityStartController.balCodeToString;
 import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_BOUNDS;
 import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_DISPLAY;
 import static com.android.server.wm.Task.REPARENT_MOVE_ROOT_TASK_TO_FRONT;
@@ -126,18 +118,14 @@
 import android.os.UserManager;
 import android.service.voice.IVoiceInteractionSession;
 import android.text.TextUtils;
-import android.util.Pair;
 import android.util.Pools.SynchronizedPool;
 import android.util.Slog;
-import android.widget.Toast;
 import android.window.RemoteTransition;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.app.HeavyWeightSwitcherActivity;
 import com.android.internal.app.IVoiceInteractor;
 import com.android.internal.protolog.common.ProtoLog;
-import com.android.internal.util.FrameworkStatsLog;
-import com.android.server.UiThread;
 import com.android.server.am.PendingIntentRecord;
 import com.android.server.pm.InstantAppResolver;
 import com.android.server.power.ShutdownCheckPoints;
@@ -151,10 +139,6 @@
 import java.io.PrintWriter;
 import java.text.DateFormat;
 import java.util.Date;
-import java.util.StringJoiner;
-import java.util.function.Consumer;
-import java.util.function.Function;
-import java.util.function.Predicate;
 
 /**
  * Controller for interpreting how and then launching an activity.
@@ -188,7 +172,7 @@
      * Feature flag for go/activity-security rules
      */
     @ChangeId
-    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM)
     static final long ASM_RESTRICTIONS = 230590090L;
 
     private final ActivityTaskManagerService mService;
@@ -1114,7 +1098,7 @@
                 Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER,
                         "shouldAbortBackgroundActivityStart");
                 BackgroundActivityStartController balController =
-                        mController.getBackgroundActivityLaunchController();
+                        mSupervisor.getBackgroundActivityLaunchController();
                 balCode =
                         balController.checkBackgroundActivityStart(
                                 callingUid,
@@ -1841,6 +1825,9 @@
                     sourceRecord, "launch-into-pip");
         }
 
+        mSupervisor.getBackgroundActivityLaunchController()
+                .onNewActivityLaunched(mStartActivity);
+
         return START_SUCCESS;
     }
 
@@ -1973,7 +1960,9 @@
             }
         }
 
-        if (!checkActivitySecurityModel(r, newTask, targetTask)) {
+        if (!mSupervisor.getBackgroundActivityLaunchController().checkActivityAllowedToStart(
+                mSourceRecord, r, newTask, targetTask, mLaunchFlags, mBalCode, mCallingUid,
+                mRealCallingUid)) {
             return START_ABORTED;
         }
 
@@ -1981,226 +1970,6 @@
     }
 
     /**
-     * TODO(b/263368846): Shift to BackgroundActivityStartController once class is ready
-     * Log activity starts which violate one of the following rules of the
-     * activity security model (ASM):
-     * See go/activity-security for rationale behind the rules.
-     * 1. Within a task, only an activity matching a top UID of the task can start activities
-     * 2. Only activities within a foreground task, which match a top UID of the task, can
-     * create a new task or bring an existing one into the foreground
-     */
-    private boolean checkActivitySecurityModel(ActivityRecord r, boolean newTask, Task targetTask) {
-        // BAL Exception allowed in all cases
-        if (mBalCode == BAL_ALLOW_ALLOWLISTED_UID) {
-            return true;
-        }
-
-        // Intents with FLAG_ACTIVITY_NEW_TASK will always be considered as creating a new task
-        // even if the intent is delivered to an existing task.
-        boolean taskToFront = newTask
-                || (mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) == FLAG_ACTIVITY_NEW_TASK;
-
-        // BAL exception only allowed for new tasks
-        if (taskToFront) {
-            if (mBalCode == BAL_ALLOW_ALLOWLISTED_COMPONENT
-                    || mBalCode == BAL_ALLOW_PERMISSION
-                    || mBalCode == BAL_ALLOW_PENDING_INTENT
-                    || mBalCode == BAL_ALLOW_SAW_PERMISSION
-                    || mBalCode == BAL_ALLOW_VISIBLE_WINDOW) {
-                return true;
-            }
-        }
-
-        Pair<Boolean, Boolean> pair = null;
-        if (mSourceRecord != null) {
-            boolean passesAsmChecks = true;
-            Task sourceTask = mSourceRecord.getTask();
-
-            // Allow launching into a new task (or a task matching the launched activity's
-            // affinity) only if the current task is foreground or mutating its own task.
-            // The latter can happen eg. if caller uses NEW_TASK flag and the activity being
-            // launched matches affinity of source task.
-            if (taskToFront) {
-                passesAsmChecks = sourceTask != null
-                        && (sourceTask.isVisible() || sourceTask == targetTask);
-            }
-
-            if (passesAsmChecks) {
-                Task taskToCheck = taskToFront ? sourceTask : targetTask;
-                pair = ActivityTaskSupervisor
-                        .doesTopActivityMatchingUidExistForAsm(taskToCheck, mSourceRecord.getUid(),
-                                mSourceRecord);
-            }
-        } else if (!taskToFront) {
-            // We don't have a sourceRecord, and we're launching into an existing task.
-            // Allow if callingUid is top of stack.
-            pair = ActivityTaskSupervisor
-                    .doesTopActivityMatchingUidExistForAsm(targetTask, mCallingUid,
-                            /*sourceRecord*/null);
-        }
-
-        boolean shouldBlockActivityStart = true;
-        if (pair != null) {
-            // We block if feature flag is enabled
-            shouldBlockActivityStart = !pair.first;
-            // Used for logging/toasts. Would we block if target sdk was U and feature was
-            // enabled? If so, we can't return here but we also might not block at the end
-            boolean wouldBlockActivityStartIgnoringFlags = !pair.second;
-
-            if (!wouldBlockActivityStartIgnoringFlags) {
-                return true;
-            }
-        }
-
-        // ASM rules have failed. Log why
-        return logAsmFailureAndCheckFeatureEnabled(r, newTask, targetTask, shouldBlockActivityStart,
-                taskToFront);
-    }
-
-    private boolean logAsmFailureAndCheckFeatureEnabled(ActivityRecord r, boolean newTask,
-            Task targetTask, boolean shouldBlockActivityStart, boolean taskToFront) {
-        // ASM rules have failed. Log why
-        ActivityRecord targetTopActivity = targetTask == null ? null
-                : targetTask.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
-
-        int action = newTask || mSourceRecord == null
-                ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_NEW_TASK
-                : (mSourceRecord.getTask().equals(targetTask)
-                        ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_SAME_TASK
-                        :  FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_DIFFERENT_TASK);
-
-        boolean blockActivityStartAndFeatureEnabled = ActivitySecurityModelFeatureFlags
-                .shouldRestrictActivitySwitch(mCallingUid)
-                && shouldBlockActivityStart;
-
-        String asmDebugInfo = getDebugInfoForActivitySecurity("Launch", r, targetTask,
-                targetTopActivity, blockActivityStartAndFeatureEnabled, /*taskToFront*/taskToFront);
-
-        FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
-                /* caller_uid */
-                mSourceRecord != null ? mSourceRecord.getUid() : mCallingUid,
-                /* caller_activity_class_name */
-                mSourceRecord != null ? mSourceRecord.info.name : null,
-                /* target_task_top_activity_uid */
-                targetTopActivity != null ? targetTopActivity.getUid() : -1,
-                /* target_task_top_activity_class_name */
-                targetTopActivity != null ? targetTopActivity.info.name : null,
-                /* target_task_is_different */
-                newTask || mSourceRecord == null || targetTask == null
-                        || !targetTask.equals(mSourceRecord.getTask()),
-                /* target_activity_uid */
-                r.getUid(),
-                /* target_activity_class_name */
-                r.info.name,
-                /* target_intent_action */
-                r.intent.getAction(),
-                /* target_intent_flags */
-                mLaunchFlags,
-                /* action */
-                action,
-                /* version */
-                ActivitySecurityModelFeatureFlags.ASM_VERSION,
-                /* multi_window - we have our source not in the target task, but both are visible */
-                targetTask != null && mSourceRecord != null
-                        && !targetTask.equals(mSourceRecord.getTask()) && targetTask.isVisible(),
-                /* bal_code */
-                mBalCode,
-                /* task_stack */
-                asmDebugInfo
-        );
-
-        String launchedFromPackageName = r.launchedFromPackage;
-        if (ActivitySecurityModelFeatureFlags.shouldShowToast(mCallingUid)) {
-            String toastText = ActivitySecurityModelFeatureFlags.DOC_LINK
-                    + (blockActivityStartAndFeatureEnabled ? " blocked " : " would block ")
-                    + getApplicationLabel(mService.mContext.getPackageManager(),
-                    launchedFromPackageName);
-            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
-                    toastText, Toast.LENGTH_LONG).show());
-
-            Slog.i(TAG, asmDebugInfo);
-        }
-
-        if (blockActivityStartAndFeatureEnabled) {
-            Slog.e(TAG, "[ASM] Abort Launching r: " + r
-                    + " as source: "
-                    + (mSourceRecord != null ? mSourceRecord : launchedFromPackageName)
-                    + " is in background. New task: " + newTask
-                    + ". Top activity: " + targetTopActivity
-                    + ". BAL Code: " + balCodeToString(mBalCode));
-
-            return false;
-        }
-
-        return true;
-    }
-
-    /** Only called when an activity launch may be blocked, which should happen very rarely */
-    private String getDebugInfoForActivitySecurity(String action, ActivityRecord r, Task targetTask,
-            ActivityRecord targetTopActivity, boolean blockActivityStartAndFeatureEnabled,
-            boolean taskToFront) {
-        final String prefix = "[ASM] ";
-        Function<ActivityRecord, String> recordToString = (ar) -> {
-            if (ar == null) {
-                return null;
-            }
-            return (ar == mSourceRecord ? " [source]=> "
-                    : ar == targetTopActivity ? " [ top  ]=> "
-                            : ar == r ? " [target]=> "
-                                    : "         => ")
-                    + ar
-                    + " :: visible=" + ar.isVisible()
-                    + ", finishing=" + ar.isFinishing()
-                    + ", alwaysOnTop=" + ar.isAlwaysOnTop()
-                    + ", taskFragment=" + ar.getTaskFragment();
-        };
-
-        StringJoiner joiner = new StringJoiner("\n");
-        joiner.add(prefix + "------ Activity Security " + action + " Debug Logging Start ------");
-        joiner.add(prefix + "Block Enabled: " + blockActivityStartAndFeatureEnabled);
-        joiner.add(prefix + "ASM Version: " + ActivitySecurityModelFeatureFlags.ASM_VERSION);
-
-        boolean targetTaskMatchesSourceTask = targetTask != null
-                && mSourceRecord != null && mSourceRecord.getTask() == targetTask;
-
-        if (mSourceRecord == null) {
-            joiner.add(prefix + "Source Package: " + r.launchedFromPackage);
-            String realCallingPackage = mService.mContext.getPackageManager().getNameForUid(
-                    mRealCallingUid);
-            joiner.add(prefix + "Real Calling Uid Package: " + realCallingPackage);
-        } else {
-            joiner.add(prefix + "Source Record: " + recordToString.apply(mSourceRecord));
-            if (targetTaskMatchesSourceTask) {
-                joiner.add(prefix + "Source/Target Task: " + mSourceRecord.getTask());
-                joiner.add(prefix + "Source/Target Task Stack: ");
-            } else {
-                joiner.add(prefix + "Source Task: " + mSourceRecord.getTask());
-                joiner.add(prefix + "Source Task Stack: ");
-            }
-            mSourceRecord.getTask().forAllActivities((Consumer<ActivityRecord>)
-                    ar -> joiner.add(prefix + recordToString.apply(ar)));
-        }
-
-        joiner.add(prefix + "Target Task Top: " + recordToString.apply(targetTopActivity));
-        if (!targetTaskMatchesSourceTask) {
-            joiner.add(prefix + "Target Task: " + targetTask);
-            if (targetTask != null) {
-                joiner.add(prefix + "Target Task Stack: ");
-                targetTask.forAllActivities((Consumer<ActivityRecord>)
-                        ar -> joiner.add(prefix + recordToString.apply(ar)));
-            }
-        }
-
-        joiner.add(prefix + "Target Record: " + recordToString.apply(r));
-        joiner.add(prefix + "Intent: " + mIntent);
-        joiner.add(prefix + "TaskToFront: " + taskToFront);
-        joiner.add(prefix + "BalCode: " + balCodeToString(mBalCode));
-
-        joiner.add(prefix + "------ Activity Security " + action + " Debug Logging End ------");
-        return joiner.toString();
-    }
-
-    /**
      * Returns whether embedding of {@code starting} is allowed.
      *
      * @param taskFragment the TaskFragment for embedding.
@@ -2284,8 +2053,9 @@
                 reusedTask != null ? reusedTask.getTopNonFinishingActivity() : null, intentGrants);
 
         if (mAddingToTask) {
-            clearTopIfNeeded(targetTask, mCallingUid, mRealCallingUid, mStartActivity.getUid(),
-                    mLaunchFlags);
+            mSupervisor.getBackgroundActivityLaunchController().clearTopIfNeeded(targetTask,
+                    mSourceRecord, mStartActivity, mCallingUid, mRealCallingUid, mLaunchFlags,
+                    mBalCode);
             return START_SUCCESS;
         }
 
@@ -2318,65 +2088,6 @@
     }
 
     /**
-     * If the top activity uid does not match the launching or launched activity, and the launch was
-     * not requested from the top uid, we want to clear out all non matching activities to prevent
-     * the top activity being sandwiched.
-     *
-     * Both creator and sender UID are considered for the launching activity.
-     */
-    private void clearTopIfNeeded(@NonNull Task targetTask, int callingUid, int realCallingUid,
-            int startingUid, int launchFlags) {
-        if ((launchFlags & FLAG_ACTIVITY_NEW_TASK) != FLAG_ACTIVITY_NEW_TASK
-                || mBalCode == BAL_ALLOW_ALLOWLISTED_UID) {
-            // Launch is from the same task, (a top or privileged UID), or is directly privileged.
-            return;
-        }
-
-        Predicate<ActivityRecord> isLaunchingOrLaunched = ar ->
-                ar.isUid(startingUid) || ar.isUid(callingUid) || ar.isUid(realCallingUid);
-
-        // Return early if we know for sure we won't need to clear any activities by just checking
-        // the top activity.
-        ActivityRecord targetTaskTop = targetTask.getTopMostActivity();
-        if (targetTaskTop == null || isLaunchingOrLaunched.test(targetTaskTop)) {
-            return;
-        }
-
-        // Find the first activity which matches a safe UID and is not finishing. Clear everything
-        // above it
-        boolean shouldBlockActivityStart = ActivitySecurityModelFeatureFlags
-                .shouldRestrictActivitySwitch(callingUid);
-        int[] finishCount = new int[0];
-        if (shouldBlockActivityStart) {
-            ActivityRecord activity = targetTask.getActivity(isLaunchingOrLaunched);
-            if (activity == null) {
-                // mStartActivity is not in task, so clear everything
-                activity = mStartActivity;
-            }
-
-            finishCount = new int[1];
-            targetTask.performClearTop(activity, launchFlags, finishCount);
-            if (finishCount[0] > 0) {
-                Slog.w(TAG, "Cleared top n: " + finishCount[0] + " activities from task t: "
-                        + targetTask + " not matching top uid: " + callingUid);
-            }
-        }
-
-        if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)
-                && (!shouldBlockActivityStart || finishCount[0] > 0)) {
-            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
-                    (shouldBlockActivityStart
-                            ? "Top activities cleared by "
-                            : "Top activities would be cleared by ")
-                            + ActivitySecurityModelFeatureFlags.DOC_LINK,
-                    Toast.LENGTH_LONG).show());
-
-            getDebugInfoForActivitySecurity("Clear Top", mStartActivity, targetTask, targetTaskTop,
-                    shouldBlockActivityStart, /* taskToFront */ true);
-        }
-    }
-
-    /**
      * Check if the activity being launched is the same as the one currently at the top and it
      * should only be launched once.
      */
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index fd42077..6999c6a 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -68,7 +68,6 @@
 import static android.view.WindowManager.TRANSIT_PIP;
 import static android.view.WindowManager.TRANSIT_TO_FRONT;
 import static android.view.WindowManagerPolicyConstants.KEYGUARD_GOING_AWAY_FLAG_TO_LAUNCHER_CLEAR_SNAPSHOT;
-
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_CONFIGURATION;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_DREAM;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_FOCUS;
@@ -2221,7 +2220,7 @@
             callerApp = getProcessController(appThread);
         }
         final BackgroundActivityStartController balController =
-                getActivityStartController().getBackgroundActivityLaunchController();
+                mTaskSupervisor.getBackgroundActivityLaunchController();
         if (balController.shouldAbortBackgroundActivityStart(
                 callingUid,
                 callingPid,
@@ -3660,6 +3659,9 @@
             synchronized (mGlobalLock) {
                 if (r.getParent() == null) {
                     Slog.e(TAG, "Skip enterPictureInPictureMode, destroyed " + r);
+                    if (transition != null) {
+                        transition.abort();
+                    }
                     return;
                 }
                 EventLogTags.writeWmEnterPip(r.mUserId, System.identityHashCode(r),
@@ -5628,6 +5630,15 @@
         }
     }
 
+    void registerCompatScaleProvider(@CompatScaleProvider.CompatScaleModeOrderId int id,
+            @NonNull CompatScaleProvider provider) {
+        mCompatModePackages.registerCompatScaleProvider(id, provider);
+    }
+
+    void unregisterCompatScaleProvider(@CompatScaleProvider.CompatScaleModeOrderId int id) {
+        mCompatModePackages.unregisterCompatScaleProvider(id);
+    }
+
     /**
      * Returns {@code true} if the process represented by the pid passed as argument is
      * instrumented and the instrumentation source was granted with the permission also
diff --git a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
index 6eb9ed69..e523119 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
@@ -134,12 +134,10 @@
 import android.provider.MediaStore;
 import android.util.ArrayMap;
 import android.util.MergedConfiguration;
-import android.util.Pair;
 import android.util.Slog;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
 import android.view.Display;
-import android.widget.Toast;
 
 import com.android.internal.R;
 import com.android.internal.annotations.GuardedBy;
@@ -147,10 +145,8 @@
 import com.android.internal.content.ReferrerIntent;
 import com.android.internal.protolog.common.ProtoLog;
 import com.android.internal.util.ArrayUtils;
-import com.android.internal.util.FrameworkStatsLog;
 import com.android.internal.util.function.pooled.PooledLambda;
 import com.android.server.LocalServices;
-import com.android.server.UiThread;
 import com.android.server.am.ActivityManagerService;
 import com.android.server.am.HostingRecord;
 import com.android.server.am.UserState;
@@ -256,6 +252,9 @@
     final ActivityTaskManagerService mService;
     RootWindowContainer mRootWindowContainer;
 
+    /** Helper class for checking if an activity transition meets security rules */
+    BackgroundActivityStartController mBalController;
+
     /** The historial list of recent tasks including inactive tasks */
     RecentTasks mRecentTasks;
 
@@ -466,6 +465,8 @@
         mLaunchParamsPersister = new LaunchParamsPersister(mPersisterQueue, this);
         mLaunchParamsController = new LaunchParamsController(mService, mLaunchParamsPersister);
         mLaunchParamsController.registerDefaultModifiers(this);
+
+        mBalController = new BackgroundActivityStartController(mService, this);
     }
 
     void onSystemReady() {
@@ -928,8 +929,8 @@
                 final IBinder fragmentToken = r.getTaskFragment().getFragmentToken();
 
                 final int deviceId = getDeviceIdForDisplayId(r.getDisplayId());
-                clientTransaction.addCallback(LaunchActivityItem.obtain(new Intent(r.intent),
-                        System.identityHashCode(r), r.info,
+                clientTransaction.addCallback(LaunchActivityItem.obtain(r.token,
+                        new Intent(r.intent), System.identityHashCode(r), r.info,
                         // TODO: Have this take the merged configuration instead of separate global
                         // and override configs.
                         mergedConfiguration.getGlobalConfiguration(),
@@ -943,10 +944,10 @@
                 // Set desired final state.
                 final ActivityLifecycleItem lifecycleItem;
                 if (andResume) {
-                    lifecycleItem = ResumeActivityItem.obtain(isTransitionForward,
+                    lifecycleItem = ResumeActivityItem.obtain(r.token, isTransitionForward,
                             r.shouldSendCompatFakeFocus());
                 } else {
-                    lifecycleItem = PauseActivityItem.obtain();
+                    lifecycleItem = PauseActivityItem.obtain(r.token);
                 }
                 clientTransaction.setLifecycleStateRequest(lifecycleItem);
 
@@ -1284,6 +1285,10 @@
         return mAppOpsManager;
     }
 
+    BackgroundActivityStartController getBackgroundActivityLaunchController() {
+        return mBalController;
+    }
+
     private int getComponentRestrictionForCallingPackage(ActivityInfo activityInfo,
             String callingPackage, @Nullable String callingFeatureId, int callingPid,
             int callingUid, boolean ignoreTargetSecurity) {
@@ -1700,172 +1705,12 @@
             if (task.isPersistable) {
                 mService.notifyTaskPersisterLocked(null, true);
             }
-            checkActivitySecurityForTaskClear(callingUid, task, callerActivityClassName);
+            mBalController
+                    .checkActivityAllowedToClearTask(task, callingUid, callerActivityClassName);
         } finally {
             task.mInRemoveTask = false;
         }
     }
-
-    // TODO(b/263368846) Move to live with the rest of the ASM logic.
-    /**
-     * Returns home if the passed in callingUid is not top of the stack, rather than returning to
-     * previous task.
-     */
-    private void checkActivitySecurityForTaskClear(int callingUid, Task task,
-            String callerActivityClassName) {
-        // We may have already checked that the callingUid has additional clearTask privileges, and
-        // cleared the calling identify. If so, we infer we do not need further restrictions here.
-        if (callingUid == SYSTEM_UID || !task.isVisible() || task.inMultiWindowMode()) {
-            return;
-        }
-
-        TaskDisplayArea displayArea = task.getTaskDisplayArea();
-        if (displayArea == null) {
-            // If there is no associated display area, we can not return home.
-            return;
-        }
-
-        Pair<Boolean, Boolean> pair = doesTopActivityMatchingUidExistForAsm(task, callingUid, null);
-        boolean shouldBlockActivitySwitchIfFeatureEnabled = !pair.first;
-        boolean wouldBlockActivitySwitchIgnoringFlags = !pair.second;
-
-        if (!wouldBlockActivitySwitchIgnoringFlags) {
-            return;
-        }
-
-        ActivityRecord topActivity = task.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
-        FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
-                /* caller_uid */
-                callingUid,
-                /* caller_activity_class_name */
-                callerActivityClassName,
-                /* target_task_top_activity_uid */
-                topActivity == null ? -1 : topActivity.getUid(),
-                /* target_task_top_activity_class_name */
-                topActivity == null ? null : topActivity.info.name,
-                /* target_task_is_different */
-                false,
-                /* target_activity_uid */
-                -1,
-                /* target_activity_class_name */
-                null,
-                /* target_intent_action */
-                null,
-                /* target_intent_flags */
-                0,
-                /* action */
-                FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__FINISH_TASK,
-                /* version */
-                ActivitySecurityModelFeatureFlags.ASM_VERSION,
-                /* multi_window */
-                false,
-                /* bal_code */
-                -1,
-                /* task_stack */
-                null
-        );
-
-        boolean restrictActivitySwitch = ActivitySecurityModelFeatureFlags
-                .shouldRestrictActivitySwitch(callingUid)
-                && shouldBlockActivitySwitchIfFeatureEnabled;
-
-        PackageManager pm = mService.mContext.getPackageManager();
-        String callingPackage = pm.getNameForUid(callingUid);
-        final CharSequence callingLabel;
-        if (callingPackage == null) {
-            callingPackage = String.valueOf(callingUid);
-            callingLabel = callingPackage;
-        } else {
-            callingLabel = getApplicationLabel(pm, callingPackage);
-        }
-
-        if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
-            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
-                    (ActivitySecurityModelFeatureFlags.DOC_LINK
-                            + (restrictActivitySwitch ? " returned home due to "
-                                    : " would return home due to ")
-                            + callingLabel), Toast.LENGTH_LONG).show());
-        }
-
-        // If the activity switch should be restricted, return home rather than the
-        // previously top task, to prevent users from being confused which app they're
-        // viewing
-        if (restrictActivitySwitch) {
-            Slog.w(TAG, "[ASM] Return to home as source: " + callingPackage
-                    + " is not on top of task t: " + task);
-            displayArea.moveHomeActivityToTop("taskRemoved");
-        } else {
-            Slog.i(TAG, "[ASM] Would return to home as source: " + callingPackage
-                    + " is not on top of task t: " + task);
-        }
-    }
-
-    /**
-     *  For the purpose of ASM, ‘Top UID” for a task is defined as an activity UID
-     *  1. Which is top of the stack in z-order
-     *      a. Excluding any activities with the flag ‘isAlwaysOnTop’ and
-     *      b. Excluding any activities which are `finishing`
-     *  2. Or top of an adjacent task fragment to (1)
-     *
-     *  The 'sourceRecord' can be considered top even if it is 'finishing'
-     *
-     * @return A pair where the first value is the return value matching the checks above, and the
-     * second value is the return value disregarding the feature flag or target api levels. Use the
-     * first value for blocking launches - the second value is only used to determine if a toast
-     * should be displayed, and will be used alongside a feature flag in {@link ActivityStarter}.
-     */
-    // TODO(b/263368846) Shift to BackgroundActivityStartController once class is ready
-    @Nullable
-    static Pair<Boolean, Boolean> doesTopActivityMatchingUidExistForAsm(@Nullable Task task,
-            int uid, @Nullable ActivityRecord sourceRecord) {
-        // If the source is visible, consider it 'top'.
-        if (sourceRecord != null && sourceRecord.isVisible()) {
-            return new Pair<>(true, true);
-        }
-
-        // Always allow actual top activity to clear task
-        ActivityRecord topActivity = task.getTopMostActivity();
-        if (topActivity != null && topActivity.isUid(uid)) {
-            return new Pair<>(true, true);
-        }
-
-        // Consider the source activity, whether or not it is finishing. Do not consider any other
-        // finishing activity.
-        Predicate<ActivityRecord> topOfStackPredicate = (ar) -> ar.equals(sourceRecord)
-                || (!ar.finishing && !ar.isAlwaysOnTop());
-
-        // Check top of stack (or the first task fragment for embedding).
-        topActivity = task.getActivity(topOfStackPredicate);
-        if (topActivity == null) {
-            return new Pair<>(false, false);
-        }
-
-        Pair<Boolean, Boolean> pair = topActivity.allowCrossUidActivitySwitchFromBelow(uid);
-        if (pair.first) {
-            return new Pair<>(true, pair.second);
-        }
-
-        // Even if the top activity is not a match, we may be in an embedded activity scenario with
-        // an adjacent task fragment. Get the second fragment.
-        TaskFragment taskFragment = topActivity.getTaskFragment();
-        if (taskFragment == null) {
-            return new Pair<>(false, false);
-        }
-
-        TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
-        if (adjacentTaskFragment == null) {
-            return new Pair<>(false, false);
-        }
-
-        // Check the second fragment.
-        topActivity = adjacentTaskFragment.getActivity(topOfStackPredicate);
-        if (topActivity == null) {
-            return new Pair<>(false, false);
-        }
-
-        return topActivity.allowCrossUidActivitySwitchFromBelow(uid);
-    }
-
     static CharSequence getApplicationLabel(PackageManager pm, String packageName) {
         try {
             ApplicationInfo launchedFromPackageInfo = pm.getApplicationInfo(
diff --git a/services/core/java/com/android/server/wm/AppTaskImpl.java b/services/core/java/com/android/server/wm/AppTaskImpl.java
index de38a20..761b0a8 100644
--- a/services/core/java/com/android/server/wm/AppTaskImpl.java
+++ b/services/core/java/com/android/server/wm/AppTaskImpl.java
@@ -122,8 +122,7 @@
                     callerApp = mService.getProcessController(appThread);
                 }
                 final BackgroundActivityStartController balController =
-                        mService.getActivityStartController()
-                                .getBackgroundActivityLaunchController();
+                        mService.mTaskSupervisor.getBackgroundActivityLaunchController();
                 if (balController.shouldAbortBackgroundActivityStart(
                         callingUid,
                         callingPid,
diff --git a/services/core/java/com/android/server/wm/AsyncRotationController.java b/services/core/java/com/android/server/wm/AsyncRotationController.java
index 0a2bbd4..4b463c7 100644
--- a/services/core/java/com/android/server/wm/AsyncRotationController.java
+++ b/services/core/java/com/android/server/wm/AsyncRotationController.java
@@ -459,7 +459,7 @@
         // insets should keep original position before the start transaction is applied.
         return mTransitionOp != OP_LEGACY && (mTransitionOp == OP_APP_SWITCH
                 || TransitionController.SYNC_METHOD == BLASTSyncEngine.METHOD_BLAST)
-                && !mIsStartTransactionCommitted && isTargetToken(w.mToken);
+                && !mIsStartTransactionCommitted && canBeAsync(w.mToken) && isTargetToken(w.mToken);
     }
 
     /**
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
index 188f4d0..4bafccd 100644
--- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
@@ -17,7 +17,9 @@
 package com.android.server.wm;
 
 import static android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.os.Process.SYSTEM_UID;
 import static android.provider.DeviceConfig.NAMESPACE_WINDOW_MANAGER;
 
 import static com.android.internal.util.Preconditions.checkState;
@@ -26,10 +28,13 @@
 import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_ALLOW;
 import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_FG_ONLY;
+import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel;
+import static com.android.server.wm.PendingRemoteAnimationRegistry.TIMEOUT_MS;
 
 import static java.lang.annotation.RetentionPolicy.SOURCE;
 
 import android.annotation.IntDef;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.app.ActivityOptions;
@@ -45,12 +50,19 @@
 import android.util.ArraySet;
 import android.util.DebugUtils;
 import android.util.Slog;
+import android.widget.Toast;
 
-
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.UiThread;
 import com.android.server.am.PendingIntentRecord;
 
 import java.lang.annotation.Retention;
+import java.util.HashMap;
+import java.util.StringJoiner;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Predicate;
 
 /**
  * Helper class to check permissions for starting Activities.
@@ -65,6 +77,9 @@
     public static final String VERDICT_WOULD_BE_ALLOWED_IF_SENDER_GRANTS_BAL =
             "Activity start would be allowed if the sender granted BAL privileges";
 
+    private static final long ASM_GRACEPERIOD_TIMEOUT_MS = TIMEOUT_MS;
+    private static final int ASM_GRACEPERIOD_MAX_REPEATS = 5;
+
     private final ActivityTaskManagerService mService;
     private final ActivityTaskSupervisor mSupervisor;
 
@@ -148,6 +163,11 @@
         }
     }
 
+    @GuardedBy("mService.mGlobalLock")
+    private HashMap<Integer, FinishedActivityEntry> mTaskIdToFinishedActivity = new HashMap<>();
+    @GuardedBy("mService.mGlobalLock")
+    private FinishedActivityEntry mTopFinishedActivity = null;
+
     BackgroundActivityStartController(
             final ActivityTaskManagerService service, final ActivityTaskSupervisor supervisor) {
         mService = service;
@@ -575,6 +595,501 @@
         return BAL_BLOCK;
     }
 
+    /**
+     * Log activity starts which violate one of the following rules of the
+     * activity security model (ASM):
+     * See go/activity-security for rationale behind the rules.
+     * 1. Within a task, only an activity matching a top UID of the task can start activities
+     * 2. Only activities within a foreground task, which match a top UID of the task, can
+     * create a new task or bring an existing one into the foreground
+     */
+    boolean checkActivityAllowedToStart(@Nullable ActivityRecord sourceRecord,
+            @NonNull ActivityRecord targetRecord, boolean newTask, @NonNull Task targetTask,
+            int launchFlags, int balCode, int callingUid, int realCallingUid) {
+        // BAL Exception allowed in all cases
+        if (balCode == BAL_ALLOW_ALLOWLISTED_UID) {
+            return true;
+        }
+
+        // Intents with FLAG_ACTIVITY_NEW_TASK will always be considered as creating a new task
+        // even if the intent is delivered to an existing task.
+        boolean taskToFront = newTask
+                || (launchFlags & FLAG_ACTIVITY_NEW_TASK) == FLAG_ACTIVITY_NEW_TASK;
+
+        // BAL exception only allowed for new tasks
+        if (taskToFront) {
+            if (balCode == BAL_ALLOW_ALLOWLISTED_COMPONENT
+                    || balCode == BAL_ALLOW_PERMISSION
+                    || balCode == BAL_ALLOW_PENDING_INTENT
+                    || balCode == BAL_ALLOW_SAW_PERMISSION
+                    || balCode == BAL_ALLOW_VISIBLE_WINDOW) {
+                return true;
+            }
+        }
+
+        if (balCode == BAL_ALLOW_GRACE_PERIOD) {
+            if (taskToFront && mTopFinishedActivity != null
+                    && mTopFinishedActivity.mUid == callingUid) {
+                return true;
+            } else if (!taskToFront) {
+                FinishedActivityEntry finishedEntry =
+                        mTaskIdToFinishedActivity.get(targetTask.mTaskId);
+                if (finishedEntry != null && finishedEntry.mUid == callingUid) {
+                    return true;
+                }
+            }
+        }
+
+        BlockActivityStart bas = null;
+        if (sourceRecord != null) {
+            boolean passesAsmChecks = true;
+            Task sourceTask = sourceRecord.getTask();
+
+            // Allow launching into a new task (or a task matching the launched activity's
+            // affinity) only if the current task is foreground or mutating its own task.
+            // The latter can happen eg. if caller uses NEW_TASK flag and the activity being
+            // launched matches affinity of source task.
+            if (taskToFront) {
+                passesAsmChecks = sourceTask != null
+                        && (sourceTask.isVisible() || sourceTask == targetTask);
+            }
+
+            if (passesAsmChecks) {
+                Task taskToCheck = taskToFront ? sourceTask : targetTask;
+                bas = isTopActivityMatchingUidAbsentForAsm(taskToCheck, sourceRecord.getUid(),
+                        sourceRecord);
+            }
+        } else if (!taskToFront) {
+            // We don't have a sourceRecord, and we're launching into an existing task.
+            // Allow if callingUid is top of stack.
+            bas = isTopActivityMatchingUidAbsentForAsm(targetTask, callingUid,
+                    /*sourceRecord*/null);
+        }
+
+        if (bas != null && !bas.mWouldBlockActivityStartIgnoringFlag) {
+            return true;
+        }
+
+        // ASM rules have failed. Log why
+        return logAsmFailureAndCheckFeatureEnabled(sourceRecord, callingUid, realCallingUid,
+                newTask, targetTask, targetRecord, balCode, launchFlags, bas, taskToFront);
+    }
+
+    private boolean logAsmFailureAndCheckFeatureEnabled(ActivityRecord sourceRecord, int callingUid,
+            int realCallingUid, boolean newTask, Task targetTask, ActivityRecord targetRecord,
+            @BalCode int balCode, int launchFlags, BlockActivityStart bas, boolean taskToFront) {
+
+        ActivityRecord targetTopActivity = targetTask == null ? null
+                : targetTask.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
+
+        int action = newTask || sourceRecord == null
+                ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_NEW_TASK
+                : (sourceRecord.getTask().equals(targetTask)
+                ? FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_SAME_TASK
+                : FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__ACTIVITY_START_DIFFERENT_TASK);
+
+        boolean blockActivityStartAndFeatureEnabled = ActivitySecurityModelFeatureFlags
+                .shouldRestrictActivitySwitch(callingUid)
+                && (bas == null || bas.mBlockActivityStartIfFlagEnabled);
+
+        String asmDebugInfo = getDebugInfoForActivitySecurity("Launch", sourceRecord,
+                targetRecord, targetTask, targetTopActivity, realCallingUid, balCode,
+                blockActivityStartAndFeatureEnabled, taskToFront);
+
+        FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
+                /* caller_uid */
+                sourceRecord != null ? sourceRecord.getUid() : callingUid,
+                /* caller_activity_class_name */
+                sourceRecord != null ? sourceRecord.info.name : null,
+                /* target_task_top_activity_uid */
+                targetTopActivity != null ? targetTopActivity.getUid() : -1,
+                /* target_task_top_activity_class_name */
+                targetTopActivity != null ? targetTopActivity.info.name : null,
+                /* target_task_is_different */
+                newTask || sourceRecord == null || targetTask == null
+                        || !targetTask.equals(sourceRecord.getTask()),
+                /* target_activity_uid */
+                targetRecord.getUid(),
+                /* target_activity_class_name */
+                targetRecord.info.name,
+                /* target_intent_action */
+                targetRecord.intent.getAction(),
+                /* target_intent_flags */
+                launchFlags,
+                /* action */
+                action,
+                /* version */
+                ActivitySecurityModelFeatureFlags.ASM_VERSION,
+                /* multi_window - we have our source not in the target task, but both are visible */
+                targetTask != null && sourceRecord != null
+                        && !targetTask.equals(sourceRecord.getTask()) && targetTask.isVisible(),
+                /* bal_code */
+                balCode,
+                /* debug_info */
+                asmDebugInfo
+        );
+
+        String launchedFromPackageName = targetRecord.launchedFromPackage;
+        if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
+            String toastText = ActivitySecurityModelFeatureFlags.DOC_LINK
+                    + (blockActivityStartAndFeatureEnabled ? " blocked " : " would block ")
+                    + getApplicationLabel(mService.mContext.getPackageManager(),
+                    launchedFromPackageName);
+            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+                    toastText, Toast.LENGTH_LONG).show());
+
+            Slog.i(TAG, asmDebugInfo);
+        }
+
+        if (blockActivityStartAndFeatureEnabled) {
+            Slog.e(TAG, "[ASM] Abort Launching r: " + targetRecord
+                    + " as source: "
+                    + (sourceRecord != null ? sourceRecord : launchedFromPackageName)
+                    + " is in background. New task: " + newTask
+                    + ". Top activity: " + targetTopActivity
+                    + ". BAL Code: " + balCodeToString(balCode));
+
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * If the top activity uid does not match the launching or launched activity, and the launch was
+     * not requested from the top uid, we want to clear out all non matching activities to prevent
+     * the top activity being sandwiched.
+     * Both creator and sender UID are considered for the launching activity.
+     */
+    void clearTopIfNeeded(@NonNull Task targetTask, @Nullable ActivityRecord sourceRecord,
+            @NonNull ActivityRecord targetRecord, int callingUid, int realCallingUid,
+            int launchFlags, @BalCode int balCode) {
+        if ((launchFlags & FLAG_ACTIVITY_NEW_TASK) != FLAG_ACTIVITY_NEW_TASK
+                || balCode == BAL_ALLOW_ALLOWLISTED_UID) {
+            // Launch is from the same task, (a top or privileged UID), or is directly privileged.
+            return;
+        }
+
+        int startingUid = targetRecord.getUid();
+        Predicate<ActivityRecord> isLaunchingOrLaunched = ar ->
+                ar.isUid(startingUid) || ar.isUid(callingUid) || ar.isUid(realCallingUid);
+
+        // Return early if we know for sure we won't need to clear any activities by just checking
+        // the top activity.
+        ActivityRecord targetTaskTop = targetTask.getTopMostActivity();
+        if (targetTaskTop == null || isLaunchingOrLaunched.test(targetTaskTop)) {
+            return;
+        }
+
+        // Find the first activity which matches a safe UID and is not finishing. Clear everything
+        // above it
+        boolean shouldBlockActivityStart = ActivitySecurityModelFeatureFlags
+                .shouldRestrictActivitySwitch(callingUid);
+        int[] finishCount = new int[0];
+        if (shouldBlockActivityStart) {
+            ActivityRecord activity = targetTask.getActivity(isLaunchingOrLaunched);
+            if (activity == null) {
+                // mStartActivity is not in task, so clear everything
+                activity = targetRecord;
+            }
+
+            finishCount = new int[1];
+            targetTask.performClearTop(activity, launchFlags, finishCount);
+            if (finishCount[0] > 0) {
+                Slog.w(TAG, "Cleared top n: " + finishCount[0] + " activities from task t: "
+                        + targetTask + " not matching top uid: " + callingUid);
+            }
+        }
+
+        if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)
+                && (!shouldBlockActivityStart || finishCount[0] > 0)) {
+            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+                    (shouldBlockActivityStart
+                            ? "Top activities cleared by "
+                            : "Top activities would be cleared by ")
+                            + ActivitySecurityModelFeatureFlags.DOC_LINK,
+                    Toast.LENGTH_LONG).show());
+
+            Slog.i(TAG, getDebugInfoForActivitySecurity("Clear Top", sourceRecord, targetRecord,
+                    targetTask, targetTaskTop, realCallingUid, balCode, shouldBlockActivityStart,
+                    /* taskToFront */ true));
+        }
+    }
+
+    /**
+     * Returns home if the passed in callingUid is not top of the stack, rather than returning to
+     * previous task.
+     */
+    void checkActivityAllowedToClearTask(@NonNull Task task, int callingUid,
+            @NonNull String callerActivityClassName) {
+        // We may have already checked that the callingUid has additional clearTask privileges, and
+        // cleared the calling identify. If so, we infer we do not need further restrictions here.
+        if (callingUid == SYSTEM_UID || !task.isVisible() || task.inMultiWindowMode()) {
+            return;
+        }
+
+        TaskDisplayArea displayArea = task.getTaskDisplayArea();
+        if (displayArea == null) {
+            // If there is no associated display area, we can not return home.
+            return;
+        }
+
+        BlockActivityStart bas = isTopActivityMatchingUidAbsentForAsm(task, callingUid, null);
+        if (!bas.mWouldBlockActivityStartIgnoringFlag) {
+            return;
+        }
+
+        ActivityRecord topActivity = task.getActivity(ar -> !ar.finishing && !ar.isAlwaysOnTop());
+        FrameworkStatsLog.write(FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED,
+                /* caller_uid */
+                callingUid,
+                /* caller_activity_class_name */
+                callerActivityClassName,
+                /* target_task_top_activity_uid */
+                topActivity == null ? -1 : topActivity.getUid(),
+                /* target_task_top_activity_class_name */
+                topActivity == null ? null : topActivity.info.name,
+                /* target_task_is_different */
+                false,
+                /* target_activity_uid */
+                -1,
+                /* target_activity_class_name */
+                null,
+                /* target_intent_action */
+                null,
+                /* target_intent_flags */
+                0,
+                /* action */
+                FrameworkStatsLog.ACTIVITY_ACTION_BLOCKED__ACTION__FINISH_TASK,
+                /* version */
+                ActivitySecurityModelFeatureFlags.ASM_VERSION,
+                /* multi_window */
+                false,
+                /* bal_code */
+                -1,
+                /* debug_info */
+                null
+        );
+
+        boolean restrictActivitySwitch = ActivitySecurityModelFeatureFlags
+                .shouldRestrictActivitySwitch(callingUid)
+                && bas.mBlockActivityStartIfFlagEnabled;
+
+        PackageManager pm = mService.mContext.getPackageManager();
+        String callingPackage = pm.getNameForUid(callingUid);
+        final CharSequence callingLabel;
+        if (callingPackage == null) {
+            callingPackage = String.valueOf(callingUid);
+            callingLabel = callingPackage;
+        } else {
+            callingLabel = getApplicationLabel(pm, callingPackage);
+        }
+
+        if (ActivitySecurityModelFeatureFlags.shouldShowToast(callingUid)) {
+            UiThread.getHandler().post(() -> Toast.makeText(mService.mContext,
+                    (ActivitySecurityModelFeatureFlags.DOC_LINK
+                            + (restrictActivitySwitch ? " returned home due to "
+                            : " would return home due to ")
+                            + callingLabel), Toast.LENGTH_LONG).show());
+        }
+
+        // If the activity switch should be restricted, return home rather than the
+        // previously top task, to prevent users from being confused which app they're
+        // viewing
+        if (restrictActivitySwitch) {
+            Slog.w(TAG, "[ASM] Return to home as source: " + callingPackage
+                    + " is not on top of task t: " + task);
+            displayArea.moveHomeActivityToTop("taskRemoved");
+        } else {
+            Slog.i(TAG, "[ASM] Would return to home as source: " + callingPackage
+                    + " is not on top of task t: " + task);
+        }
+    }
+
+    /**
+     * For the purpose of ASM, ‘Top UID” for a task is defined as an activity UID
+     * 1. Which is top of the stack in z-order
+     * a. Excluding any activities with the flag ‘isAlwaysOnTop’ and
+     * b. Excluding any activities which are `finishing`
+     * 2. Or top of an adjacent task fragment to (1)
+     * <p>
+     * The 'sourceRecord' can be considered top even if it is 'finishing'
+     *
+     * Returns a class where the elements are:
+     * <pre>
+     * shouldBlockActivityStart: {@code true} if we should actually block the transition (takes into
+     * consideration feature flag and targetSdk).
+     * wouldBlockActivityStartIgnoringFlags: {@code true} if we should warn about the transition via
+     * toasts. This happens if the transition would be blocked in case both the app was targeting V+
+     * and the feature was enabled.
+     * </pre>
+     */
+    private BlockActivityStart isTopActivityMatchingUidAbsentForAsm(@NonNull Task task,
+            int uid, @Nullable ActivityRecord sourceRecord) {
+        // If the source is visible, consider it 'top'.
+        if (sourceRecord != null && sourceRecord.isVisible()) {
+            return new BlockActivityStart(false, false);
+        }
+
+        // Always allow actual top activity to clear task
+        ActivityRecord topActivity = task.getTopMostActivity();
+        if (topActivity != null && topActivity.isUid(uid)) {
+            return new BlockActivityStart(false, false);
+        }
+
+        // Consider the source activity, whether or not it is finishing. Do not consider any other
+        // finishing activity.
+        Predicate<ActivityRecord> topOfStackPredicate = (ar) -> ar.equals(sourceRecord)
+                || (!ar.finishing && !ar.isAlwaysOnTop());
+
+        // Check top of stack (or the first task fragment for embedding).
+        topActivity = task.getActivity(topOfStackPredicate);
+        if (topActivity == null) {
+            return new BlockActivityStart(true, true);
+        }
+
+        BlockActivityStart pair = blockCrossUidActivitySwitchFromBelow(topActivity, uid);
+        if (!pair.mBlockActivityStartIfFlagEnabled) {
+            return pair;
+        }
+
+        // Even if the top activity is not a match, we may be in an embedded activity scenario with
+        // an adjacent task fragment. Get the second fragment.
+        TaskFragment taskFragment = topActivity.getTaskFragment();
+        if (taskFragment == null) {
+            return pair;
+        }
+
+        TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
+        if (adjacentTaskFragment == null) {
+            return pair;
+        }
+
+        // Check the second fragment.
+        topActivity = adjacentTaskFragment.getActivity(topOfStackPredicate);
+        if (topActivity == null) {
+            return new BlockActivityStart(true, true);
+        }
+
+        return blockCrossUidActivitySwitchFromBelow(topActivity, uid);
+    }
+
+    /**
+     * Determines if a source is allowed to add or remove activities from the task,
+     * if the current ActivityRecord is above it in the stack
+     *
+     * A transition is blocked ({@code false} returned) if all of the following are met:
+     * <pre>
+     * 1. The source activity and the current activity record belong to different apps
+     * (i.e, have different UIDs).
+     * 2. Both the source activity and the current activity target U+
+     * 3. The current activity has not set
+     * {@link ActivityRecord#setAllowCrossUidActivitySwitchFromBelow(boolean)} to {@code true}
+     * </pre>
+     *
+     * Returns a class where the elements are:
+     * <pre>
+     * shouldBlockActivityStart: {@code true} if we should actually block the transition (takes into
+     * consideration feature flag and targetSdk).
+     * wouldBlockActivityStartIgnoringFlags: {@code true} if we should warn about the transition via
+     * toasts. This happens if the transition would be blocked in case both the app was targeting V+
+     * and the feature was enabled.
+     * </pre>
+     *
+     * @param sourceUid The source (s) activity performing the state change
+     */
+    private BlockActivityStart blockCrossUidActivitySwitchFromBelow(ActivityRecord ar,
+            int sourceUid) {
+        if (ar.isUid(sourceUid)) {
+            return new BlockActivityStart(false, false);
+        }
+
+        // If mAllowCrossUidActivitySwitchFromBelow is set, honor it.
+        if (ar.mAllowCrossUidActivitySwitchFromBelow) {
+            return new BlockActivityStart(false, false);
+        }
+
+        // At this point, we would block if the feature is launched and both apps were V+
+        // Since we have a feature flag, we need to check that too
+        // TODO(b/258792202) Replace with CompatChanges and replace Pair with boolean once feature
+        // flag is removed
+        boolean restrictActivitySwitch =
+                ActivitySecurityModelFeatureFlags.shouldRestrictActivitySwitch(ar.getUid())
+                        && ActivitySecurityModelFeatureFlags
+                        .shouldRestrictActivitySwitch(sourceUid);
+        return new BackgroundActivityStartController
+                .BlockActivityStart(restrictActivitySwitch, true);
+    }
+
+    /**
+     * Only called when an activity launch may be blocked, which should happen very rarely
+     */
+    private String getDebugInfoForActivitySecurity(@NonNull String action,
+            @Nullable ActivityRecord sourceRecord, @NonNull ActivityRecord targetRecord,
+            @Nullable Task targetTask, @Nullable ActivityRecord targetTopActivity,
+            int realCallingUid, @BalCode int balCode,
+            boolean blockActivityStartAndFeatureEnabled, boolean taskToFront) {
+        final String prefix = "[ASM] ";
+        Function<ActivityRecord, String> recordToString = (ar) -> {
+            if (ar == null) {
+                return null;
+            }
+            return (ar == sourceRecord ? " [source]=> "
+                    : ar == targetTopActivity ? " [ top  ]=> "
+                    : ar == targetRecord ? " [target]=> "
+                    : "         => ")
+                    + ar
+                    + " :: visible=" + ar.isVisible()
+                    + ", finishing=" + ar.isFinishing()
+                    + ", alwaysOnTop=" + ar.isAlwaysOnTop()
+                    + ", taskFragment=" + ar.getTaskFragment();
+        };
+
+        StringJoiner joiner = new StringJoiner("\n");
+        joiner.add(prefix + "------ Activity Security " + action + " Debug Logging Start ------");
+        joiner.add(prefix + "Block Enabled: " + blockActivityStartAndFeatureEnabled);
+        joiner.add(prefix + "ASM Version: " + ActivitySecurityModelFeatureFlags.ASM_VERSION);
+
+        boolean targetTaskMatchesSourceTask = targetTask != null
+                && sourceRecord != null && sourceRecord.getTask() == targetTask;
+
+        if (sourceRecord == null) {
+            joiner.add(prefix + "Source Package: " + targetRecord.launchedFromPackage);
+            String realCallingPackage = mService.mContext.getPackageManager().getNameForUid(
+                    realCallingUid);
+            joiner.add(prefix + "Real Calling Uid Package: " + realCallingPackage);
+        } else {
+            joiner.add(prefix + "Source Record: " + recordToString.apply(sourceRecord));
+            if (targetTaskMatchesSourceTask) {
+                joiner.add(prefix + "Source/Target Task: " + sourceRecord.getTask());
+                joiner.add(prefix + "Source/Target Task Stack: ");
+            } else {
+                joiner.add(prefix + "Source Task: " + sourceRecord.getTask());
+                joiner.add(prefix + "Source Task Stack: ");
+            }
+            sourceRecord.getTask().forAllActivities((Consumer<ActivityRecord>)
+                    ar -> joiner.add(prefix + recordToString.apply(ar)));
+        }
+
+        joiner.add(prefix + "Target Task Top: " + recordToString.apply(targetTopActivity));
+        if (!targetTaskMatchesSourceTask) {
+            joiner.add(prefix + "Target Task: " + targetTask);
+            if (targetTask != null) {
+                joiner.add(prefix + "Target Task Stack: ");
+                targetTask.forAllActivities((Consumer<ActivityRecord>)
+                        ar -> joiner.add(prefix + recordToString.apply(ar)));
+            }
+        }
+
+        joiner.add(prefix + "Target Record: " + recordToString.apply(targetRecord));
+        joiner.add(prefix + "Intent: " + targetRecord.intent);
+        joiner.add(prefix + "TaskToFront: " + taskToFront);
+        joiner.add(prefix + "BalCode: " + balCodeToString(balCode));
+
+        joiner.add(prefix + "------ Activity Security " + action + " Debug Logging End ------");
+        return joiner.toString();
+    }
+
     static @BalCode int logStartAllowedAndReturnCode(@BalCode int code, boolean background,
             int callingUid, int realCallingUid, Intent intent, int pid, String msg) {
         return logStartAllowedAndReturnCode(code, background, callingUid, realCallingUid, intent,
@@ -653,4 +1168,91 @@
                     realCallingUid);
         }
     }
+
+    /**
+     * Called whenever an activity finishes. Stores the record, so it can be used by ASM grace
+     * period checks.
+     */
+    void onActivityRequestedFinishing(@NonNull ActivityRecord finishActivity) {
+        // We only update the entry if the passed in activity
+        // 1. Has been chained less than a set max AND
+        // 2. Is visible or top
+        FinishedActivityEntry entry =
+                mTaskIdToFinishedActivity.get(finishActivity.getTask().mTaskId);
+        if (entry != null && finishActivity.isUid(entry.mUid)
+                && entry.mLaunchCount > ASM_GRACEPERIOD_MAX_REPEATS) {
+            return;
+        }
+
+        if (!finishActivity.mVisibleRequested
+                && finishActivity != finishActivity.getTask().getTopMostActivity()) {
+            return;
+        }
+
+        FinishedActivityEntry newEntry = new FinishedActivityEntry(finishActivity);
+        mTaskIdToFinishedActivity.put(finishActivity.getTask().mTaskId, newEntry);
+        if (finishActivity.getTask().mVisibleRequested) {
+            mTopFinishedActivity = newEntry;
+        }
+    }
+
+    /**
+     * Called whenever an activity starts. Updates the record so the activity is no longer
+     * considered for ASM grace period checks
+     */
+    void onNewActivityLaunched(ActivityRecord activityStarted) {
+        if (activityStarted.getTask() == null) {
+            return;
+        }
+
+        if (activityStarted.getTask().mVisibleRequested) {
+            mTopFinishedActivity = null;
+        }
+
+        FinishedActivityEntry entry =
+                mTaskIdToFinishedActivity.get(activityStarted.getTask().mTaskId);
+        if (entry != null && activityStarted.getTask().isTaskId(entry.mTaskId)) {
+            mTaskIdToFinishedActivity.remove(entry.mTaskId);
+        }
+    }
+
+    static class BlockActivityStart {
+        // We should block if feature flag is enabled
+        private final boolean mBlockActivityStartIfFlagEnabled;
+        // Used for logging/toasts. Would we block if target sdk was V and feature was
+        // enabled?
+        private final boolean mWouldBlockActivityStartIgnoringFlag;
+
+        BlockActivityStart(boolean shouldBlockActivityStart,
+                boolean wouldBlockActivityStartIgnoringFlags) {
+            this.mBlockActivityStartIfFlagEnabled = shouldBlockActivityStart;
+            this.mWouldBlockActivityStartIgnoringFlag = wouldBlockActivityStartIgnoringFlags;
+        }
+    }
+
+    private class FinishedActivityEntry {
+        int mUid;
+        int mTaskId;
+        int mLaunchCount;
+
+        FinishedActivityEntry(ActivityRecord ar) {
+            FinishedActivityEntry entry = mTaskIdToFinishedActivity.get(ar.getTask().mTaskId);
+            int taskId = ar.getTask().mTaskId;
+            this.mUid = ar.getUid();
+            this.mTaskId = taskId;
+            this.mLaunchCount = entry == null || !ar.isUid(entry.mUid) ? 1 : entry.mLaunchCount + 1;
+
+            mService.mH.postDelayed(() -> {
+                synchronized (mService.mGlobalLock) {
+                    if (mTaskIdToFinishedActivity.get(taskId) == this) {
+                        mTaskIdToFinishedActivity.remove(taskId);
+                    }
+
+                    if (mTopFinishedActivity == this) {
+                        mTopFinishedActivity = null;
+                    }
+                }
+            }, ASM_GRACEPERIOD_TIMEOUT_MS);
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/wm/CompatModePackages.java b/services/core/java/com/android/server/wm/CompatModePackages.java
index c6978fd..2439159 100644
--- a/services/core/java/com/android/server/wm/CompatModePackages.java
+++ b/services/core/java/com/android/server/wm/CompatModePackages.java
@@ -20,7 +20,10 @@
 import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
 import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
 import static com.android.server.wm.ActivityTaskSupervisor.PRESERVE_WINDOWS;
+import static com.android.server.wm.CompatScaleProvider.COMPAT_SCALE_MODE_SYSTEM_FIRST;
+import static com.android.server.wm.CompatScaleProvider.COMPAT_SCALE_MODE_SYSTEM_LAST;
 
+import android.annotation.NonNull;
 import android.app.ActivityManager;
 import android.app.AppGlobals;
 import android.app.GameManagerInternal;
@@ -32,6 +35,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.content.res.CompatibilityInfo;
+import android.content.res.CompatibilityInfo.CompatScale;
 import android.content.res.Configuration;
 import android.os.Build;
 import android.os.Handler;
@@ -332,6 +336,8 @@
     private final HashMap<String, Integer> mPackages = new HashMap<>();
     private final CompatHandler mHandler;
 
+    private final SparseArray<CompatScaleProvider> mProviders = new SparseArray<>();
+
     public CompatModePackages(ActivityTaskManagerService service, File systemDir, Handler handler) {
         mService = service;
         mFile = new AtomicFile(new File(systemDir, "packages-compat.xml"), "compat-mode");
@@ -441,13 +447,38 @@
 
     public CompatibilityInfo compatibilityInfoForPackageLocked(ApplicationInfo ai) {
         final boolean forceCompat = getPackageCompatModeEnabledLocked(ai);
-        final float compatScale = getCompatScale(ai.packageName, ai.uid);
+        final CompatScale compatScale = getCompatScaleFromProvider(ai.packageName, ai.uid);
+        final float appScale = compatScale != null
+                ? compatScale.mScaleFactor
+                : getCompatScale(ai.packageName, ai.uid, /* checkProvider= */ false);
+        final float densityScale = compatScale != null ? compatScale.mDensityScaleFactor : appScale;
         final Configuration config = mService.getGlobalConfiguration();
         return new CompatibilityInfo(ai, config.screenLayout, config.smallestScreenWidthDp,
-                forceCompat, compatScale);
+                forceCompat, appScale, densityScale);
     }
 
     float getCompatScale(String packageName, int uid) {
+        return getCompatScale(packageName, uid, /* checkProvider= */ true);
+    }
+
+    private CompatScale getCompatScaleFromProvider(String packageName, int uid) {
+        for (int i = 0; i < mProviders.size(); i++) {
+            final CompatScaleProvider provider = mProviders.valueAt(i);
+            final CompatScale compatScale = provider.getCompatScale(packageName, uid);
+            if (compatScale != null) {
+                return compatScale;
+            }
+        }
+        return null;
+    }
+
+    private float getCompatScale(String packageName, int uid, boolean checkProviders) {
+        if (checkProviders) {
+            final CompatScale compatScale = getCompatScaleFromProvider(packageName, uid);
+            if (compatScale != null) {
+                return compatScale.mScaleFactor;
+            }
+        }
         final UserHandle userHandle = UserHandle.getUserHandleForUid(uid);
         if (mGameManager == null) {
             mGameManager = LocalServices.getService(GameManagerInternal.class);
@@ -487,6 +518,36 @@
         return 1f;
     }
 
+    void registerCompatScaleProvider(@CompatScaleProvider.CompatScaleModeOrderId int id,
+            @NonNull CompatScaleProvider provider) {
+        synchronized (mService.mGlobalLock) {
+            if (mProviders.contains(id)) {
+                throw new IllegalArgumentException("Duplicate id provided: " + id);
+            }
+            if (provider == null) {
+                throw new IllegalArgumentException("The passed CompatScaleProvider "
+                        + "can not be null");
+            }
+            if (!CompatScaleProvider.isValidOrderId(id)) {
+                throw new IllegalArgumentException(
+                        "Provided id " + id + " is not in range of valid ids for system "
+                                + "services [" + COMPAT_SCALE_MODE_SYSTEM_FIRST + ","
+                                + COMPAT_SCALE_MODE_SYSTEM_LAST + "]");
+            }
+            mProviders.put(id, provider);
+        }
+    }
+
+    void unregisterCompatScaleProvider(@CompatScaleProvider.CompatScaleModeOrderId int id) {
+        synchronized (mService.mGlobalLock) {
+            if (!mProviders.contains(id)) {
+                throw new IllegalArgumentException(
+                        "CompatScaleProvider with id (" + id + ") is not registered");
+            }
+            mProviders.remove(id);
+        }
+    }
+
     private static float getScalingFactor(String packageName, UserHandle userHandle) {
         if (CompatChanges.isChangeEnabled(DOWNSCALE_90, packageName, userHandle)) {
             return 0.9f;
diff --git a/services/core/java/com/android/server/wm/CompatScaleProvider.java b/services/core/java/com/android/server/wm/CompatScaleProvider.java
new file mode 100644
index 0000000..5474ece
--- /dev/null
+++ b/services/core/java/com/android/server/wm/CompatScaleProvider.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.res.CompatibilityInfo.CompatScale;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * An interface for services that need to provide compatibility scale different than
+ * the default android compatibility.
+ */
+public interface CompatScaleProvider {
+
+    /**
+     * The unique id of each provider registered by a system service which determines the order
+     * it will execute in.
+     */
+    @IntDef(prefix = { "COMPAT_SCALE_MODE_" }, value = {
+        // Order Ids for system services
+        COMPAT_SCALE_MODE_SYSTEM_FIRST,
+        COMPAT_SCALE_MODE_GAME,
+        COMPAT_SCALE_MODE_PRODUCT,
+        COMPAT_SCALE_MODE_SYSTEM_LAST, // Update this when adding new ids
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    @interface CompatScaleModeOrderId {}
+
+    /**
+     * The first id, used by the framework to determine the valid range of ids.
+     * @hide
+     */
+    int COMPAT_SCALE_MODE_SYSTEM_FIRST = 0;
+
+    /**
+     * TODO(b/295207384)
+     * The identifier for {@link android.app.GameManagerInternal} provider
+     * @hide
+     */
+    int COMPAT_SCALE_MODE_GAME = 1;
+
+    /**
+     * The identifier for a provider which is specific to the type of android product like
+     * Automotive, Wear, TV etc.
+     * @hide
+     */
+    int COMPAT_SCALE_MODE_PRODUCT = 2;
+
+    /**
+     * The final id, used by the framework to determine the valid range of ids. Update this when
+     * adding new ids.
+     * @hide
+     */
+    int COMPAT_SCALE_MODE_SYSTEM_LAST = COMPAT_SCALE_MODE_PRODUCT;
+
+    /**
+     * Returns {@code true} if the id is in the range of valid system services
+     * @hide
+     */
+    static boolean isValidOrderId(int id) {
+        return (id >= COMPAT_SCALE_MODE_SYSTEM_FIRST && id <= COMPAT_SCALE_MODE_SYSTEM_LAST);
+    }
+
+    /**
+     * @return an instance of {@link CompatScale} to apply for the given package
+     */
+    @Nullable
+    CompatScale getCompatScale(@NonNull String packageName, int uid);
+}
diff --git a/services/core/java/com/android/server/wm/ContentRecorder.java b/services/core/java/com/android/server/wm/ContentRecorder.java
index 5aa7c97..7cd07d6 100644
--- a/services/core/java/com/android/server/wm/ContentRecorder.java
+++ b/services/core/java/com/android/server/wm/ContentRecorder.java
@@ -35,6 +35,7 @@
 import android.os.ServiceManager;
 import android.provider.DeviceConfig;
 import android.view.ContentRecordingSession;
+import android.view.ContentRecordingSession.RecordContent;
 import android.view.Display;
 import android.view.SurfaceControl;
 
@@ -84,6 +85,7 @@
     /**
      * The last configuration orientation.
      */
+    @Configuration.Orientation
     private int mLastOrientation = ORIENTATION_UNDEFINED;
 
     ContentRecorder(@NonNull DisplayContent displayContent) {
@@ -149,6 +151,20 @@
                 return;
             }
 
+            // TODO(b/297514518) Do not start capture if the app is in PIP, the bounds are
+            //  inaccurate.
+            if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
+                final Task capturedTask = mRecordedWindowContainer.asTask();
+                if (capturedTask.inPinnedWindowingMode()) {
+                    ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
+                            "Content Recording: Display %d was already recording, but "
+                                    + "pause capture since the task is in PIP",
+                            mDisplayContent.getDisplayId());
+                    pauseRecording();
+                    return;
+                }
+            }
+
             ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
                     "Content Recording: Display %d was already recording, so apply "
                             + "transformations if necessary",
@@ -156,7 +172,8 @@
             // Retrieve the size of the region to record, and continue with the update
             // if the bounds or orientation has changed.
             final Rect recordedContentBounds = mRecordedWindowContainer.getBounds();
-            int recordedContentOrientation = mRecordedWindowContainer.getOrientation();
+            @Configuration.Orientation int recordedContentOrientation =
+                    mRecordedWindowContainer.getConfiguration().orientation;
             if (!mLastRecordedBounds.equals(recordedContentBounds)
                     || lastOrientation != recordedContentOrientation) {
                 Point surfaceSize = fetchSurfaceSizeIfPresent();
@@ -289,6 +306,17 @@
             return;
         }
 
+        // TODO(b/297514518) Do not start capture if the app is in PIP, the bounds are inaccurate.
+        if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
+            if (mRecordedWindowContainer.asTask().inPinnedWindowingMode()) {
+                ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
+                        "Content Recording: Display %d should start recording, but "
+                                + "don't yet since the task is in PIP",
+                        mDisplayContent.getDisplayId());
+                return;
+            }
+        }
+
         final Point surfaceSize = fetchSurfaceSizeIfPresent();
         if (surfaceSize == null) {
             ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
@@ -302,9 +330,6 @@
                         + "state %d",
                 mDisplayContent.getDisplayId(), mDisplayContent.getDisplayInfo().state);
 
-        // TODO(b/274790702): Do not start recording if waiting for consent - for now,
-        //  go ahead.
-
         // Create a mirrored hierarchy for the SurfaceControl of the DisplayArea to capture.
         mRecordedSurface = SurfaceControl.mirrorSurface(
                 mRecordedWindowContainer.getSurfaceControl());
@@ -356,7 +381,7 @@
      */
     @Nullable
     private WindowContainer retrieveRecordedWindowContainer() {
-        final int contentToRecord = mContentRecordingSession.getContentToRecord();
+        @RecordContent final int contentToRecord = mContentRecordingSession.getContentToRecord();
         final IBinder tokenToRecord = mContentRecordingSession.getTokenToRecord();
         switch (contentToRecord) {
             case RECORD_CONTENT_DISPLAY:
@@ -472,6 +497,12 @@
             shiftedY = (surfaceSize.y - scaledHeight) / 2;
         }
 
+        ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
+                "Content Recording: Apply transformations of shift %d x %d, scale %f, crop %d x "
+                        + "%d for display %d",
+                shiftedX, shiftedY, scale, recordedContentBounds.width(),
+                recordedContentBounds.height(), mDisplayContent.getDisplayId());
+
         transaction
                 // Crop the area to capture to exclude the 'extra' wallpaper that is used
                 // for parallax (b/189930234).
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index daa73db..996d666 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -6505,14 +6505,6 @@
     }
 
     /**
-     * @return whether AOD is showing on this display
-     */
-    boolean isAodShowing() {
-        return mRootWindowContainer.mTaskSupervisor
-                .getKeyguardController().isAodShowing(mDisplayId);
-    }
-
-    /**
      * @return whether this display maintains its own focus and touch mode.
      */
     boolean hasOwnFocus() {
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 707b779..17bfeb4 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -269,6 +269,8 @@
 
     private boolean mIsFreeformWindowOverlappingWithNavBar;
 
+    private @InsetsType int mForciblyShownTypes;
+
     private boolean mIsImmersiveMode;
 
     // The windows we were told about in focusChanged.
@@ -1402,6 +1404,7 @@
         mAllowLockscreenWhenOn = false;
         mShowingDream = false;
         mIsFreeformWindowOverlappingWithNavBar = false;
+        mForciblyShownTypes = 0;
     }
 
     /**
@@ -1459,6 +1462,10 @@
             }
         }
 
+        if (win.mSession.mCanForceShowingInsets) {
+            mForciblyShownTypes |= win.mAttrs.forciblyShownTypes;
+        }
+
         if (!affectsSystemUi) {
             return;
         }
@@ -1640,6 +1647,10 @@
         mService.mPolicy.setAllowLockscreenWhenOn(getDisplayId(), mAllowLockscreenWhenOn);
     }
 
+    boolean areTypesForciblyShownTransiently(@InsetsType int types) {
+        return (mForciblyShownTypes & types) == types;
+    }
+
     /**
      * Applies the keyguard policy to a specific window.
      *
@@ -1666,18 +1677,6 @@
     }
 
     private boolean shouldBeHiddenByKeyguard(WindowState win, WindowState imeTarget) {
-        // If AOD is showing, the IME should be hidden. However, sometimes the AOD is considered
-        // hidden because it's in the process of hiding, but it's still being shown on screen.
-        // In that case, we want to continue hiding the IME until the windows have completed
-        // drawing. This way, we know that the IME can be safely shown since the other windows are
-        // now shown.
-        final boolean hideIme = win.mIsImWindow
-                && (mDisplayContent.isAodShowing()
-                        || (mDisplayContent.isDefaultDisplay && !mWindowManagerDrawComplete));
-        if (hideIme) {
-            return true;
-        }
-
         if (!mDisplayContent.isDefaultDisplay || !isKeyguardShowing()) {
             return false;
         }
diff --git a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
index f96f99d..c4ed0dd 100644
--- a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
@@ -228,9 +228,9 @@
                             + "activityRecord=%s", activity);
             final ClientTransaction transaction = ClientTransaction.obtain(
                     activity.app.getThread(), activity.token);
-            transaction.addCallback(
-                    RefreshCallbackItem.obtain(cycleThroughStop ? ON_STOP : ON_PAUSE));
-            transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(
+            transaction.addCallback(RefreshCallbackItem.obtain(activity.token,
+                            cycleThroughStop ? ON_STOP : ON_PAUSE));
+            transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(activity.token,
                     /* isForward */ false, /* shouldSendCompatFakeFocus */ false));
             activity.mAtmService.getLifecycleManager().scheduleTransaction(transaction);
             mHandler.postDelayed(
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java
index 0f1a105..8519e4d 100644
--- a/services/core/java/com/android/server/wm/DragState.java
+++ b/services/core/java/com/android/server/wm/DragState.java
@@ -21,7 +21,6 @@
 import static android.content.ClipDescription.MIMETYPE_APPLICATION_TASK;
 import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
 import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INTERCEPT_GLOBAL_DRAG_AND_DROP;
-
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ORIENTATION;
 import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
 import static com.android.server.wm.DragDropController.MSG_ANIMATION_END;
@@ -33,7 +32,6 @@
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
 import static com.android.server.wm.WindowManagerService.MY_PID;
 import static com.android.server.wm.WindowManagerService.MY_UID;
-
 import static java.util.concurrent.CompletableFuture.completedFuture;
 
 import android.animation.Animator;
@@ -48,7 +46,6 @@
 import android.os.Binder;
 import android.os.Build;
 import android.os.IBinder;
-import android.os.InputConfig;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -186,8 +183,13 @@
         // Crop the input surface to the display size.
         mTmpClipRect.set(0, 0, mDisplaySize.x, mDisplaySize.y);
 
+        // Make trusted overlay to not block any touches while D&D ongoing and allowing
+        // touches to pass through to windows underneath. This allows user to interact with the
+        // UI to navigate while dragging.
+        h.setTrustedOverlay(mTransaction, mInputSurface, true);
         mTransaction.show(mInputSurface)
                 .setInputWindowInfo(mInputSurface, h)
+                .setTrustedOverlay(mInputSurface, true)
                 .setLayer(mInputSurface, Integer.MAX_VALUE)
                 .setCrop(mInputSurface, mTmpClipRect);
 
@@ -377,11 +379,6 @@
             mDragWindowHandle.ownerUid = MY_UID;
             mDragWindowHandle.scaleFactor = 1.0f;
 
-            // InputConfig.TRUSTED_OVERLAY: To not block any touches while D&D ongoing and allowing
-            // touches to pass through to windows underneath. This allows user to interact with the
-            // UI to navigate while dragging.
-            mDragWindowHandle.inputConfig = InputConfig.TRUSTED_OVERLAY;
-
             // The drag window cannot receive new touches.
             mDragWindowHandle.touchableRegion.setEmpty();
 
diff --git a/services/core/java/com/android/server/wm/InputConsumerImpl.java b/services/core/java/com/android/server/wm/InputConsumerImpl.java
index 39622c1..c21930d 100644
--- a/services/core/java/com/android/server/wm/InputConsumerImpl.java
+++ b/services/core/java/com/android/server/wm/InputConsumerImpl.java
@@ -74,7 +74,7 @@
         mWindowHandle.ownerPid = WindowManagerService.MY_PID;
         mWindowHandle.ownerUid = WindowManagerService.MY_UID;
         mWindowHandle.scaleFactor = 1.0f;
-        mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.TRUSTED_OVERLAY;
+        mWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE;
 
         mInputSurface = mService.makeSurfaceBuilder(
                         mService.mRoot.getDisplayContent(displayId).getSession())
@@ -129,12 +129,14 @@
 
     void show(SurfaceControl.Transaction t, WindowContainer w) {
         t.show(mInputSurface);
+        mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
         t.setInputWindowInfo(mInputSurface, mWindowHandle);
         t.setRelativeLayer(mInputSurface, w.getSurfaceControl(), 1);
     }
 
     void show(SurfaceControl.Transaction t, int layer) {
         t.show(mInputSurface);
+        mWindowHandle.setTrustedOverlay(t, mInputSurface, true);
         t.setInputWindowInfo(mInputSurface, mWindowHandle);
         t.setLayer(mInputSurface, layer);
     }
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 825d38b..f77da62 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -40,12 +40,10 @@
 import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL;
 import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
 import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
-
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_FOCUS_LIGHT;
 import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_INPUT;
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
 import static com.android.server.wm.WindowManagerService.LOGTAG_INPUT_FOCUS;
-
 import static java.lang.Integer.MAX_VALUE;
 
 import android.annotation.Nullable;
@@ -732,7 +730,7 @@
                 new InputWindowHandle(null /* inputApplicationHandle */, displayId));
         inputWindowHandle.setName(name);
         inputWindowHandle.setLayoutParamsType(TYPE_SECURE_SYSTEM_OVERLAY);
-        inputWindowHandle.setTrustedOverlay(true);
+        inputWindowHandle.setTrustedOverlay(t, sc, true);
         populateOverlayInputInfo(inputWindowHandle);
         setInputWindowInfoIfNeeded(t, sc, inputWindowHandle);
     }
diff --git a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
index 64b7a60..90d81bd 100644
--- a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
+++ b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java
@@ -195,6 +195,11 @@
         mChanged = true;
     }
 
+    void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc,
+            boolean trustedOverlay) {
+        mHandle.setTrustedOverlay(t, sc, trustedOverlay);
+    }
+
     void setOwnerPid(int pid) {
         if (mHandle.ownerPid == pid) {
             return;
diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java
index 835c92d..d0d7f49 100644
--- a/services/core/java/com/android/server/wm/InsetsPolicy.java
+++ b/services/core/java/com/android/server/wm/InsetsPolicy.java
@@ -23,8 +23,6 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
 import static android.view.InsetsSource.ID_IME;
 import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
 
 import android.annotation.NonNull;
@@ -77,6 +75,18 @@
     /** Used to show system bars permanently. This will affect the layout. */
     private final InsetsControlTarget mPermanentControlTarget;
 
+    /**
+     * Used to override the visibility of {@link Type#statusBars()} when dispatching insets to
+     * clients.
+     */
+    private InsetsControlTarget mFakeStatusControlTarget;
+
+    /**
+     * Used to override the visibility of {@link Type#navigationBars()} when dispatching insets to
+     * clients.
+     */
+    private InsetsControlTarget mFakeNavControlTarget;
+
     private WindowState mFocusedWin;
     private final BarWindow mStatusBar = new BarWindow(StatusBarManager.WINDOW_STATUS_BAR);
     private final BarWindow mNavBar = new BarWindow(StatusBarManager.WINDOW_NAVIGATION_BAR);
@@ -103,25 +113,25 @@
             abortTransient();
         }
         mFocusedWin = focusedWin;
-        final InsetsControlTarget statusControlTarget =
-                getStatusControlTarget(focusedWin, false /* fake */);
-        final InsetsControlTarget navControlTarget =
-                getNavControlTarget(focusedWin, false /* fake */);
         final WindowState notificationShade = mPolicy.getNotificationShade();
         final WindowState topApp = mPolicy.getTopFullscreenOpaqueWindow();
+        final InsetsControlTarget statusControlTarget =
+                getStatusControlTarget(focusedWin, false /* fake */);
+        mFakeStatusControlTarget = statusControlTarget == mTransientControlTarget
+                ? getStatusControlTarget(focusedWin, true /* fake */)
+                : statusControlTarget == notificationShade
+                        ? getStatusControlTarget(topApp, true /* fake */)
+                        : null;
+        final InsetsControlTarget navControlTarget =
+                getNavControlTarget(focusedWin, false /* fake */);
+        mFakeNavControlTarget = navControlTarget == mTransientControlTarget
+                ? getNavControlTarget(focusedWin, true /* fake */)
+                : navControlTarget == notificationShade
+                        ? getNavControlTarget(topApp, true /* fake */)
+                        : null;
         mStateController.onBarControlTargetChanged(
-                statusControlTarget,
-                statusControlTarget == mTransientControlTarget
-                        ? getStatusControlTarget(focusedWin, true /* fake */)
-                        : statusControlTarget == notificationShade
-                                ? getStatusControlTarget(topApp, true /* fake */)
-                                : null,
-                navControlTarget,
-                navControlTarget == mTransientControlTarget
-                        ? getNavControlTarget(focusedWin, true /* fake */)
-                        : navControlTarget == notificationShade
-                                ? getNavControlTarget(topApp, true /* fake */)
-                                : null);
+                statusControlTarget, mFakeStatusControlTarget,
+                navControlTarget, mFakeNavControlTarget);
         mStatusBar.updateVisibility(statusControlTarget, Type.statusBars());
         mNavBar.updateVisibility(navControlTarget, Type.navigationBars());
     }
@@ -206,7 +216,7 @@
             boolean includesTransient) {
         InsetsState state;
         if (!includesTransient) {
-            state = adjustVisibilityForTransientTypes(originalState);
+            state = adjustVisibilityForFakeControllingSources(originalState);
         } else {
             state = originalState;
         }
@@ -321,24 +331,40 @@
         return state;
     }
 
-    private InsetsState adjustVisibilityForTransientTypes(InsetsState originalState) {
+    private InsetsState adjustVisibilityForFakeControllingSources(InsetsState originalState) {
+        if (mFakeStatusControlTarget == null && mFakeNavControlTarget == null) {
+            return originalState;
+        }
         InsetsState state = originalState;
         for (int i = state.sourceSize() - 1; i >= 0; i--) {
             final InsetsSource source = state.sourceAt(i);
-            if (isTransient(source.getType()) && source.isVisible()) {
-                if (state == originalState) {
-                    // The source will be modified, create a non-deep copy to store the new one.
-                    state = new InsetsState(originalState);
-                }
-                // Replace the source with a copy in invisible state.
-                final InsetsSource outSource = new InsetsSource(source);
-                outSource.setVisible(false);
-                state.addSource(outSource);
-            }
+            state = adjustVisibilityForFakeControllingSource(state, Type.statusBars(), source,
+                    mFakeStatusControlTarget);
+            state = adjustVisibilityForFakeControllingSource(state, Type.navigationBars(), source,
+                    mFakeNavControlTarget);
         }
         return state;
     }
 
+    private static InsetsState adjustVisibilityForFakeControllingSource(InsetsState originalState,
+            @InsetsType int type, InsetsSource source, InsetsControlTarget target) {
+        if (source.getType() != type || target == null) {
+            return originalState;
+        }
+        final boolean isRequestedVisible = target.isRequestedVisible(type);
+        if (source.isVisible() == isRequestedVisible) {
+            return originalState;
+        }
+        // The source will be modified, create a non-deep copy to store the new one.
+        final InsetsState state = new InsetsState(originalState);
+
+        // Replace the source with a copy with the overridden visibility.
+        final InsetsSource outSource = new InsetsSource(source);
+        outSource.setVisible(isRequestedVisible);
+        state.addSource(outSource);
+        return state;
+    }
+
     private InsetsState adjustVisibilityForIme(WindowState w, InsetsState originalState,
             boolean copyState) {
         if (w.mIsImWindow) {
@@ -473,7 +499,7 @@
             // we will dispatch the real visibility of status bar to the client.
             return mPermanentControlTarget;
         }
-        if (forceShowsStatusBarTransiently() && !fake) {
+        if (mPolicy.areTypesForciblyShownTransiently(Type.statusBars()) && !fake) {
             // Status bar is forcibly shown transiently, and its new visibility won't be
             // dispatched to the client so that we can keep the layout stable. We will dispatch the
             // fake control to the client, so that it can re-show the bar during this scenario.
@@ -505,7 +531,7 @@
         if (imeWin != null && imeWin.isVisible() && !mHideNavBarForKeyboard) {
             // Force showing navigation bar while IME is visible and if navigation bar is not
             // configured to be hidden by the IME.
-            return null;
+            return mPermanentControlTarget;
         }
         if (!fake && isTransient(Type.navigationBars())) {
             return mTransientControlTarget;
@@ -533,7 +559,7 @@
             // bar, and we will dispatch the real visibility of navigation bar to the client.
             return mPermanentControlTarget;
         }
-        if (forceShowsNavigationBarTransiently() && !fake) {
+        if (mPolicy.areTypesForciblyShownTransiently(Type.navigationBars()) && !fake) {
             // Navigation bar is forcibly shown transiently, and its new visibility won't be
             // dispatched to the client so that we can keep the layout stable. We will dispatch the
             // fake control to the client, so that it can re-show the bar during this scenario.
@@ -603,17 +629,6 @@
                 && focusedWin.getAttrs().type <= WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
     }
 
-    private boolean forceShowsStatusBarTransiently() {
-        final WindowState win = mPolicy.getStatusBar();
-        return win != null && (win.mAttrs.privateFlags & PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR) != 0;
-    }
-
-    private boolean forceShowsNavigationBarTransiently() {
-        final WindowState win = mPolicy.getNotificationShade();
-        return win != null
-                && (win.mAttrs.privateFlags & PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION) != 0;
-    }
-
     private void dispatchTransientSystemBarsVisibilityChanged(
             @Nullable WindowState focusedWindow,
             boolean areVisible,
diff --git a/services/core/java/com/android/server/wm/LetterboxConfiguration.java b/services/core/java/com/android/server/wm/LetterboxConfiguration.java
index 45cf10b..579fd14 100644
--- a/services/core/java/com/android/server/wm/LetterboxConfiguration.java
+++ b/services/core/java/com/android/server/wm/LetterboxConfiguration.java
@@ -29,6 +29,7 @@
 
 import com.android.internal.R;
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.window.flags.FeatureFlags;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -90,13 +91,6 @@
             "enable_app_compat_user_aspect_ratio_fullscreen";
     private static final boolean DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_FULLSCREEN = true;
 
-    // Whether the letterbox wallpaper style is enabled by default
-    private static final String KEY_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER =
-            "enable_letterbox_background_wallpaper";
-
-    // TODO(b/290048978): Enable wallpaper as default letterbox background.
-    private static final boolean DEFAULT_VALUE_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER = false;
-
     /**
      * Override of aspect ratio for fixed orientation letterboxing that is set via ADB with
      * set-fixed-orientation-letterbox-aspect-ratio or via {@link
@@ -185,6 +179,9 @@
     @NonNull
     private final LetterboxConfigurationPersister mLetterboxConfigurationPersister;
 
+    @NonNull
+    private final FeatureFlags mFeatureFlags;
+
     // Aspect ratio of letterbox for fixed orientation, values <=
     // MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO will be ignored.
     private float mFixedOrientationLetterboxAspectRatio;
@@ -301,7 +298,8 @@
     // Flags dynamically updated with {@link android.provider.DeviceConfig}.
     @NonNull private final SynchedDeviceConfig mDeviceConfig;
 
-    LetterboxConfiguration(@NonNull final Context systemUiContext) {
+    LetterboxConfiguration(@NonNull final Context systemUiContext,
+                           @NonNull FeatureFlags featureFags) {
         this(systemUiContext, new LetterboxConfigurationPersister(
                 () -> readLetterboxHorizontalReachabilityPositionFromConfig(
                         systemUiContext, /* forBookMode */ false),
@@ -310,14 +308,16 @@
                 () -> readLetterboxHorizontalReachabilityPositionFromConfig(
                         systemUiContext, /* forBookMode */ true),
                 () -> readLetterboxVerticalReachabilityPositionFromConfig(
-                        systemUiContext, /* forTabletopMode */ true)));
+                        systemUiContext, /* forTabletopMode */ true)),
+                featureFags);
     }
 
     @VisibleForTesting
     LetterboxConfiguration(@NonNull final Context systemUiContext,
-            @NonNull final LetterboxConfigurationPersister letterboxConfigurationPersister) {
+            @NonNull final LetterboxConfigurationPersister letterboxConfigurationPersister,
+            @NonNull FeatureFlags featureFags) {
         mContext = systemUiContext;
-
+        mFeatureFlags = featureFags;
         mFixedOrientationLetterboxAspectRatio = mContext.getResources().getFloat(
                 R.dimen.config_fixedOrientationLetterboxAspectRatio);
         mLetterboxBackgroundType = readLetterboxBackgroundTypeFromConfig(mContext);
@@ -385,8 +385,6 @@
                         DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_SETTINGS,
                         mContext.getResources().getBoolean(
                                 R.bool.config_appCompatUserAppAspectRatioSettingsIsEnabled))
-                .addDeviceConfigEntry(KEY_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER,
-                        DEFAULT_VALUE_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER, /* enabled */ true)
                 .addDeviceConfigEntry(KEY_ENABLE_USER_ASPECT_RATIO_FULLSCREEN,
                         DEFAULT_VALUE_ENABLE_USER_ASPECT_RATIO_FULLSCREEN,
                         mContext.getResources().getBoolean(
@@ -544,8 +542,7 @@
     }
 
     /**
-     * Resets letterbox background type value depending on the
-     * {@link #KEY_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER} built time and runtime flags.
+     * Resets letterbox background type value depending on the built time and runtime flags.
      *
      * <p>If enabled, the letterbox background type value is set toZ
      * {@link #LETTERBOX_BACKGROUND_WALLPAPER}. When disabled the letterbox background type value
@@ -555,12 +552,11 @@
         mLetterboxBackgroundTypeOverride = LETTERBOX_BACKGROUND_OVERRIDE_UNSET;
     }
 
-    // Returns KEY_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER if the DeviceConfig flag is enabled
-    // or the value in com.android.internal.R.integer.config_letterboxBackgroundType if the flag
-    // is disabled.
+    // Returns LETTERBOX_BACKGROUND_WALLPAPER if the flag is enabled or the value in
+    // com.android.internal.R.integer.config_letterboxBackgroundType if the flag is disabled.
     @LetterboxBackgroundType
     private int getDefaultLetterboxBackgroundType() {
-        return mDeviceConfig.getFlagValue(KEY_ENABLE_LETTERBOX_BACKGROUND_WALLPAPER)
+        return mFeatureFlags.letterboxBackgroundWallpaperFlag()
                 ? LETTERBOX_BACKGROUND_WALLPAPER : mLetterboxBackgroundType;
     }
 
diff --git a/services/core/java/com/android/server/wm/OWNERS b/services/core/java/com/android/server/wm/OWNERS
index 26abe51..458786f 100644
--- a/services/core/java/com/android/server/wm/OWNERS
+++ b/services/core/java/com/android/server/wm/OWNERS
@@ -18,4 +18,4 @@
 yunfanc@google.com
 
 per-file BackgroundActivityStartController.java = set noparent
-per-file BackgroundActivityStartController.java = brufino@google.com, ogunwale@google.com, louischang@google.com, lus@google.com
+per-file BackgroundActivityStartController.java = brufino@google.com, ogunwale@google.com, louischang@google.com, lus@google.com
\ No newline at end of file
diff --git a/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java b/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
index 073bbbb..aa04aec 100644
--- a/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
+++ b/services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java
@@ -30,7 +30,7 @@
  */
 class PendingRemoteAnimationRegistry {
 
-    private static final long TIMEOUT_MS = 3000;
+    static final long TIMEOUT_MS = 3000;
 
     private final ArrayMap<String, Entry> mEntries = new ArrayMap<>();
     private final Handler mHandler;
diff --git a/services/core/java/com/android/server/wm/SafeActivityOptions.java b/services/core/java/com/android/server/wm/SafeActivityOptions.java
index fe3094e..6418148 100644
--- a/services/core/java/com/android/server/wm/SafeActivityOptions.java
+++ b/services/core/java/com/android/server/wm/SafeActivityOptions.java
@@ -148,7 +148,8 @@
                 .setPendingIntentBackgroundActivityStartMode(
                         options.getPendingIntentBackgroundActivityStartMode())
                 .setPendingIntentCreatorBackgroundActivityStartMode(
-                        options.getPendingIntentCreatorBackgroundActivityStartMode());
+                        options.getPendingIntentCreatorBackgroundActivityStartMode())
+                .setRemoteTransition(options.getRemoteTransition());
     }
 
     /**
diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java
index 1845ae8..0674ec1 100644
--- a/services/core/java/com/android/server/wm/Session.java
+++ b/services/core/java/com/android/server/wm/Session.java
@@ -23,6 +23,7 @@
 import static android.Manifest.permission.SET_UNRESTRICTED_GESTURE_EXCLUSION;
 import static android.Manifest.permission.SET_UNRESTRICTED_KEEP_CLEAR_AREAS;
 import static android.Manifest.permission.START_TASKS_FROM_RECENTS;
+import static android.Manifest.permission.STATUS_BAR_SERVICE;
 import static android.Manifest.permission.SYSTEM_APPLICATION_OVERLAY;
 import static android.app.ActivityTaskManager.INVALID_TASK_ID;
 import static android.content.ClipDescription.MIMETYPE_APPLICATION_ACTIVITY;
@@ -108,6 +109,7 @@
     private final ArraySet<WindowSurfaceController> mAlertWindowSurfaces = new ArraySet<>();
     private final DragDropController mDragDropController;
     final boolean mCanAddInternalSystemWindow;
+    boolean mCanForceShowingInsets;
     private final boolean mCanStartTasksFromRecents;
 
     final boolean mCanCreateSystemApplicationOverlay;
@@ -131,6 +133,9 @@
         mLastReportedAnimatorScale = service.getCurrentAnimatorScale();
         mCanAddInternalSystemWindow = service.mContext.checkCallingOrSelfPermission(
                 INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED;
+        mCanForceShowingInsets = service.mAtmService.isCallerRecents(mUid)
+                || service.mContext.checkCallingOrSelfPermission(STATUS_BAR_SERVICE)
+                == PERMISSION_GRANTED;
         mCanHideNonSystemOverlayWindows = service.mContext.checkCallingOrSelfPermission(
                 HIDE_NON_SYSTEM_OVERLAY_WINDOWS) == PERMISSION_GRANTED
                 || service.mContext.checkCallingOrSelfPermission(HIDE_OVERLAY_WINDOWS)
diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java
index 6dc896a..57f44cb 100644
--- a/services/core/java/com/android/server/wm/TaskFragment.java
+++ b/services/core/java/com/android/server/wm/TaskFragment.java
@@ -1466,13 +1466,13 @@
                         if (DEBUG_RESULTS) {
                             Slog.v(TAG_RESULTS, "Delivering results to " + next + ": " + a);
                         }
-                        transaction.addCallback(ActivityResultItem.obtain(a));
+                        transaction.addCallback(ActivityResultItem.obtain(next.token, a));
                     }
                 }
 
                 if (next.newIntents != null) {
                     transaction.addCallback(
-                            NewIntentItem.obtain(next.newIntents, true /* resume */));
+                            NewIntentItem.obtain(next.token, next.newIntents, true /* resume */));
                 }
 
                 // Well the app will no longer be stopped.
@@ -1486,7 +1486,7 @@
                 next.app.setPendingUiCleanAndForceProcessStateUpTo(mAtmService.mTopProcessState);
                 next.abortAndClearOptionsAnimation();
                 transaction.setLifecycleStateRequest(
-                        ResumeActivityItem.obtain(next.app.getReportedProcState(),
+                        ResumeActivityItem.obtain(next.token, next.app.getReportedProcState(),
                                 dc.isNextTransitionForward(), next.shouldSendCompatFakeFocus()));
                 mAtmService.getLifecycleManager().scheduleTransaction(transaction);
 
@@ -1726,7 +1726,7 @@
                     prev.shortComponentName, "userLeaving=" + userLeaving, reason);
 
             mAtmService.getLifecycleManager().scheduleTransaction(prev.app.getThread(),
-                    prev.token, PauseActivityItem.obtain(prev.finishing, userLeaving,
+                    prev.token, PauseActivityItem.obtain(prev.token, prev.finishing, userLeaving,
                             prev.configChangeFlags, pauseImmediately, autoEnteringPip));
         } catch (Exception e) {
             // Ignore exception, if process died other code will cleanup.
diff --git a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
index a27cc3a..ea722b6 100644
--- a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
+++ b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
@@ -184,14 +184,31 @@
         }
 
         void dispose() {
+            boolean wasVisible = false;
             for (int i = mOrganizedTaskFragments.size() - 1; i >= 0; i--) {
+                final TaskFragment taskFragment = mOrganizedTaskFragments.get(i);
+                if (taskFragment.isVisibleRequested()) {
+                    wasVisible = true;
+                }
                 // Cleanup the TaskFragmentOrganizer from all TaskFragments it organized before
                 // removing the windows to prevent it from adding any additional TaskFragment
                 // pending event.
-                final TaskFragment taskFragment = mOrganizedTaskFragments.get(i);
                 taskFragment.onTaskFragmentOrganizerRemoved();
             }
 
+            final TransitionController transitionController = mAtmService.getTransitionController();
+            if (wasVisible && transitionController.isShellTransitionsEnabled()
+                    && !transitionController.isCollecting()) {
+                final Task task = mOrganizedTaskFragments.get(0).getTask();
+                final boolean containsNonEmbeddedActivity =
+                        task != null && task.getActivity(a -> !a.isEmbedded()) != null;
+                transitionController.requestStartTransition(
+                        transitionController.createTransition(WindowManager.TRANSIT_CLOSE),
+                        // The task will be removed if all its activities are embedded, then the
+                        // task is the trigger.
+                        containsNonEmbeddedActivity ? null : task,
+                        null /* remoteTransition */, null /* displayChange */);
+            }
             // Defer to avoid unnecessary layout when there are multiple TaskFragments removal.
             mAtmService.deferWindowLayout();
             try {
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index a6c6491..843e6d1 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -1487,6 +1487,11 @@
             return;
         }
 
+        if (mState != STATE_STARTED) {
+            Slog.e(TAG, "Playing a Transition which hasn't started! #" + mSyncId + " This will "
+                    + "likely cause an exception in Shell");
+        }
+
         mState = STATE_PLAYING;
         mStartTransaction = transaction;
         mFinishTransaction = mController.mAtm.mWindowManager.mTransactionFactory.get();
diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java
index e4b9571..0d78701 100644
--- a/services/core/java/com/android/server/wm/TransitionController.java
+++ b/services/core/java/com/android/server/wm/TransitionController.java
@@ -1147,7 +1147,7 @@
             Transition.asyncTraceBegin("animating", 0x41bfaf1 /* hashcode of TAG */);
         } else if (!animatingState && mAnimatingState) {
             t.setEarlyWakeupEnd();
-            mAtm.mWindowManager.requestTraversal();
+            mAtm.mWindowManager.scheduleAnimationLocked();
             mSnapshotController.setPause(false);
             mAnimatingState = false;
             Transition.asyncTraceEnd(0x41bfaf1 /* hashcode of TAG */);
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 439b719..e720446 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -97,7 +97,6 @@
 import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_MISSING_WINDOW;
 import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN;
 import static android.window.WindowProviderService.isWindowProviderService;
-
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ADD_REMOVE;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ANIM;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_BOOT;
@@ -334,6 +333,7 @@
 import com.android.server.policy.WindowManagerPolicy.ScreenOffListener;
 import com.android.server.power.ShutdownThread;
 import com.android.server.utils.PriorityDump;
+import com.android.window.flags.FeatureFlagsImpl;
 
 import dalvik.annotation.optimization.NeverCompile;
 
@@ -1175,7 +1175,8 @@
 
         mLetterboxConfiguration = new LetterboxConfiguration(
                 // Using SysUI context to have access to Material colors extracted from Wallpaper.
-                ActivityThread.currentActivityThread().getSystemUiContext());
+                ActivityThread.currentActivityThread().getSystemUiContext(),
+                new FeatureFlagsImpl());
 
         mInputManager = inputManager; // Must be before createDisplayContentLocked.
         mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
@@ -8868,11 +8869,6 @@
             h.inputConfig |= InputConfig.NOT_FOCUSABLE;
         }
 
-        //  Check private trusted overlay flag to set trustedOverlay field of input window handle.
-        if ((privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0) {
-            h.inputConfig |= InputConfig.TRUSTED_OVERLAY;
-        }
-
         h.dispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
         h.ownerUid = callingUid;
         h.ownerPid = callingPid;
@@ -8892,6 +8888,8 @@
         }
 
         final SurfaceControl.Transaction t = mTransactionFactory.get();
+        //  Check private trusted overlay flag to set trustedOverlay field of input window handle.
+        h.setTrustedOverlay(t, surface, (privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0);
         t.setInputWindowInfo(surface, h);
         t.apply();
         t.close();
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index b12cc0b..822082b 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -28,6 +28,7 @@
 import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
 import static android.os.PowerManager.DRAW_WAKE_LOCK;
 import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
+import static android.view.InputWindowHandle.USE_SURFACE_TRUSTED_OVERLAY;
 import static android.view.SurfaceControl.Transaction;
 import static android.view.SurfaceControl.getGlobalTransaction;
 import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT;
@@ -98,7 +99,6 @@
 import static android.view.WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME;
 import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_MULTIPLIER;
 import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_OFFSET;
-
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ADD_REMOVE;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ANIM;
 import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS;
@@ -1112,7 +1112,9 @@
         mInputWindowHandle.setName(getName());
         mInputWindowHandle.setPackageName(mAttrs.packageName);
         mInputWindowHandle.setLayoutParamsType(mAttrs.type);
-        mInputWindowHandle.setTrustedOverlay(shouldWindowHandleBeTrusted(s));
+        if (!USE_SURFACE_TRUSTED_OVERLAY) {
+            mInputWindowHandle.setTrustedOverlay(isWindowTrustedOverlay());
+        }
         if (DEBUG) {
             Slog.v(TAG, "Window " + this + " client=" + c.asBinder()
                             + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a);
@@ -1193,12 +1195,12 @@
                 : service.mAtmService.getProcessController(s.mPid, s.mUid);
     }
 
-    boolean shouldWindowHandleBeTrusted(Session s) {
+    private boolean isWindowTrustedOverlay() {
         return InputMonitor.isTrustedOverlay(mAttrs.type)
                 || ((mAttrs.privateFlags & PRIVATE_FLAG_TRUSTED_OVERLAY) != 0
-                        && s.mCanAddInternalSystemWindow)
+                        && mSession.mCanAddInternalSystemWindow)
                 || ((mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_APPLICATION_OVERLAY) != 0
-                        && s.mCanCreateSystemApplicationOverlay);
+                        && mSession.mCanCreateSystemApplicationOverlay);
     }
 
     int getTouchOcclusionMode() {
@@ -5192,6 +5194,9 @@
             updateFrameRateSelectionPriorityIfNeeded();
             updateScaleIfNeeded();
             mWinAnimator.prepareSurfaceLocked(getSyncTransaction());
+            if (USE_SURFACE_TRUSTED_OVERLAY) {
+                getSyncTransaction().setTrustedOverlay(mSurfaceControl, isWindowTrustedOverlay());
+            }
         }
         super.prepareSurfaces();
     }
@@ -5944,7 +5949,13 @@
     }
 
     boolean isTrustedOverlay() {
-        return mInputWindowHandle.isTrustedOverlay();
+        if (USE_SURFACE_TRUSTED_OVERLAY) {
+            WindowState parentWindow = getParentWindow();
+            return isWindowTrustedOverlay() || (parentWindow != null
+                    && parentWindow.isWindowTrustedOverlay());
+        } else {
+            return mInputWindowHandle.isTrustedOverlay();
+        }
     }
 
     public boolean receiveFocusFromTapOutside() {
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index 55deb22..176bc283 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -42,6 +42,7 @@
 #include <android_view_VerifiedMotionEvent.h>
 #include <batteryservice/include/batteryservice/BatteryServiceConstants.h>
 #include <binder/IServiceManager.h>
+#include <com_android_input_flags.h>
 #include <input/Input.h>
 #include <input/PointerController.h>
 #include <input/SpriteController.h>
@@ -81,6 +82,8 @@
 static constexpr std::chrono::milliseconds MAX_VIBRATE_PATTERN_DELAY_MILLIS =
         std::chrono::duration_cast<std::chrono::milliseconds>(MAX_VIBRATE_PATTERN_DELAY);
 
+namespace input_flags = com::android::input::flags;
+
 namespace android {
 
 // The exponent used to calculate the pointer speed scaling factor.
@@ -733,7 +736,7 @@
         ensureSpriteControllerLocked();
 
         static const bool ENABLE_POINTER_CHOREOGRAPHER =
-                sysprop::InputProperties::enable_pointer_choreographer().value_or(false);
+                input_flags::enable_pointer_choreographer();
 
         // Disable the functionality of the legacy PointerController if PointerChoreographer is
         // enabled.
diff --git a/services/devicepolicy/Android.bp b/services/devicepolicy/Android.bp
index d4d17ec..41706f0 100644
--- a/services/devicepolicy/Android.bp
+++ b/services/devicepolicy/Android.bp
@@ -24,4 +24,7 @@
         "app-compat-annotations",
         "service-permission.stubs.system_server",
     ],
+    static_libs: [
+        "device_policy_aconfig_flags_lib",
+    ],
 }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
index 9c1d765..21b1291 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java
@@ -624,6 +624,27 @@
     }
 
     /**
+     * Retrieves the global policy set by the admin for the provided {@code policyDefinition}
+     * if one was set, otherwise returns {@code null}.
+     */
+    @Nullable
+    <V> V getGlobalPolicySetByAdmin(
+            @NonNull PolicyDefinition<V> policyDefinition,
+            @NonNull EnforcingAdmin enforcingAdmin) {
+        Objects.requireNonNull(policyDefinition);
+        Objects.requireNonNull(enforcingAdmin);
+
+        synchronized (mLock) {
+            if (!hasGlobalPolicyLocked(policyDefinition)) {
+                return null;
+            }
+            PolicyValue<V> value = getGlobalPolicyStateLocked(policyDefinition)
+                    .getPoliciesSetByAdmins().get(enforcingAdmin);
+            return value == null ? null : value.getValue();
+        }
+    }
+
+    /**
      * Retrieves the values set for the provided {@code policyDefinition} by each admin.
      */
     @NonNull
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 438a9d6..50dc061 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -491,6 +491,7 @@
 import com.android.server.SystemService;
 import com.android.server.SystemServiceManager;
 import com.android.server.devicepolicy.ActiveAdmin.TrustAgentInfo;
+import com.android.server.devicepolicy.flags.FlagUtils;
 import com.android.server.inputmethod.InputMethodManagerInternal;
 import com.android.server.net.NetworkPolicyManagerInternal;
 import com.android.server.pm.DefaultCrossProfileIntentFilter;
@@ -3432,6 +3433,9 @@
             }
 
             revertTransferOwnershipIfNecessaryLocked();
+            if (!FlagUtils.isPolicyEngineMigrationV2Enabled()) {
+                updateUsbDataSignal(mContext, isUsbDataSignalingEnabledInternalLocked());
+            }
         }
 
         // In case flag value has changed, we apply it during boot to avoid doing it concurrently
@@ -9121,9 +9125,15 @@
                         UserManager.DISALLOW_CAMERA);
         if (who != null) {
             EnforcingAdmin admin = getEnforcingAdminForCaller(who, callerPackageName);
-            return Boolean.TRUE.equals(
-                    mDevicePolicyEngine.getLocalPolicySetByAdmin(
-                            policy, admin, affectedUserId));
+            Boolean value = null;
+            if (isDeviceOwner(caller)) {
+                value = mDevicePolicyEngine.getGlobalPolicySetByAdmin(policy, admin);
+            } else {
+                value = mDevicePolicyEngine.getLocalPolicySetByAdmin(
+                        policy, admin, affectedUserId);
+            }
+            return Boolean.TRUE.equals(value);
+
         } else {
             return Boolean.TRUE.equals(
                     mDevicePolicyEngine.getResolvedPolicy(policy, affectedUserId));
@@ -21575,17 +21585,35 @@
         Objects.requireNonNull(packageName, "Admin package name must be provided");
         final CallerIdentity caller = getCallerIdentity(packageName);
 
-        synchronized (getLockObject()) {
-            EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin(
-                    /* admin= */ null, MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING,
-                    caller.getPackageName(),
-                    caller.getUserId());
+        if (!FlagUtils.isPolicyEngineMigrationV2Enabled()) {
+            Preconditions.checkCallAuthorization(
+                    isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller),
+                    "USB data signaling can only be controlled by a device owner or "
+                            + "a profile owner on an organization-owned device.");
             Preconditions.checkState(canUsbDataSignalingBeDisabled(),
                     "USB data signaling cannot be disabled.");
-            mDevicePolicyEngine.setGlobalPolicy(
-                    PolicyDefinition.USB_DATA_SIGNALING,
-                    enforcingAdmin,
-                    new BooleanPolicyValue(enabled));
+        }
+
+        synchronized (getLockObject()) {
+            if (FlagUtils.isPolicyEngineMigrationV2Enabled()) {
+                EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin(
+                        /* admin= */ null, MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING,
+                        caller.getPackageName(),
+                        caller.getUserId());
+                Preconditions.checkState(canUsbDataSignalingBeDisabled(),
+                        "USB data signaling cannot be disabled.");
+                mDevicePolicyEngine.setGlobalPolicy(
+                        PolicyDefinition.USB_DATA_SIGNALING,
+                        enforcingAdmin,
+                        new BooleanPolicyValue(enabled));
+            } else {
+                ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
+                if (admin.mUsbDataSignalingEnabled != enabled) {
+                    admin.mUsbDataSignalingEnabled = enabled;
+                    saveSettingsLocked(caller.getUserId());
+                    updateUsbDataSignal(mContext, isUsbDataSignalingEnabledInternalLocked());
+                }
+            }
         }
         DevicePolicyEventLogger
                 .createEvent(DevicePolicyEnums.SET_USB_DATA_SIGNALING)
@@ -21607,10 +21635,24 @@
     @Override
     public boolean isUsbDataSignalingEnabled(String packageName) {
         final CallerIdentity caller = getCallerIdentity(packageName);
-        Boolean enabled = mDevicePolicyEngine.getResolvedPolicy(
-                PolicyDefinition.USB_DATA_SIGNALING,
-                caller.getUserId());
-        return enabled == null || enabled;
+        if (FlagUtils.isPolicyEngineMigrationV2Enabled()) {
+            Boolean enabled = mDevicePolicyEngine.getResolvedPolicy(
+                    PolicyDefinition.USB_DATA_SIGNALING,
+                    caller.getUserId());
+            return enabled == null || enabled;
+        } else {
+            synchronized (getLockObject()) {
+                // If the caller is an admin, return the policy set by itself. Otherwise
+                // return the device-wide policy.
+                if (isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(
+                        caller)) {
+                    return getProfileOwnerOrDeviceOwnerLocked(
+                            caller.getUserId()).mUsbDataSignalingEnabled;
+                } else {
+                    return isUsbDataSignalingEnabledInternalLocked();
+                }
+            }
+        }
     }
 
     private boolean isUsbDataSignalingEnabledInternalLocked() {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/PolicyState.java b/services/devicepolicy/java/com/android/server/devicepolicy/PolicyState.java
index 599c4a7..22464d5 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/PolicyState.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/PolicyState.java
@@ -260,11 +260,14 @@
                                 break;
                         }
                     }
-                    if (admin != null) {
+                    if (admin != null && value != null) {
                         policiesSetByAdmins.put(admin, value);
                     } else {
-                        Slogf.wtf(TAG, "Error Parsing TAG_ADMIN_POLICY_ENTRY, EnforcingAdmin "
-                                + "is null");
+                        Slogf.wtf(TAG, "Error Parsing TAG_ADMIN_POLICY_ENTRY for "
+                                + (policyDefinition == null ? "unknown policy" : "policy with "
+                                + "definition " + policyDefinition) + ", EnforcingAdmin is: "
+                                + (admin == null ? "null" : admin) + ", value is : "
+                                + (value == null ? "null" : value));
                     }
                     break;
                 case TAG_POLICY_DEFINITION_ENTRY:
@@ -283,7 +286,9 @@
                     }
                     currentResolvedPolicy = policyDefinition.readPolicyValueFromXml(parser);
                     if (currentResolvedPolicy == null) {
-                        Slogf.wtf(TAG, "Error Parsing TAG_RESOLVED_VALUE_ENTRY, "
+                        Slogf.wtf(TAG, "Error Parsing TAG_RESOLVED_VALUE_ENTRY for "
+                                + (policyDefinition == null ? "unknown policy" : "policy with "
+                                + "definition " + policyDefinition) + ", "
                                 + "currentResolvedPolicy is null");
                     }
                     break;
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/flags/Android.bp b/services/devicepolicy/java/com/android/server/devicepolicy/flags/Android.bp
new file mode 100644
index 0000000..1a45782
--- /dev/null
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/flags/Android.bp
@@ -0,0 +1,16 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aconfig_declarations {
+    name: "device_policy_aconfig_flags",
+    package: "com.android.server.devicepolicy.flags",
+    srcs: [
+        "flags.aconfig",
+    ],
+}
+
+java_aconfig_library {
+    name: "device_policy_aconfig_flags_lib",
+    aconfig_declarations: "device_policy_aconfig_flags",
+}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/flags/FlagUtils.java b/services/devicepolicy/java/com/android/server/devicepolicy/flags/FlagUtils.java
new file mode 100644
index 0000000..9fe3749
--- /dev/null
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/flags/FlagUtils.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.flags;
+
+import static com.android.server.devicepolicy.flags.Flags.policyEngineMigrationV2Enabled;
+
+import android.os.Binder;
+
+public final class FlagUtils {
+    private FlagUtils(){}
+
+    public static boolean isPolicyEngineMigrationV2Enabled() {
+        return Binder.withCleanCallingIdentity(() -> {
+            return policyEngineMigrationV2Enabled();
+        });
+    }
+}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig b/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig
new file mode 100644
index 0000000..00702a9
--- /dev/null
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/flags/flags.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.server.devicepolicy.flags"
+
+flag {
+  name: "policy_engine_migration_v2_enabled"
+  namespace: "enterprise"
+  description: "V2 of the policy engine migrations for Android V"
+  bug: "289520697"
+}
\ No newline at end of file
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
index e87a34e..798e1ae 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodBindingControllerTest.java
@@ -158,7 +158,7 @@
         assertThat(result.result).isEqualTo(InputBindResult.ResultCode.SUCCESS_WAITING_IME_BINDING);
         assertThat(result.id).isEqualTo(info.getId());
         synchronized (ImfLock.class) {
-            assertThat(mBindingController.hasConnection()).isTrue();
+            assertThat(mBindingController.hasMainConnection()).isTrue();
             assertThat(mBindingController.getCurId()).isEqualTo(info.getId());
             assertThat(mBindingController.getCurToken()).isNotNull();
         }
@@ -202,7 +202,7 @@
 
         synchronized (ImfLock.class) {
             // Unbind both main connection and visible connection
-            assertThat(mBindingController.hasConnection()).isFalse();
+            assertThat(mBindingController.hasMainConnection()).isFalse();
             assertThat(mBindingController.isVisibleBound()).isFalse();
             verify(mContext, times(2)).unbindService(any(ServiceConnection.class));
             assertThat(mBindingController.getCurToken()).isNull();
diff --git a/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java b/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
index dc2fbfc..2889c74 100644
--- a/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
+++ b/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
@@ -24,9 +24,7 @@
 import static android.content.pm.SuspendDialogInfo.BUTTON_ACTION_UNSUSPEND;
 import static android.content.pm.parsing.FrameworkParsingPackageUtils.parsePublicKey;
 import static android.content.res.Resources.ID_NULL;
-
 import static com.android.server.pm.PackageManagerService.WRITE_USER_PACKAGE_RESTRICTIONS;
-
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.not;
@@ -997,7 +995,7 @@
                 null /*usesStaticLibrariesVersions*/,
                 null /*mimeGroups*/,
                 UUID.randomUUID());
-        origPkgSetting01.setUserState(0, 100, 1, true, false, false, false, 0, null, false,
+        origPkgSetting01.setUserState(0, 100, 100, 1, true, false, false, false, 0, null, false,
                 false, "lastDisabledCaller", new ArraySet<>(new String[]{"enabledComponent1"}),
                 new ArraySet<>(new String[]{"disabledComponent1"}), 0, 0, "harmfulAppWarning",
                 "splashScreenTheme", 1000L, PackageManager.USER_MIN_ASPECT_RATIO_UNSET, null);
diff --git a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
index 3ef3a89..3ab2547 100644
--- a/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
+++ b/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/AppIdPermissionPolicyTest.kt
@@ -16,12 +16,14 @@
 
 package com.android.server.permission.test
 
+import android.Manifest
 import android.content.pm.PackageManager
 import android.content.pm.PermissionGroupInfo
 import android.content.pm.PermissionInfo
+import android.content.pm.SigningDetails
+import android.os.Build
 import android.os.Bundle
 import android.util.ArrayMap
-import android.util.ArraySet
 import android.util.SparseArray
 import androidx.test.ext.junit.runners.AndroidJUnit4
 import com.android.modules.utils.testing.ExtendedMockitoRule
@@ -33,12 +35,15 @@
 import com.android.server.permission.access.permission.AppIdPermissionPolicy
 import com.android.server.permission.access.permission.Permission
 import com.android.server.permission.access.permission.PermissionFlags
+import com.android.server.permission.access.util.hasBits
 import com.android.server.pm.parsing.PackageInfoUtils
+import com.android.server.pm.permission.PermissionAllowlist
 import com.android.server.pm.pkg.AndroidPackage
 import com.android.server.pm.pkg.PackageState
 import com.android.server.pm.pkg.PackageUserState
 import com.android.server.pm.pkg.component.ParsedPermission
 import com.android.server.pm.pkg.component.ParsedPermissionGroup
+import com.android.server.testutils.any
 import com.android.server.testutils.mock
 import com.android.server.testutils.whenever
 import com.google.common.truth.Truth.assertWithMessage
@@ -46,6 +51,7 @@
 import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.anyLong
 
 /**
  * Mocking unit test for AppIdPermissionPolicy.
@@ -55,11 +61,16 @@
     private lateinit var oldState: MutableAccessState
     private lateinit var newState: MutableAccessState
 
-    private lateinit var androidPackage0: AndroidPackage
-    private lateinit var androidPackage1: AndroidPackage
-
-    private lateinit var packageState0: PackageState
-    private lateinit var packageState1: PackageState
+    private val defaultPermissionGroup = mockParsedPermissionGroup(
+        PERMISSION_GROUP_NAME_0,
+        PACKAGE_NAME_0
+    )
+    private val defaultPermissionTree = mockParsedPermission(
+        PERMISSION_TREE_NAME,
+        PACKAGE_NAME_0,
+        isTree = true
+    )
+    private val defaultPermission = mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_0)
 
     private val appIdPermissionPolicy = AppIdPermissionPolicy()
 
@@ -70,160 +81,124 @@
         .build()
 
     @Before
-    fun init() {
+    fun setUp() {
         oldState = MutableAccessState()
         createUserState(USER_ID_0)
-        createUserState(USER_ID_1)
         oldState.mutateExternalState().setPackageStates(ArrayMap())
-
-        androidPackage0 = mockAndroidPackage(
-            PACKAGE_NAME_0,
-            PERMISSION_GROUP_NAME_0,
-            PERMISSION_NAME_0
-        )
-        androidPackage1 = mockAndroidPackage(
-            PACKAGE_NAME_1,
-            PERMISSION_GROUP_NAME_1,
-            PERMISSION_NAME_1
-        )
-
-        packageState0 = mockPackageState(APP_ID_0, androidPackage0)
-        packageState1 = mockPackageState(APP_ID_1, androidPackage1)
-    }
-
-    private fun mockAndroidPackage(
-        packageName: String,
-        permissionGroupName: String,
-        permissionName: String,
-    ): AndroidPackage {
-        val parsedPermissionGroup = mock<ParsedPermissionGroup> {
-            whenever(name).thenReturn(permissionGroupName)
-            whenever(metaData).thenReturn(Bundle())
-        }
-
-        @Suppress("DEPRECATION")
-        val permissionGroupInfo = PermissionGroupInfo().apply {
-            name = permissionGroupName
-            this.packageName = packageName
-        }
-        wheneverStatic {
-            PackageInfoUtils.generatePermissionGroupInfo(
-                parsedPermissionGroup,
-                PackageManager.GET_META_DATA.toLong()
-            )
-        }.thenReturn(permissionGroupInfo)
-
-        val parsedPermission = mock<ParsedPermission> {
-            whenever(name).thenReturn(permissionName)
-            whenever(isTree).thenReturn(false)
-            whenever(metaData).thenReturn(Bundle())
-        }
-
-        @Suppress("DEPRECATION")
-        val permissionInfo = PermissionInfo().apply {
-            name = permissionName
-            this.packageName = packageName
-        }
-        wheneverStatic {
-            PackageInfoUtils.generatePermissionInfo(
-                parsedPermission,
-                PackageManager.GET_META_DATA.toLong()
-            )
-        }.thenReturn(permissionInfo)
-
-        val requestedPermissions = ArraySet<String>()
-        return mock {
-            whenever(this.packageName).thenReturn(packageName)
-            whenever(this.requestedPermissions).thenReturn(requestedPermissions)
-            whenever(permissionGroups).thenReturn(listOf(parsedPermissionGroup))
-            whenever(permissions).thenReturn(listOf(parsedPermission))
-            whenever(signingDetails).thenReturn(mock {})
-        }
-    }
-
-    private fun mockPackageState(
-        appId: Int,
-        androidPackage: AndroidPackage,
-    ): PackageState {
-        val packageName = androidPackage.packageName
-        oldState.mutateExternalState().mutateAppIdPackageNames().mutateOrPut(appId) {
-            MutableIndexedListSet()
-        }.add(packageName)
-
-        val userStates = SparseArray<PackageUserState>().apply {
-            put(USER_ID_0, mock { whenever(isInstantApp).thenReturn(false) })
-        }
-        val mockPackageState: PackageState = mock {
-            whenever(this.packageName).thenReturn(packageName)
-            whenever(this.appId).thenReturn(appId)
-            whenever(this.androidPackage).thenReturn(androidPackage)
-            whenever(isSystem).thenReturn(false)
-            whenever(this.userStates).thenReturn(userStates)
-        }
-        oldState.mutateExternalState().setPackageStates(
-            oldState.mutateExternalState().packageStates.toMutableMap().apply {
-                put(packageName, mockPackageState)
-            }
-        )
-        return mockPackageState
+        oldState.mutateExternalState().setDisabledSystemPackageStates(ArrayMap())
+        mockPackageInfoUtilsGeneratePermissionInfo()
+        mockPackageInfoUtilsGeneratePermissionGroupInfo()
     }
 
     private fun createUserState(userId: Int) {
+        oldState.mutateExternalState().mutateUserIds().add(userId)
         oldState.mutateUserStatesNoWrite().put(userId, MutableUserState())
     }
 
+    private fun mockPackageInfoUtilsGeneratePermissionInfo() {
+        wheneverStatic {
+            PackageInfoUtils.generatePermissionInfo(any(ParsedPermission::class.java), anyLong())
+        }.thenAnswer { invocation ->
+            val parsedPermission = invocation.getArgument<ParsedPermission>(0)
+            val generateFlags = invocation.getArgument<Long>(1)
+            PermissionInfo(parsedPermission.backgroundPermission).apply {
+                name = parsedPermission.name
+                packageName = parsedPermission.packageName
+                metaData = if (generateFlags.toInt().hasBits(PackageManager.GET_META_DATA)) {
+                    parsedPermission.metaData
+                } else {
+                    null
+                }
+                @Suppress("DEPRECATION")
+                protectionLevel = parsedPermission.protectionLevel
+                group = parsedPermission.group
+                flags = parsedPermission.flags
+            }
+        }
+    }
+
+    private fun mockPackageInfoUtilsGeneratePermissionGroupInfo() {
+        wheneverStatic {
+            PackageInfoUtils.generatePermissionGroupInfo(
+                any(ParsedPermissionGroup::class.java),
+                anyLong()
+            )
+        }.thenAnswer { invocation ->
+            val parsedPermissionGroup = invocation.getArgument<ParsedPermissionGroup>(0)
+            val generateFlags = invocation.getArgument<Long>(1)
+            @Suppress("DEPRECATION")
+            PermissionGroupInfo().apply {
+                name = parsedPermissionGroup.name
+                packageName = parsedPermissionGroup.packageName
+                metaData = if (generateFlags.toInt().hasBits(PackageManager.GET_META_DATA)) {
+                    parsedPermissionGroup.metaData
+                } else {
+                    null
+                }
+                flags = parsedPermissionGroup.flags
+            }
+        }
+    }
+
     @Test
     fun testResetRuntimePermissions_runtimeGranted_getsRevoked() {
         val oldFlags = PermissionFlags.RUNTIME_GRANTED
         val expectedNewFlags = 0
-        testResetRuntimePermissions(oldFlags, expectedNewFlags) {}
+        testResetRuntimePermissions(oldFlags, expectedNewFlags)
     }
 
     @Test
     fun testResetRuntimePermissions_roleGranted_getsGranted() {
         val oldFlags = PermissionFlags.ROLE
         val expectedNewFlags = PermissionFlags.ROLE or PermissionFlags.RUNTIME_GRANTED
-        testResetRuntimePermissions(oldFlags, expectedNewFlags) {}
+        testResetRuntimePermissions(oldFlags, expectedNewFlags)
     }
 
     @Test
     fun testResetRuntimePermissions_nullAndroidPackage_remainsUnchanged() {
         val oldFlags = PermissionFlags.RUNTIME_GRANTED
         val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
-        testResetRuntimePermissions(oldFlags, expectedNewFlags) {
-            whenever(packageState0.androidPackage).thenReturn(null)
-        }
+        testResetRuntimePermissions(oldFlags, expectedNewFlags, isAndroidPackageMissing = true)
     }
 
-    private inline fun testResetRuntimePermissions(
+    private fun testResetRuntimePermissions(
         oldFlags: Int,
         expectedNewFlags: Int,
-        additionalSetup: () -> Unit
+        isAndroidPackageMissing: Boolean = false
     ) {
-        createSystemStatePermission(
-            APP_ID_0,
-            PACKAGE_NAME_0,
+        val parsedPermission = mockParsedPermission(
             PERMISSION_NAME_0,
-            PermissionInfo.PROTECTION_DANGEROUS
+            PACKAGE_NAME_0,
+            protectionLevel = PermissionInfo.PROTECTION_DANGEROUS,
         )
-        androidPackage0.requestedPermissions.add(PERMISSION_NAME_0)
-        oldState.mutateUserState(USER_ID_0)!!.mutateAppIdPermissionFlags().mutateOrPut(APP_ID_0) {
-            MutableIndexedMap()
-        }.put(PERMISSION_NAME_0, oldFlags)
-
-        additionalSetup()
+        val permissionOwnerPackageState = mockPackageState(
+            APP_ID_0,
+            mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(parsedPermission))
+        )
+        val requestingPackageState = if (isAndroidPackageMissing) {
+            mockPackageState(APP_ID_1, PACKAGE_NAME_1)
+        } else {
+            mockPackageState(
+                APP_ID_1,
+                mockAndroidPackage(PACKAGE_NAME_1, requestedPermissions = setOf(PERMISSION_NAME_0))
+            )
+        }
+        setPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0, oldFlags)
+        addPackageState(permissionOwnerPackageState)
+        addPackageState(requestingPackageState)
+        addPermission(parsedPermission)
 
         mutateState {
             with(appIdPermissionPolicy) {
-                resetRuntimePermissions(PACKAGE_NAME_0, USER_ID_0)
+                resetRuntimePermissions(PACKAGE_NAME_1, USER_ID_0)
             }
         }
 
-        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
         assertWithMessage(
             "After resetting runtime permissions, permission flags did not match" +
-            " expected values: expectedNewFlags is $expectedNewFlags," +
-            " actualFlags is $actualFlags, while the oldFlags is $oldFlags"
+                " expected values: expectedNewFlags is $expectedNewFlags," +
+                " actualFlags is $actualFlags, while the oldFlags is $oldFlags"
         )
             .that(actualFlags)
             .isEqualTo(expectedNewFlags)
@@ -231,285 +206,1499 @@
 
     @Test
     fun testOnPackageAdded_permissionsOfMissingSystemApp_getsAdopted() {
-        testOnPackageAdded {
-            adoptPermissionTestSetup()
-            whenever(packageState1.androidPackage).thenReturn(null)
-        }
+        testAdoptPermissions(hasMissingPackage = true, isSystem = true)
 
-        val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
         assertWithMessage(
             "After onPackageAdded() is called for a null adopt permission package," +
-            " the permission package name: ${permission0!!.packageName} did not match" +
-            " the expected package name: $PACKAGE_NAME_0"
+                " the permission package name: ${getPermission(PERMISSION_NAME_0)?.packageName}" +
+                " did not match the expected package name: $PACKAGE_NAME_0"
         )
-            .that(permission0.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_permissionsOfExistingSystemApp_notAdopted() {
-        testOnPackageAdded {
-            adoptPermissionTestSetup()
-        }
+        testAdoptPermissions(isSystem = true)
 
-        val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
         assertWithMessage(
             "After onPackageAdded() is called for a non-null adopt permission" +
-            " package, the permission package name: ${permission0!!.packageName} should" +
-            " not match the package name: $PACKAGE_NAME_0"
+                " package, the permission package name:" +
+                " ${getPermission(PERMISSION_NAME_0)?.packageName} should not match the" +
+                " package name: $PACKAGE_NAME_0"
         )
-            .that(permission0.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isNotEqualTo(PACKAGE_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_permissionsOfNonSystemApp_notAdopted() {
-        testOnPackageAdded {
-            adoptPermissionTestSetup()
-            whenever(packageState1.isSystem).thenReturn(false)
-        }
+        testAdoptPermissions(hasMissingPackage = true)
 
-        val permission0 = newState.systemState.permissions[PERMISSION_NAME_0]
         assertWithMessage(
             "After onPackageAdded() is called for a non-system adopt permission" +
-                " package, the permission package name: ${permission0!!.packageName} should" +
-                " not match the package name: $PACKAGE_NAME_0"
+                " package, the permission package name:" +
+                " ${getPermission(PERMISSION_NAME_0)?.packageName} should not match the" +
+                " package name: $PACKAGE_NAME_0"
         )
-            .that(permission0.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isNotEqualTo(PACKAGE_NAME_0)
     }
 
-    private fun adoptPermissionTestSetup() {
-        createSystemStatePermission(
-            APP_ID_1,
-            PACKAGE_NAME_1,
-            PERMISSION_NAME_0,
-            PermissionInfo.PROTECTION_SIGNATURE
-        )
-        whenever(androidPackage0.adoptPermissions).thenReturn(listOf(PACKAGE_NAME_1))
-        whenever(packageState1.isSystem).thenReturn(true)
+    private fun testAdoptPermissions(
+        hasMissingPackage: Boolean = false,
+        isSystem: Boolean = false
+    ) {
+        val parsedPermission = mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_1)
+        val packageToAdoptPermission = if (hasMissingPackage) {
+            mockPackageState(APP_ID_1, PACKAGE_NAME_1, isSystem = isSystem)
+        } else {
+            mockPackageState(
+                APP_ID_1,
+                mockAndroidPackage(
+                    PACKAGE_NAME_1,
+                    permissions = listOf(parsedPermission)
+                ),
+                isSystem = isSystem
+            )
+        }
+        addPackageState(packageToAdoptPermission)
+        addPermission(parsedPermission)
+
+        mutateState {
+            val installedPackage = mockPackageState(
+                APP_ID_0,
+                mockAndroidPackage(
+                    PACKAGE_NAME_0,
+                    permissions = listOf(defaultPermission),
+                    adoptPermissions = listOf(PACKAGE_NAME_1)
+                )
+            )
+            addPackageState(installedPackage, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(installedPackage)
+            }
+        }
     }
 
     @Test
     fun testOnPackageAdded_newPermissionGroup_getsDeclared() {
-        testOnPackageAdded {}
+        mutateState {
+            val packageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+            addPackageState(packageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(packageState)
+            }
+        }
 
         assertWithMessage(
             "After onPackageAdded() is called when there is no existing" +
-            " permission groups, the new permission group $PERMISSION_GROUP_NAME_0 is not added"
+                " permission groups, the new permission group $PERMISSION_GROUP_NAME_0 is not added"
         )
-            .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.name)
+            .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.name)
             .isEqualTo(PERMISSION_GROUP_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_systemAppTakingOverPermissionGroupDefinition_getsTakenOver() {
-        testOnPackageAdded {
-            whenever(packageState0.isSystem).thenReturn(true)
-            createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(newPermissionOwnerIsSystem = true)
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
-            " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the ownership" +
-            " of this permission group"
+                " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the" +
+                " ownership of this permission group"
         )
-            .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+            .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_instantApps_remainsUnchanged() {
-        testOnPackageAdded {
-            (packageState0.userStates as SparseArray<PackageUserState>).apply {
-                put(0, mock { whenever(isInstantApp).thenReturn(true) })
-            }
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(
+            newPermissionOwnerIsInstant = true,
+            permissionGroupAlreadyExists = false
+        )
 
         assertWithMessage(
             "After onPackageAdded() is called for an instant app," +
-            " the new permission group $PERMISSION_GROUP_NAME_0 should not be added"
+                " the new permission group $PERMISSION_GROUP_NAME_0 should not be added"
         )
-            .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0])
+            .that(getPermissionGroup(PERMISSION_GROUP_NAME_0))
             .isNull()
     }
 
     @Test
     fun testOnPackageAdded_nonSystemAppTakingOverPermissionGroupDefinition_remainsUnchanged() {
-        testOnPackageAdded {
-            createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions()
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
-            " exists in the system, non-system app $PACKAGE_NAME_0 shouldn't takeover ownership" +
-            " of this permission group"
+                " exists in the system, non-system app $PACKAGE_NAME_0 shouldn't takeover" +
+                " ownership of this permission group"
         )
-            .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+            .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_1)
     }
 
     @Test
     fun testOnPackageAdded_takingOverPermissionGroupDeclaredBySystemApp_remainsUnchanged() {
-        testOnPackageAdded {
-            whenever(packageState1.isSystem).thenReturn(true)
-            createSystemStatePermissionGroup(PACKAGE_NAME_1, PERMISSION_GROUP_NAME_0)
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(oldPermissionOwnerIsSystem = true)
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_GROUP_NAME_0 already" +
-            " exists in the system and is owned by a system app, app $PACKAGE_NAME_0 shouldn't" +
-            " takeover ownership of this permission group"
+                " exists in the system and is owned by a system app, app $PACKAGE_NAME_0" +
+                " shouldn't takeover ownership of this permission group"
         )
-            .that(newState.systemState.permissionGroups[PERMISSION_GROUP_NAME_0]?.packageName)
+            .that(getPermissionGroup(PERMISSION_GROUP_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_1)
     }
 
     @Test
     fun testOnPackageAdded_newPermission_getsDeclared() {
-        testOnPackageAdded {}
+        mutateState {
+            val packageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+            addPackageState(packageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(packageState)
+            }
+        }
 
         assertWithMessage(
             "After onPackageAdded() is called when there is no existing" +
-            " permissions, the new permission $PERMISSION_NAME_0 is not added"
+                " permissions, the new permission $PERMISSION_NAME_0 is not added"
         )
-            .that(newState.systemState.permissions[PERMISSION_NAME_0]?.name)
+            .that(getPermission(PERMISSION_NAME_0)?.name)
             .isEqualTo(PERMISSION_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_configPermission_getsTakenOver() {
-        testOnPackageAdded {
-            whenever(packageState0.isSystem).thenReturn(true)
-            createSystemStatePermission(
-                APP_ID_0,
-                PACKAGE_NAME_1,
-                PERMISSION_NAME_0,
-                PermissionInfo.PROTECTION_DANGEROUS,
-                Permission.TYPE_CONFIG,
-                false
-            )
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(
+            oldPermissionOwnerIsSystem = true,
+            newPermissionOwnerIsSystem = true,
+            type = Permission.TYPE_CONFIG,
+            isReconciled = false
+        )
 
         assertWithMessage(
             "After onPackageAdded() is called for a config permission with" +
-            " no owner, the ownership is not taken over by a system app $PACKAGE_NAME_0"
+                " no owner, the ownership is not taken over by a system app $PACKAGE_NAME_0"
         )
-            .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_systemAppTakingOverPermissionDefinition_getsTakenOver() {
-        testOnPackageAdded {
-            whenever(packageState0.isSystem).thenReturn(true)
-            createSystemStatePermission(
-                APP_ID_1,
-                PACKAGE_NAME_1,
-                PERMISSION_NAME_0,
-                PermissionInfo.PROTECTION_DANGEROUS
-            )
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(newPermissionOwnerIsSystem = true)
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
-            " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover the ownership" +
-            " of this permission"
+                " exists in the system, the system app $PACKAGE_NAME_0 didn't takeover ownership" +
+                " of this permission"
         )
-            .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_0)
     }
 
     @Test
     fun testOnPackageAdded_nonSystemAppTakingOverPermissionDefinition_remainsUnchanged() {
-        testOnPackageAdded {
-            createSystemStatePermission(
-                APP_ID_1,
-                PACKAGE_NAME_1,
-                PERMISSION_NAME_0,
-                PermissionInfo.PROTECTION_DANGEROUS
-            )
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions()
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
-            " exists in the system, the non-system app $PACKAGE_NAME_0 shouldn't takeover" +
-            " ownership of this permission"
+                " exists in the system, the non-system app $PACKAGE_NAME_0 shouldn't takeover" +
+                " ownership of this permission"
         )
-            .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_1)
     }
 
     @Test
     fun testOnPackageAdded_takingOverPermissionDeclaredBySystemApp_remainsUnchanged() {
-        testOnPackageAdded {
-            whenever(packageState1.isSystem).thenReturn(true)
-            createSystemStatePermission(
-                APP_ID_1,
-                PACKAGE_NAME_1,
-                PERMISSION_NAME_0,
-                PermissionInfo.PROTECTION_DANGEROUS
-            )
-        }
+        testTakingOverPermissionAndPermissionGroupDefinitions(oldPermissionOwnerIsSystem = true)
 
         assertWithMessage(
             "After onPackageAdded() is called when $PERMISSION_NAME_0 already" +
-            " exists in system and is owned by a system app, the app $PACKAGE_NAME_0 shouldn't" +
-            " takeover ownership of this permission"
+                " exists in system and is owned by a system app, the $PACKAGE_NAME_0 shouldn't" +
+                " takeover ownership of this permission"
         )
-            .that(newState.systemState.permissions[PERMISSION_NAME_0]?.packageName)
+            .that(getPermission(PERMISSION_NAME_0)?.packageName)
             .isEqualTo(PACKAGE_NAME_1)
     }
 
-    private inline fun testOnPackageAdded(mockBehaviorOverride: () -> Unit) {
-        mockBehaviorOverride()
+    private fun testTakingOverPermissionAndPermissionGroupDefinitions(
+        oldPermissionOwnerIsSystem: Boolean = false,
+        newPermissionOwnerIsSystem: Boolean = false,
+        newPermissionOwnerIsInstant: Boolean = false,
+        permissionGroupAlreadyExists: Boolean = true,
+        permissionAlreadyExists: Boolean = true,
+        type: Int = Permission.TYPE_MANIFEST,
+        isReconciled: Boolean = true,
+    ) {
+        val oldPermissionOwnerPackageState = mockPackageState(
+            APP_ID_1,
+            PACKAGE_NAME_1,
+            isSystem = oldPermissionOwnerIsSystem
+        )
+        addPackageState(oldPermissionOwnerPackageState)
+        if (permissionGroupAlreadyExists) {
+            addPermissionGroup(mockParsedPermissionGroup(PERMISSION_GROUP_NAME_0, PACKAGE_NAME_1))
+        }
+        if (permissionAlreadyExists) {
+            addPermission(
+                mockParsedPermission(PERMISSION_NAME_0, PACKAGE_NAME_1),
+                type = type,
+                isReconciled = isReconciled
+            )
+        }
 
         mutateState {
+            val newPermissionOwnerPackageState = mockPackageState(
+                APP_ID_0,
+                mockSimpleAndroidPackage(),
+                isSystem = newPermissionOwnerIsSystem,
+                isInstantApp = newPermissionOwnerIsInstant
+            )
+            addPackageState(newPermissionOwnerPackageState, newState)
             with(appIdPermissionPolicy) {
-                onPackageAdded(packageState0)
+                onPackageAdded(newPermissionOwnerPackageState)
             }
         }
     }
 
+    @Test
+    fun testOnPackageAdded_permissionGroupChanged_getsRevoked() {
+        testPermissionChanged(
+            oldPermissionGroup = PERMISSION_GROUP_NAME_1,
+            newPermissionGroup = PERMISSION_GROUP_NAME_0
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that has a permission group change" +
+                " for a permission it defines, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_protectionLevelChanged_getsRevoked() {
+        testPermissionChanged(newProtectionLevel = PermissionInfo.PROTECTION_INTERNAL)
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that has a protection level change" +
+                " for a permission it defines, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    private fun testPermissionChanged(
+        oldPermissionGroup: String? = null,
+        newPermissionGroup: String? = null,
+        newProtectionLevel: Int = PermissionInfo.PROTECTION_DANGEROUS
+    ) {
+        val oldPermission = mockParsedPermission(
+            PERMISSION_NAME_0,
+            PACKAGE_NAME_0,
+            group = oldPermissionGroup,
+            protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+        )
+        val oldPackageState = mockPackageState(
+            APP_ID_0,
+            mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(oldPermission))
+        )
+        addPackageState(oldPackageState)
+        addPermission(oldPermission)
+        setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0, PermissionFlags.RUNTIME_GRANTED)
+
+        mutateState {
+            val newPermission = mockParsedPermission(
+                PERMISSION_NAME_0,
+                PACKAGE_NAME_0,
+                group = newPermissionGroup,
+                protectionLevel = newProtectionLevel
+            )
+            val newPackageState = mockPackageState(
+                APP_ID_0,
+                mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(newPermission))
+            )
+            addPackageState(newPackageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(newPackageState)
+            }
+        }
+    }
+
+    @Test
+    fun testOnPackageAdded_permissionTreeNoLongerDeclared_getsDefinitionRemoved() {
+        testPermissionDeclaration {}
+
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that no longer defines a permission" +
+                " tree, the permission tree: $PERMISSION_NAME_0 in system state should be removed"
+        )
+            .that(getPermissionTree(PERMISSION_NAME_0))
+            .isNull()
+    }
+
+    @Test
+    fun testOnPackageAdded_permissionTreeByDisabledSystemPackage_remainsUnchanged() {
+        testPermissionDeclaration {
+            val disabledSystemPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+            addDisabledSystemPackageState(disabledSystemPackageState)
+        }
+
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that no longer defines" +
+                " a permission tree while this permission tree is still defined by" +
+                " a disabled system package, the permission tree: $PERMISSION_NAME_0 in" +
+                " system state should not be removed"
+        )
+            .that(getPermissionTree(PERMISSION_TREE_NAME))
+            .isNotNull()
+    }
+
+    @Test
+    fun testOnPackageAdded_permissionNoLongerDeclared_getsDefinitionRemoved() {
+        testPermissionDeclaration {}
+
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that no longer defines a permission," +
+                " the permission: $PERMISSION_NAME_0 in system state should be removed"
+        )
+            .that(getPermission(PERMISSION_NAME_0))
+            .isNull()
+    }
+
+    @Test
+    fun testOnPackageAdded_permissionByDisabledSystemPackage_remainsUnchanged() {
+        testPermissionDeclaration {
+            val disabledSystemPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+            addDisabledSystemPackageState(disabledSystemPackageState)
+        }
+
+        assertWithMessage(
+            "After onPackageAdded() is called for a disabled system package and it's updated apk" +
+                " no longer defines a permission, the permission: $PERMISSION_NAME_0 in" +
+                " system state should not be removed"
+        )
+            .that(getPermission(PERMISSION_NAME_0))
+            .isNotNull()
+    }
+
+    private fun testPermissionDeclaration(additionalSetup: () -> Unit) {
+        val oldPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+        addPackageState(oldPackageState)
+        addPermission(defaultPermissionTree)
+        addPermission(defaultPermission)
+
+        additionalSetup()
+
+        mutateState {
+            val newPackageState = mockPackageState(APP_ID_0, mockAndroidPackage(PACKAGE_NAME_0))
+            addPackageState(newPackageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(newPackageState)
+            }
+        }
+    }
+
+    @Test
+    fun testOnPackageAdded_permissionsNoLongerRequested_getsFlagsRevoked() {
+        val parsedPermission = mockParsedPermission(
+            PERMISSION_NAME_0,
+            PACKAGE_NAME_0,
+            protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+        )
+        val oldPackageState = mockPackageState(
+            APP_ID_0,
+            mockAndroidPackage(
+                PACKAGE_NAME_0,
+                permissions = listOf(parsedPermission),
+                requestedPermissions = setOf(PERMISSION_NAME_0)
+            )
+        )
+        addPackageState(oldPackageState)
+        addPermission(parsedPermission)
+        setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0, PermissionFlags.RUNTIME_GRANTED)
+
+        mutateState {
+            val newPackageState = mockPackageState(APP_ID_0, mockSimpleAndroidPackage())
+            addPackageState(newPackageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(newPackageState)
+            }
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that no longer requests a permission" +
+                " the actual permission flags $actualFlags should match the" +
+                " expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_storageAndMediaPermissionsDowngradingPastQ_getsRuntimeRevoked() {
+        testRevokePermissionsOnPackageUpdate(
+            PermissionFlags.RUNTIME_GRANTED,
+            newTargetSdkVersion = Build.VERSION_CODES.P
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that's downgrading past Q" +
+                " the actual permission flags $actualFlags should match the" +
+                " expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_storageAndMediaPermissionsNotDowngradingPastQ_remainsUnchanged() {
+        val oldFlags = PermissionFlags.RUNTIME_GRANTED
+        testRevokePermissionsOnPackageUpdate(
+            oldFlags,
+            oldTargetSdkVersion = Build.VERSION_CODES.P,
+            newTargetSdkVersion = Build.VERSION_CODES.P
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that's not downgrading past Q" +
+                " the actual permission flags $actualFlags should match the" +
+                " expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_policyFixedDowngradingPastQ_remainsUnchanged() {
+        val oldFlags = PermissionFlags.RUNTIME_GRANTED and PermissionFlags.POLICY_FIXED
+        testRevokePermissionsOnPackageUpdate(oldFlags, newTargetSdkVersion = Build.VERSION_CODES.P)
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that's downgrading past Q" +
+                " the actual permission flags with PermissionFlags.POLICY_FIXED $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_newlyRequestingLegacyExternalStorage_getsRuntimeRevoked() {
+        testRevokePermissionsOnPackageUpdate(
+            PermissionFlags.RUNTIME_GRANTED,
+            oldTargetSdkVersion = Build.VERSION_CODES.P,
+            newTargetSdkVersion = Build.VERSION_CODES.P,
+            oldIsRequestLegacyExternalStorage = false
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package with" +
+                " newlyRequestingLegacyExternalStorage, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_missingOldPackage_remainsUnchanged() {
+        val oldFlags = PermissionFlags.RUNTIME_GRANTED
+        testRevokePermissionsOnPackageUpdate(
+            oldFlags,
+            newTargetSdkVersion = Build.VERSION_CODES.P,
+            isOldPackageMissing = true
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that's downgrading past Q" +
+                " and doesn't have the oldPackage, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    private fun testRevokePermissionsOnPackageUpdate(
+        oldFlags: Int,
+        oldTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+        newTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+        oldIsRequestLegacyExternalStorage: Boolean = true,
+        newIsRequestLegacyExternalStorage: Boolean = true,
+        isOldPackageMissing: Boolean = false
+    ) {
+        val parsedPermission = mockParsedPermission(
+            PERMISSION_READ_EXTERNAL_STORAGE,
+            PACKAGE_NAME_0,
+            protectionLevel = PermissionInfo.PROTECTION_DANGEROUS
+        )
+        val oldPackageState = if (isOldPackageMissing) {
+            mockPackageState(APP_ID_0, PACKAGE_NAME_0)
+        } else {
+            mockPackageState(
+                APP_ID_0,
+                mockAndroidPackage(
+                    PACKAGE_NAME_0,
+                    targetSdkVersion = oldTargetSdkVersion,
+                    isRequestLegacyExternalStorage = oldIsRequestLegacyExternalStorage,
+                    requestedPermissions = setOf(PERMISSION_READ_EXTERNAL_STORAGE),
+                    permissions = listOf(parsedPermission)
+                )
+            )
+        }
+        addPackageState(oldPackageState)
+        addPermission(parsedPermission)
+        setPermissionFlags(APP_ID_0, USER_ID_0, PERMISSION_READ_EXTERNAL_STORAGE, oldFlags)
+
+        mutateState {
+            val newPackageState = mockPackageState(
+                APP_ID_0,
+                mockAndroidPackage(
+                    PACKAGE_NAME_0,
+                    targetSdkVersion = newTargetSdkVersion,
+                    isRequestLegacyExternalStorage = newIsRequestLegacyExternalStorage,
+                    requestedPermissions = setOf(PERMISSION_READ_EXTERNAL_STORAGE),
+                    permissions = listOf(parsedPermission)
+                )
+            )
+            addPackageState(newPackageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(newPackageState)
+            }
+        }
+    }
+
+    @Test
+    fun testOnPackageAdded_normalPermissionAlreadyGranted_remainsUnchanged() {
+        val oldFlags = PermissionFlags.INSTALL_GRANTED or PermissionFlags.INSTALL_REVOKED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_NORMAL) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal permission" +
+                " with an existing INSTALL_GRANTED flag, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_normalPermissionNotInstallRevoked_getsGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_NORMAL,
+            isNewInstall = true
+        ) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal permission" +
+                " with no existing flags, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_normalPermissionRequestedByInstalledPackage_getsGranted() {
+        val oldFlags = PermissionFlags.INSTALL_REVOKED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_NORMAL) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal permission" +
+                " with the INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags since it's a new install"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    /**
+     * We setup a permission protection level change from SIGNATURE to NORMAL in order to make
+     * the permission a "changed permission" in order to test evaluatePermissionState() called by
+     * evaluatePermissionStateForAllPackages(). This makes the requestingPackageState not the
+     * installedPackageState so that we can test whether requesting by system package will give us
+     * the expected permission flags.
+     *
+     * Besides, this also helps us test evaluatePermissionStateForAllPackages(). Since both
+     * evaluatePermissionStateForAllPackages() and evaluateAllPermissionStatesForPackage() call
+     * evaluatePermissionState() in their implementations, we use these tests as the only tests
+     * that test evaluatePermissionStateForAllPackages()
+     */
+    @Test
+    fun testOnPackageAdded_normalPermissionRequestedBySystemPackage_getsGranted() {
+        testEvaluateNormalPermissionStateWithPermissionChanges(requestingPackageIsSystem = true)
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a system package that requests a normal" +
+                " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_normalCompatibilityPermission_getsGranted() {
+        testEvaluateNormalPermissionStateWithPermissionChanges(
+            permissionName = PERMISSION_POST_NOTIFICATIONS,
+            requestingPackageTargetSdkVersion = Build.VERSION_CODES.S
+        )
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_POST_NOTIFICATIONS)
+        val expectedNewFlags = PermissionFlags.INSTALL_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal compatibility" +
+                " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_normalPermissionPreviouslyRevoked_getsInstallRevoked() {
+        testEvaluateNormalPermissionStateWithPermissionChanges()
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.INSTALL_REVOKED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal" +
+                " permission with INSTALL_REVOKED flag, the actual permission flags $actualFlags" +
+                " should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    private fun testEvaluateNormalPermissionStateWithPermissionChanges(
+        permissionName: String = PERMISSION_NAME_0,
+        requestingPackageTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+        requestingPackageIsSystem: Boolean = false
+    ) {
+        val oldParsedPermission = mockParsedPermission(
+            permissionName,
+            PACKAGE_NAME_0,
+            protectionLevel = PermissionInfo.PROTECTION_SIGNATURE
+        )
+        val oldPermissionOwnerPackageState = mockPackageState(
+            APP_ID_0,
+            mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(oldParsedPermission))
+        )
+        val requestingPackageState = mockPackageState(
+            APP_ID_1,
+            mockAndroidPackage(
+                PACKAGE_NAME_1,
+                requestedPermissions = setOf(permissionName),
+                targetSdkVersion = requestingPackageTargetSdkVersion
+            ),
+            isSystem = requestingPackageIsSystem,
+        )
+        addPackageState(oldPermissionOwnerPackageState)
+        addPackageState(requestingPackageState)
+        addPermission(oldParsedPermission)
+        val oldFlags = PermissionFlags.INSTALL_REVOKED
+        setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags)
+
+        mutateState {
+            val newPermissionOwnerPackageState = mockPackageState(
+                APP_ID_0,
+                mockAndroidPackage(
+                    PACKAGE_NAME_0,
+                    permissions = listOf(mockParsedPermission(permissionName, PACKAGE_NAME_0))
+                )
+            )
+            addPackageState(newPermissionOwnerPackageState, newState)
+            with(appIdPermissionPolicy) {
+                onPackageAdded(newPermissionOwnerPackageState)
+            }
+        }
+    }
+
+    @Test
+    fun testOnPackageAdded_normalAppOpPermission_getsRoleAndUserSetFlagsPreserved() {
+        val oldFlags = PermissionFlags.ROLE or PermissionFlags.USER_SET
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_NORMAL or PermissionInfo.PROTECTION_FLAG_APPOP
+        ) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.INSTALL_GRANTED or oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a normal app op" +
+                " permission with existing ROLE and USER_SET flags, the actual permission flags" +
+                " $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_internalPermissionWasGrantedWithMissingPackage_getsProtectionGranted() {
+        val oldFlags = PermissionFlags.PROTECTION_GRANTED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_INTERNAL) {
+            val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+            addPackageState(packageStateWithMissingPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests an internal permission" +
+                " with missing android package and $oldFlags flag, the actual permission flags" +
+                " $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_internalAppOpPermission_getsRoleAndUserSetFlagsPreserved() {
+        val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.ROLE or
+            PermissionFlags.USER_SET
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_APPOP
+        ) {
+            val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+            addPackageState(packageStateWithMissingPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests an internal permission" +
+                " with missing android package and $oldFlags flag and the permission isAppOp," +
+                " the actual permission flags $actualFlags should match the expected" +
+                " flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_internalDevelopmentPermission_getsRuntimeGrantedPreserved() {
+        val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.RUNTIME_GRANTED
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_DEVELOPMENT
+        ) {
+            val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+            addPackageState(packageStateWithMissingPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests an internal permission" +
+                " with missing android package and $oldFlags flag and permission isDevelopment," +
+                " the actual permission flags $actualFlags should match the expected" +
+                " flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_internalRolePermission_getsRoleAndRuntimeGrantedPreserved() {
+        val oldFlags = PermissionFlags.PROTECTION_GRANTED or PermissionFlags.ROLE or
+            PermissionFlags.RUNTIME_GRANTED
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_INTERNAL or PermissionInfo.PROTECTION_FLAG_ROLE
+        ) {
+            val packageStateWithMissingPackage = mockPackageState(APP_ID_1, MISSING_ANDROID_PACKAGE)
+            addPackageState(packageStateWithMissingPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests an internal permission" +
+                " with missing android package and $oldFlags flag and the permission isRole," +
+                " the actual permission flags $actualFlags should match the expected" +
+                " flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_signaturePrivilegedPermissionNotAllowlisted_isNotGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_SIGNATURE or PermissionInfo.PROTECTION_FLAG_PRIVILEGED,
+            isInstalledPackageSystem = true,
+            isInstalledPackagePrivileged = true,
+            isInstalledPackageProduct = true,
+            // To mock the return value of shouldGrantPrivilegedOrOemPermission()
+            isInstalledPackageVendor = true,
+            isNewInstall = true
+        ) {
+            val platformPackage = mockPackageState(
+                PLATFORM_APP_ID,
+                mockAndroidPackage(PLATFORM_PACKAGE_NAME)
+            )
+            setupAllowlist(PACKAGE_NAME_1, false)
+            addPackageState(platformPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a signature privileged" +
+                " permission that's not allowlisted, the actual permission" +
+                " flags $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_nonPrivilegedPermissionShouldGrantBySignature_getsProtectionGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_SIGNATURE,
+            isInstalledPackageSystem = true,
+            isInstalledPackagePrivileged = true,
+            isInstalledPackageProduct = true,
+            isInstalledPackageSignatureMatching = true,
+            isInstalledPackageVendor = true,
+            isNewInstall = true
+        ) {
+            val platformPackage = mockPackageState(
+                PLATFORM_APP_ID,
+                mockAndroidPackage(PLATFORM_PACKAGE_NAME, isSignatureMatching = true)
+            )
+            setupAllowlist(PACKAGE_NAME_1, false)
+            addPackageState(platformPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.PROTECTION_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a signature" +
+                " non-privileged permission, the actual permission" +
+                " flags $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_privilegedAllowlistPermissionShouldGrantByProtectionFlags_getsGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_SIGNATURE or PermissionInfo.PROTECTION_FLAG_PRIVILEGED,
+            isInstalledPackageSystem = true,
+            isInstalledPackagePrivileged = true,
+            isInstalledPackageProduct = true,
+            isNewInstall = true
+        ) {
+            val platformPackage = mockPackageState(
+                PLATFORM_APP_ID,
+                mockAndroidPackage(PLATFORM_PACKAGE_NAME)
+            )
+            setupAllowlist(PACKAGE_NAME_1, true)
+            addPackageState(platformPackage)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.PROTECTION_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a signature privileged" +
+                " permission that's allowlisted and should grant by protection flags, the actual" +
+                " permission flags $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    private fun setupAllowlist(
+        packageName: String,
+        allowlistState: Boolean,
+        state: MutableAccessState = oldState
+    ) {
+        state.mutateExternalState().setPrivilegedPermissionAllowlistPackages(
+            MutableIndexedListSet<String>().apply { add(packageName) }
+        )
+        val mockAllowlist = mock<PermissionAllowlist> {
+            whenever(
+                getProductPrivilegedAppAllowlistState(packageName, PERMISSION_NAME_0)
+            ).thenReturn(allowlistState)
+        }
+        state.mutateExternalState().setPermissionAllowlist(mockAllowlist)
+    }
+
+    @Test
+    fun testOnPackageAdded_nonRuntimeFlagsOnRuntimePermissions_getsCleared() {
+        val oldFlags = PermissionFlags.INSTALL_GRANTED or PermissionFlags.PREGRANT or
+            PermissionFlags.RUNTIME_GRANTED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.PREGRANT or PermissionFlags.RUNTIME_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " with existing $oldFlags flags, the actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_newPermissionsForPreM_requiresUserReview() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            installedPackageTargetSdkVersion = Build.VERSION_CODES.LOLLIPOP,
+            isNewInstall = true
+        ) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.IMPLICIT
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " with no existing flags in pre M, actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_legacyOrImplicitGrantedPermissionPreviouslyRevoked_getsAppOpRevoked() {
+        val oldFlags = PermissionFlags.USER_FIXED
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            installedPackageTargetSdkVersion = Build.VERSION_CODES.LOLLIPOP
+        ) {
+            setPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0, oldFlags)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.USER_FIXED or
+            PermissionFlags.APP_OP_REVOKED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that should be LEGACY_GRANTED or IMPLICIT_GRANTED that was previously revoked," +
+                " the actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_legacyGrantedPermissionsForPostM_userReviewRequirementRemoved() {
+        val oldFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.IMPLICIT
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that used to require user review, the user review requirement should be removed" +
+                " if it's upgraded to post M. The actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_legacyGrantedPermissionsAlreadyReviewedForPostM_getsGranted() {
+        val oldFlags = PermissionFlags.LEGACY_GRANTED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that was already reviewed by the user, the permission should be RUNTIME_GRANTED" +
+                " if it's upgraded to post M. The actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_leanbackNotificationPermissionsForPostM_getsImplicitGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            permissionName = PERMISSION_POST_NOTIFICATIONS,
+            isNewInstall = true
+        ) {
+            oldState.mutateExternalState().setLeanback(true)
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_POST_NOTIFICATIONS)
+        val expectedNewFlags = PermissionFlags.IMPLICIT_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime notification" +
+                " permission when isLeanback, the actual permission flags $actualFlags should" +
+                " match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_implicitSourceFromNonRuntime_getsImplicitGranted() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            implicitPermissions = setOf(PERMISSION_NAME_0),
+            isNewInstall = true
+        ) {
+            oldState.mutateExternalState().setImplicitToSourcePermissions(
+                MutableIndexedMap<String, IndexedListSet<String>>().apply {
+                    put(PERMISSION_NAME_0, MutableIndexedListSet<String>().apply {
+                        add(PERMISSION_NAME_1)
+                    })
+                }
+            )
+            addPermission(mockParsedPermission(PERMISSION_NAME_1, PACKAGE_NAME_0))
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime implicit" +
+                " permission that's source from a non-runtime permission, the actual permission" +
+                " flags $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    /**
+     * For a legacy granted or implicit permission during the app upgrade, when the permission
+     * should no longer be legacy or implicit granted, we want to remove the APP_OP_REVOKED flag
+     * so that the app can request the permission.
+     */
+    @Test
+    fun testOnPackageAdded_noLongerLegacyOrImplicitGranted_canBeRequested() {
+        val oldFlags = PermissionFlags.LEGACY_GRANTED or PermissionFlags.APP_OP_REVOKED or
+            PermissionFlags.RUNTIME_GRANTED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that is no longer LEGACY_GRANTED or IMPLICIT_GRANTED, the actual permission" +
+                " flags $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_noLongerImplicitPermissions_getsRuntimeAndImplicitFlagsRemoved() {
+        val oldFlags = PermissionFlags.IMPLICIT or PermissionFlags.RUNTIME_GRANTED or
+            PermissionFlags.USER_SET or PermissionFlags.USER_FIXED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = 0
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that is no longer implicit and we shouldn't retain as nearby device" +
+                " permissions, the actual permission flags $actualFlags should match the expected" +
+                " flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_noLongerImplicitNearbyPermissionsWasGranted_getsRuntimeGranted() {
+        val oldFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            permissionName = PERMISSION_BLUETOOTH_CONNECT,
+            requestedPermissions = setOf(
+                PERMISSION_BLUETOOTH_CONNECT,
+                PERMISSION_ACCESS_BACKGROUND_LOCATION
+            )
+        ) {
+            setPermissionFlags(
+                APP_ID_1,
+                USER_ID_0,
+                PERMISSION_ACCESS_BACKGROUND_LOCATION,
+                PermissionFlags.RUNTIME_GRANTED
+            )
+        }
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_BLUETOOTH_CONNECT)
+        val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime nearby device" +
+                " permission that was granted by implicit, the actual permission flags" +
+                " $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_noLongerImplicitSystemOrPolicyFixedWasGranted_getsRuntimeGranted() {
+        val oldFlags = PermissionFlags.IMPLICIT_GRANTED or PermissionFlags.IMPLICIT or
+            PermissionFlags.SYSTEM_FIXED
+        testEvaluatePermissionState(oldFlags, PermissionInfo.PROTECTION_DANGEROUS) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.RUNTIME_GRANTED or PermissionFlags.SYSTEM_FIXED
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime permission" +
+                " that was granted and is no longer implicit and is SYSTEM_FIXED or POLICY_FIXED," +
+                " the actual permission flags $actualFlags should match the expected" +
+                " flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_restrictedPermissionsNotExempt_getsRestrictionFlags() {
+        val oldFlags = PermissionFlags.RESTRICTION_REVOKED
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            permissionInfoFlags = PermissionInfo.FLAG_HARD_RESTRICTED
+        ) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = oldFlags
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime hard" +
+                " restricted permission that is not exempted, the actual permission flags" +
+                " $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    @Test
+    fun testOnPackageAdded_restrictedPermissionsIsExempted_clearsRestrictionFlags() {
+        val oldFlags = 0
+        testEvaluatePermissionState(
+            oldFlags,
+            PermissionInfo.PROTECTION_DANGEROUS,
+            permissionInfoFlags = PermissionInfo.FLAG_SOFT_RESTRICTED
+        ) {}
+
+        val actualFlags = getPermissionFlags(APP_ID_1, USER_ID_0, PERMISSION_NAME_0)
+        val expectedNewFlags = PermissionFlags.UPGRADE_EXEMPT
+        assertWithMessage(
+            "After onPackageAdded() is called for a package that requests a runtime soft" +
+                " restricted permission that is exempted, the actual permission flags" +
+                " $actualFlags should match the expected flags $expectedNewFlags"
+        )
+            .that(actualFlags)
+            .isEqualTo(expectedNewFlags)
+    }
+
+    /**
+     * Setup simple package states for testing evaluatePermissionState().
+     * permissionOwnerPackageState is definer of permissionName with APP_ID_0.
+     * installedPackageState is the installed package that requests permissionName with APP_ID_1.
+     *
+     * @param oldFlags the existing permission flags for APP_ID_1, USER_ID_0, permissionName
+     * @param protectionLevel the protectionLevel for the permission
+     * @param permissionName the name of the permission (1) being defined (2) of the oldFlags, and
+     *                       (3) requested by installedPackageState
+     * @param requestedPermissions the permissions requested by installedPackageState
+     * @param implicitPermissions the implicit permissions of installedPackageState
+     * @param permissionInfoFlags the flags for the permission itself
+     * @param isInstalledPackageSystem whether installedPackageState is a system package
+     *
+     * @return installedPackageState
+     */
+    fun testEvaluatePermissionState(
+        oldFlags: Int,
+        protectionLevel: Int,
+        permissionName: String = PERMISSION_NAME_0,
+        requestedPermissions: Set<String> = setOf(permissionName),
+        implicitPermissions: Set<String> = emptySet(),
+        permissionInfoFlags: Int = 0,
+        isInstalledPackageSystem: Boolean = false,
+        isInstalledPackagePrivileged: Boolean = false,
+        isInstalledPackageProduct: Boolean = false,
+        isInstalledPackageSignatureMatching: Boolean = false,
+        isInstalledPackageVendor: Boolean = false,
+        installedPackageTargetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+        isNewInstall: Boolean = false,
+        additionalSetup: () -> Unit
+    ) {
+        val parsedPermission = mockParsedPermission(
+            permissionName,
+            PACKAGE_NAME_0,
+            protectionLevel = protectionLevel,
+            flags = permissionInfoFlags
+        )
+        val permissionOwnerPackageState = mockPackageState(
+            APP_ID_0,
+            mockAndroidPackage(PACKAGE_NAME_0, permissions = listOf(parsedPermission))
+        )
+        val installedPackageState = mockPackageState(
+            APP_ID_1,
+            mockAndroidPackage(
+                PACKAGE_NAME_1,
+                requestedPermissions = requestedPermissions,
+                implicitPermissions = implicitPermissions,
+                targetSdkVersion = installedPackageTargetSdkVersion,
+                isSignatureMatching = isInstalledPackageSignatureMatching
+            ),
+            isSystem = isInstalledPackageSystem,
+            isPrivileged = isInstalledPackagePrivileged,
+            isProduct = isInstalledPackageProduct,
+            isVendor = isInstalledPackageVendor
+        )
+        addPackageState(permissionOwnerPackageState)
+        if (!isNewInstall) {
+            addPackageState(installedPackageState)
+            setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags)
+        }
+        addPermission(parsedPermission)
+
+        additionalSetup()
+
+        mutateState {
+            if (isNewInstall) {
+                addPackageState(installedPackageState, newState)
+                setPermissionFlags(APP_ID_1, USER_ID_0, permissionName, oldFlags, newState)
+            }
+            with(appIdPermissionPolicy) {
+                onPackageAdded(installedPackageState)
+            }
+        }
+    }
+
+    /**
+     * Mock an AndroidPackage with PACKAGE_NAME_0, PERMISSION_NAME_0 and PERMISSION_GROUP_NAME_0
+     */
+    private fun mockSimpleAndroidPackage(): AndroidPackage =
+        mockAndroidPackage(
+            PACKAGE_NAME_0,
+            permissionGroups = listOf(defaultPermissionGroup),
+            permissions = listOf(defaultPermissionTree, defaultPermission)
+        )
+
     private inline fun mutateState(action: MutateStateScope.() -> Unit) {
         newState = oldState.toMutable()
         MutateStateScope(oldState, newState).action()
     }
 
-    private fun createSystemStatePermission(
+    private fun mockPackageState(
         appId: Int,
         packageName: String,
+        isSystem: Boolean = false,
+    ): PackageState =
+        mock {
+            whenever(this.appId).thenReturn(appId)
+            whenever(this.packageName).thenReturn(packageName)
+            whenever(androidPackage).thenReturn(null)
+            whenever(this.isSystem).thenReturn(isSystem)
+        }
+
+    private fun mockPackageState(
+        appId: Int,
+        androidPackage: AndroidPackage,
+        isSystem: Boolean = false,
+        isPrivileged: Boolean = false,
+        isProduct: Boolean = false,
+        isInstantApp: Boolean = false,
+        isVendor: Boolean = false
+    ): PackageState =
+        mock {
+            whenever(this.appId).thenReturn(appId)
+            whenever(this.androidPackage).thenReturn(androidPackage)
+            val packageName = androidPackage.packageName
+            whenever(this.packageName).thenReturn(packageName)
+            whenever(this.isSystem).thenReturn(isSystem)
+            whenever(this.isPrivileged).thenReturn(isPrivileged)
+            whenever(this.isProduct).thenReturn(isProduct)
+            whenever(this.isVendor).thenReturn(isVendor)
+            val userStates = SparseArray<PackageUserState>().apply {
+                put(USER_ID_0, mock { whenever(this.isInstantApp).thenReturn(isInstantApp) })
+            }
+            whenever(this.userStates).thenReturn(userStates)
+        }
+
+    private fun mockAndroidPackage(
+        packageName: String,
+        targetSdkVersion: Int = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+        isRequestLegacyExternalStorage: Boolean = false,
+        adoptPermissions: List<String> = emptyList(),
+        implicitPermissions: Set<String> = emptySet(),
+        requestedPermissions: Set<String> = emptySet(),
+        permissionGroups: List<ParsedPermissionGroup> = emptyList(),
+        permissions: List<ParsedPermission> = emptyList(),
+        isSignatureMatching: Boolean = false
+    ): AndroidPackage =
+        mock {
+            whenever(this.packageName).thenReturn(packageName)
+            whenever(this.targetSdkVersion).thenReturn(targetSdkVersion)
+            whenever(this.isRequestLegacyExternalStorage).thenReturn(isRequestLegacyExternalStorage)
+            whenever(this.adoptPermissions).thenReturn(adoptPermissions)
+            whenever(this.implicitPermissions).thenReturn(implicitPermissions)
+            whenever(this.requestedPermissions).thenReturn(requestedPermissions)
+            whenever(this.permissionGroups).thenReturn(permissionGroups)
+            whenever(this.permissions).thenReturn(permissions)
+            val signingDetails = mock<SigningDetails> {
+                whenever(
+                    hasCommonSignerWithCapability(any(), any())
+                ).thenReturn(isSignatureMatching)
+                whenever(hasAncestorOrSelf(any())).thenReturn(isSignatureMatching)
+                whenever(
+                    checkCapability(any<SigningDetails>(), any())
+                ).thenReturn(isSignatureMatching)
+            }
+            whenever(this.signingDetails).thenReturn(signingDetails)
+        }
+
+    private fun mockParsedPermission(
         permissionName: String,
-        protectionLevel: Int,
+        packageName: String,
+        backgroundPermission: String? = null,
+        group: String? = null,
+        protectionLevel: Int = PermissionInfo.PROTECTION_NORMAL,
+        flags: Int = 0,
+        isTree: Boolean = false
+    ): ParsedPermission =
+        mock {
+            whenever(name).thenReturn(permissionName)
+            whenever(this.packageName).thenReturn(packageName)
+            whenever(metaData).thenReturn(Bundle())
+            whenever(this.backgroundPermission).thenReturn(backgroundPermission)
+            whenever(this.group).thenReturn(group)
+            whenever(this.protectionLevel).thenReturn(protectionLevel)
+            whenever(this.flags).thenReturn(flags)
+            whenever(this.isTree).thenReturn(isTree)
+        }
+
+    private fun mockParsedPermissionGroup(
+        permissionGroupName: String,
+        packageName: String,
+    ): ParsedPermissionGroup =
+        mock {
+            whenever(name).thenReturn(permissionGroupName)
+            whenever(this.packageName).thenReturn(packageName)
+            whenever(metaData).thenReturn(Bundle())
+        }
+
+    private fun addPackageState(packageState: PackageState, state: MutableAccessState = oldState) {
+        state.mutateExternalState().apply {
+            setPackageStates(
+                packageStates.toMutableMap().apply {
+                    put(packageState.packageName, packageState)
+                }
+            )
+            mutateAppIdPackageNames().mutateOrPut(packageState.appId) { MutableIndexedListSet() }
+                .add(packageState.packageName)
+        }
+    }
+
+    private fun addDisabledSystemPackageState(
+        packageState: PackageState,
+        state: MutableAccessState = oldState
+    ) = state.mutateExternalState().apply {
+        (disabledSystemPackageStates as ArrayMap)[packageState.packageName] = packageState
+    }
+
+    private fun addPermission(
+        parsedPermission: ParsedPermission,
         type: Int = Permission.TYPE_MANIFEST,
         isReconciled: Boolean = true,
-        isTree: Boolean = false
+        state: MutableAccessState = oldState
     ) {
-        @Suppress("DEPRECATION")
-        val permissionInfo = PermissionInfo().apply {
-            name = permissionName
-            this.packageName = packageName
-            this.protectionLevel = protectionLevel
-        }
+        val permissionInfo = PackageInfoUtils.generatePermissionInfo(
+            parsedPermission,
+            PackageManager.GET_META_DATA.toLong()
+        )!!
+        val appId = state.externalState.packageStates[permissionInfo.packageName]!!.appId
         val permission = Permission(permissionInfo, isReconciled, type, appId)
-        if (isTree) {
-            oldState.mutateSystemState().mutatePermissionTrees().put(permissionName, permission)
+        if (parsedPermission.isTree) {
+            state.mutateSystemState().mutatePermissionTrees()[permission.name] = permission
         } else {
-            oldState.mutateSystemState().mutatePermissions().put(permissionName, permission)
+            state.mutateSystemState().mutatePermissions()[permission.name] = permission
         }
     }
 
-    private fun createSystemStatePermissionGroup(packageName: String, permissionGroupName: String) {
-        @Suppress("DEPRECATION")
-        val permissionGroupInfo = PermissionGroupInfo().apply {
-            name = permissionGroupName
-            this.packageName = packageName
-        }
-        oldState.mutateSystemState().mutatePermissionGroups()[permissionGroupName] =
-            permissionGroupInfo
+    private fun addPermissionGroup(
+        parsedPermissionGroup: ParsedPermissionGroup,
+        state: MutableAccessState = oldState
+    ) {
+        state.mutateSystemState().mutatePermissionGroups()[parsedPermissionGroup.name] =
+            PackageInfoUtils.generatePermissionGroupInfo(
+                parsedPermissionGroup,
+                PackageManager.GET_META_DATA.toLong()
+            )!!
     }
 
-    fun getPermissionFlags(
+    private fun getPermission(
+        permissionName: String,
+        state: MutableAccessState = newState
+    ): Permission? = state.systemState.permissions[permissionName]
+
+    private fun getPermissionTree(
+        permissionTreeName: String,
+        state: MutableAccessState = newState
+    ): Permission? = state.systemState.permissionTrees[permissionTreeName]
+
+    private fun getPermissionGroup(
+        permissionGroupName: String,
+        state: MutableAccessState = newState
+    ): PermissionGroupInfo? = state.systemState.permissionGroups[permissionGroupName]
+
+    private fun getPermissionFlags(
         appId: Int,
         userId: Int,
         permissionName: String,
@@ -517,20 +1706,43 @@
     ): Int =
         state.userStates[userId]?.appIdPermissionFlags?.get(appId).getWithDefault(permissionName, 0)
 
+    private fun setPermissionFlags(
+        appId: Int,
+        userId: Int,
+        permissionName: String,
+        flags: Int,
+        state: MutableAccessState = oldState
+    ) =
+        state.mutateUserState(userId)!!.mutateAppIdPermissionFlags().mutateOrPut(appId) {
+            MutableIndexedMap()
+        }.put(permissionName, flags)
+
     companion object {
         private const val PACKAGE_NAME_0 = "packageName0"
         private const val PACKAGE_NAME_1 = "packageName1"
+        private const val MISSING_ANDROID_PACKAGE = "missingAndroidPackage"
+        private const val PLATFORM_PACKAGE_NAME = "android"
 
         private const val APP_ID_0 = 0
         private const val APP_ID_1 = 1
-
-        private const val PERMISSION_NAME_0 = "permissionName0"
-        private const val PERMISSION_NAME_1 = "permissionName1"
+        private const val PLATFORM_APP_ID = 2
 
         private const val PERMISSION_GROUP_NAME_0 = "permissionGroupName0"
         private const val PERMISSION_GROUP_NAME_1 = "permissionGroupName1"
 
+        private const val PERMISSION_TREE_NAME = "permissionTree"
+
+        private const val PERMISSION_NAME_0 = "permissionName0"
+        private const val PERMISSION_NAME_1 = "permissionName1"
+        private const val PERMISSION_READ_EXTERNAL_STORAGE =
+            Manifest.permission.READ_EXTERNAL_STORAGE
+        private const val PERMISSION_POST_NOTIFICATIONS =
+            Manifest.permission.POST_NOTIFICATIONS
+        private const val PERMISSION_BLUETOOTH_CONNECT =
+            Manifest.permission.BLUETOOTH_CONNECT
+        private const val PERMISSION_ACCESS_BACKGROUND_LOCATION =
+            Manifest.permission.ACCESS_BACKGROUND_LOCATION
+
         private const val USER_ID_0 = 0
-        private const val USER_ID_1 = 1
     }
 }
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
index 2640390..e0c0ae2 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
@@ -758,14 +758,16 @@
 
     @Test
     public void testSetScreenOffBrightnessSensorEnabled_DisplayIsInDoze() {
+        mContext.getOrCreateTestableResources().addOverride(
+                com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, false);
+        mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
+
         Settings.System.putInt(mContext.getContentResolver(),
                 Settings.System.SCREEN_BRIGHTNESS_MODE,
                 Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
 
         DisplayPowerRequest dpr = new DisplayPowerRequest();
         dpr.policy = DisplayPowerRequest.POLICY_DOZE;
-        mContext.getOrCreateTestableResources().addOverride(
-                com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, true);
         mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
         advanceTime(1); // Run updatePowerState
 
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
index b4a66bd..76b41b7 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
@@ -1895,6 +1895,13 @@
         assertProcStates(app2, PROCESS_STATE_FOREGROUND_SERVICE, PERCEPTIBLE_APP_ADJ,
                 SCHED_GROUP_DEFAULT);
         assertBfsl(app2);
+
+        bindService(client2, app1, null, 0, mock(IBinder.class));
+        bindService(app1, client2, null, 0, mock(IBinder.class));
+        client2.mServices.setHasForegroundServices(false, 0, /* hasNoneType=*/false);
+        updateOomAdj(app1, client1, client2);
+        assertProcStates(app1, PROCESS_STATE_IMPORTANT_FOREGROUND, VISIBLE_APP_ADJ,
+                SCHED_GROUP_TOP_APP);
     }
 
     @SuppressWarnings("GuardedBy")
diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java
similarity index 75%
rename from services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java
rename to services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java
index 80576a6..d988063 100644
--- a/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/pm/PackageArchiverTest.java
@@ -25,6 +25,7 @@
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
@@ -34,11 +35,14 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentSender;
+import android.content.pm.ActivityInfo;
 import android.content.pm.LauncherActivityInfo;
 import android.content.pm.LauncherApps;
-import android.content.pm.PackageArchiver;
+import android.content.pm.PackageInstaller;
 import android.content.pm.PackageManager;
 import android.content.pm.VersionedPackage;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
 import android.os.Binder;
 import android.os.Build;
 import android.os.Bundle;
@@ -62,6 +66,7 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+import java.io.IOException;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
@@ -69,14 +74,15 @@
 @SmallTest
 @Presubmit
 @RunWith(AndroidJUnit4.class)
-public class PackageArchiverServiceTest {
+public class PackageArchiverTest {
 
     private static final String PACKAGE = "com.example";
     private static final String CALLER_PACKAGE = "com.caller";
     private static final String INSTALLER_PACKAGE = "com.installer";
+    private static final Path ICON_PATH = Path.of("icon.png");
 
     @Rule
-    public final MockSystemRule mMockSystem = new MockSystemRule();
+    public final MockSystemRule rule = new MockSystemRule();
 
     @Mock
     private IntentSender mIntentSender;
@@ -87,9 +93,13 @@
     @Mock
     private LauncherApps mLauncherApps;
     @Mock
+    private PackageManager mPackageManager;
+    @Mock
     private PackageInstallerService mInstallerService;
     @Mock
     private PackageStateInternal mPackageState;
+    @Mock
+    private Bitmap mIcon;
 
     private final InstallSource mInstallSource =
             InstallSource.create(
@@ -102,22 +112,21 @@
                     /* packageSource= */ 0);
 
     private final List<LauncherActivityInfo> mLauncherActivityInfos = createLauncherActivities();
-
     private final int mUserId = UserHandle.CURRENT.getIdentifier();
 
     private PackageUserStateImpl mUserState;
 
     private PackageSetting mPackageSetting;
 
-    private PackageArchiverService mArchiveService;
+    private PackageArchiver mArchiveManager;
 
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        mMockSystem.system().stageNominalSystemState();
-        when(mMockSystem.mocks().getInjector().getPackageInstallerService()).thenReturn(
+        rule.system().stageNominalSystemState();
+        when(rule.mocks().getInjector().getPackageInstallerService()).thenReturn(
                 mInstallerService);
-        PackageManagerService pm = spy(new PackageManagerService(mMockSystem.mocks().getInjector(),
+        PackageManagerService pm = spy(new PackageManagerService(rule.mocks().getInjector(),
                 /* factoryTest= */false,
                 MockSystem.Companion.getDEFAULT_VERSION_INFO().fingerprint,
                 /* isEngBuild= */ false,
@@ -132,25 +141,34 @@
         when(mPackageState.getPackageName()).thenReturn(PACKAGE);
         when(mPackageState.getInstallSource()).thenReturn(mInstallSource);
         mPackageSetting = createBasicPackageSetting();
-        when(mMockSystem.mocks().getSettings().getPackageLPr(eq(PACKAGE))).thenReturn(
+        when(rule.mocks().getSettings().getPackageLPr(eq(PACKAGE))).thenReturn(
                 mPackageSetting);
         mUserState = new PackageUserStateImpl().setInstalled(true);
         mPackageSetting.setUserState(mUserId, mUserState);
         when(mPackageState.getUserStateOrDefault(eq(mUserId))).thenReturn(mUserState);
+
         when(mContext.getSystemService(LauncherApps.class)).thenReturn(mLauncherApps);
         when(mLauncherApps.getActivityList(eq(PACKAGE), eq(UserHandle.CURRENT))).thenReturn(
                 mLauncherActivityInfos);
         doReturn(mComputer).when(pm).snapshotComputer();
         when(mComputer.getPackageUid(eq(CALLER_PACKAGE), eq(0L), eq(mUserId))).thenReturn(
                 Binder.getCallingUid());
-        mArchiveService = new PackageArchiverService(mContext, pm);
+
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
+        when(mPackageManager.getResourcesForApplication(eq(PACKAGE))).thenReturn(
+                mock(Resources.class));
+        when(mIcon.compress(eq(Bitmap.CompressFormat.PNG), eq(100), any())).thenReturn(true);
+
+        mArchiveManager = spy(new PackageArchiver(mContext, pm));
+        doReturn(ICON_PATH).when(mArchiveManager).storeIcon(eq(PACKAGE),
+                any(LauncherActivityInfo.class), eq(mUserId));
     }
 
     @Test
     public void archiveApp_callerPackageNameIncorrect() {
         Exception e = assertThrows(
                 SecurityException.class,
-                () -> mArchiveService.requestArchive(PACKAGE, "different", mIntentSender,
+                () -> mArchiveManager.requestArchive(PACKAGE, "different", mIntentSender,
                         UserHandle.CURRENT));
         assertThat(e).hasMessageThat().isEqualTo(
                 String.format(
@@ -167,7 +185,7 @@
 
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+                () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -175,15 +193,20 @@
     }
 
     @Test
-    public void archiveApp_packageNotInstalledForUser() {
+    public void archiveApp_packageNotInstalledForUser() throws IntentSender.SendIntentException {
         mPackageSetting.modifyUserState(UserHandle.CURRENT.getIdentifier()).setInstalled(false);
 
-        Exception e = assertThrows(
-                ParcelableException.class,
-                () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
-                        UserHandle.CURRENT));
-        assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
-        assertThat(e.getCause()).hasMessageThat().isEqualTo(
+        mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+        rule.mocks().getHandler().flush();
+
+        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mIntentSender).sendIntent(any(), anyInt(), intentCaptor.capture(), any(), any(),
+                any(), any());
+        Intent value = intentCaptor.getValue();
+        assertThat(value.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME)).isEqualTo(PACKAGE);
+        assertThat(value.getIntExtra(PackageInstaller.EXTRA_STATUS, 0)).isEqualTo(
+                PackageInstaller.STATUS_FAILURE);
+        assertThat(value.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE)).isEqualTo(
                 String.format("Package %s not found.", PACKAGE));
     }
 
@@ -202,7 +225,7 @@
 
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+                () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo("No installer found");
@@ -215,7 +238,7 @@
 
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
+                () -> mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -223,13 +246,34 @@
     }
 
     @Test
+    public void archiveApp_storeIconFails() throws IntentSender.SendIntentException, IOException {
+        IOException e = new IOException("IO");
+        doThrow(e).when(mArchiveManager).storeIcon(eq(PACKAGE),
+                any(LauncherActivityInfo.class), eq(mUserId));
+
+        mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+        rule.mocks().getHandler().flush();
+
+        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
+        verify(mIntentSender).sendIntent(any(), anyInt(), intentCaptor.capture(), any(), any(),
+                any(), any());
+        Intent value = intentCaptor.getValue();
+        assertThat(value.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME)).isEqualTo(PACKAGE);
+        assertThat(value.getIntExtra(PackageInstaller.EXTRA_STATUS, 0)).isEqualTo(
+                PackageInstaller.STATUS_FAILURE);
+        assertThat(value.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE)).isEqualTo(
+                e.toString());
+    }
+
+    @Test
     public void archiveApp_success() {
-        mArchiveService.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+        mArchiveManager.requestArchive(PACKAGE, CALLER_PACKAGE, mIntentSender, UserHandle.CURRENT);
+        rule.mocks().getHandler().flush();
 
         verify(mInstallerService).uninstall(
                 eq(new VersionedPackage(PACKAGE, PackageManager.VERSION_CODE_HIGHEST)),
                 eq(CALLER_PACKAGE), eq(DELETE_KEEP_DATA), eq(mIntentSender),
-                eq(UserHandle.CURRENT.getIdentifier()));
+                eq(UserHandle.CURRENT.getIdentifier()), anyInt());
         assertThat(mPackageSetting.readUserState(
                 UserHandle.CURRENT.getIdentifier()).getArchiveState()).isEqualTo(
                 createArchiveState());
@@ -241,7 +285,7 @@
 
         Exception e = assertThrows(
                 SecurityException.class,
-                () -> mArchiveService.requestUnarchive(PACKAGE, "different",
+                () -> mArchiveManager.requestUnarchive(PACKAGE, "different",
                         UserHandle.CURRENT));
         assertThat(e).hasMessageThat().isEqualTo(
                 String.format(
@@ -259,7 +303,7 @@
 
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+                () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -270,7 +314,7 @@
     public void unarchiveApp_notArchived() {
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+                () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -293,7 +337,7 @@
 
         Exception e = assertThrows(
                 ParcelableException.class,
-                () -> mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE,
+                () -> mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE,
                         UserHandle.CURRENT));
         assertThat(e.getCause()).isInstanceOf(PackageManager.NameNotFoundException.class);
         assertThat(e.getCause()).hasMessageThat().isEqualTo(
@@ -304,8 +348,8 @@
     public void unarchiveApp_success() {
         mUserState.setArchiveState(createArchiveState()).setInstalled(false);
 
-        mArchiveService.requestUnarchive(PACKAGE, CALLER_PACKAGE, UserHandle.CURRENT);
-        mMockSystem.mocks().getHandler().flush();
+        mArchiveManager.requestUnarchive(PACKAGE, CALLER_PACKAGE, UserHandle.CURRENT);
+        rule.mocks().getHandler().flush();
 
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mContext).sendOrderedBroadcastAsUser(
@@ -321,30 +365,32 @@
                 /* initialExtras= */ isNull());
         Intent intent = intentCaptor.getValue();
         assertThat(intent.getFlags() & FLAG_RECEIVER_FOREGROUND).isNotEqualTo(0);
-        assertThat(intent.getStringExtra(PackageArchiver.EXTRA_UNARCHIVE_PACKAGE_NAME)).isEqualTo(
+        assertThat(intent.getStringExtra(PackageInstaller.EXTRA_UNARCHIVE_PACKAGE_NAME)).isEqualTo(
                 PACKAGE);
         assertThat(
-                intent.getBooleanExtra(PackageArchiver.EXTRA_UNARCHIVE_ALL_USERS, true)).isFalse();
+                intent.getBooleanExtra(PackageInstaller.EXTRA_UNARCHIVE_ALL_USERS, true)).isFalse();
         assertThat(intent.getPackage()).isEqualTo(INSTALLER_PACKAGE);
     }
 
     private static ArchiveState createArchiveState() {
         List<ArchiveState.ArchiveActivityInfo> activityInfos = new ArrayList<>();
         for (LauncherActivityInfo mainActivity : createLauncherActivities()) {
-            // TODO(b/278553670) Extract and store launcher icons
             ArchiveState.ArchiveActivityInfo activityInfo = new ArchiveState.ArchiveActivityInfo(
                     mainActivity.getLabel().toString(),
-                    Path.of("/TODO"), null);
+                    ICON_PATH, null);
             activityInfos.add(activityInfo);
         }
         return new ArchiveState(activityInfos, INSTALLER_PACKAGE);
     }
 
     private static List<LauncherActivityInfo> createLauncherActivities() {
+        ActivityInfo activityInfo = mock(ActivityInfo.class);
         LauncherActivityInfo activity1 = mock(LauncherActivityInfo.class);
         when(activity1.getLabel()).thenReturn("activity1");
+        when(activity1.getActivityInfo()).thenReturn(activityInfo);
         LauncherActivityInfo activity2 = mock(LauncherActivityInfo.class);
         when(activity2.getLabel()).thenReturn("activity2");
+        when(activity2.getActivityInfo()).thenReturn(activityInfo);
         return List.of(activity1, activity2);
     }
 
diff --git a/services/tests/mockingservicestests/src/com/android/server/tare/AgentTest.java b/services/tests/mockingservicestests/src/com/android/server/tare/AgentTest.java
index 94fff22..a3917765 100644
--- a/services/tests/mockingservicestests/src/com/android/server/tare/AgentTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/tare/AgentTest.java
@@ -55,6 +55,7 @@
     @Mock
     private InternalResourceService mIrs;
 
+    private Agent mAgent;
     private Scribe mScribe;
 
     private static class MockScribe extends Scribe {
@@ -80,10 +81,13 @@
         doReturn(mIrs).when(mIrs).getLock();
         doReturn(mock(AlarmManager.class)).when(mContext).getSystemService(Context.ALARM_SERVICE);
         mScribe = new MockScribe(mIrs, mAnalyst);
+        mAgent = new Agent(mIrs, mScribe, mAnalyst);
     }
 
     @After
     public void tearDown() {
+        mAgent.tearDownLocked();
+
         if (mMockingSession != null) {
             mMockingSession.finishMocking();
         }
@@ -99,7 +103,6 @@
 
         final int userId = 0;
         final String pkgName = "com.test";
-        final Agent agent = new Agent(mIrs, mScribe, mAnalyst);
         final Ledger ledger = mScribe.getLedgerLocked(userId, pkgName);
 
         doReturn(consumptionLimit).when(mIrs).getConsumptionLimitLocked();
@@ -107,66 +110,64 @@
                 .getMaxSatiatedBalance(anyInt(), anyString());
 
         Ledger.Transaction transaction = new Ledger.Transaction(0, 0, 0, null, 5, 10);
-        agent.recordTransactionLocked(userId, pkgName, ledger, transaction, false);
+        mAgent.recordTransactionLocked(userId, pkgName, ledger, transaction, false);
         assertEquals(5, ledger.getCurrentBalance());
         assertEquals(remainingCakes - 10, mScribe.getRemainingConsumableCakesLocked());
 
-        agent.onPackageRemovedLocked(userId, pkgName);
+        mAgent.onPackageRemovedLocked(userId, pkgName);
         assertEquals(remainingCakes - 10, mScribe.getRemainingConsumableCakesLocked());
         assertLedgersEqual(new Ledger(), mScribe.getLedgerLocked(userId, pkgName));
     }
 
     @Test
     public void testRecordTransaction_UnderMax() {
-        Agent agent = new Agent(mIrs, mScribe, mAnalyst);
         Ledger ledger = new Ledger();
 
         doReturn(1_000_000L).when(mIrs).getConsumptionLimitLocked();
         doReturn(1_000_000L).when(mEconomicPolicy).getMaxSatiatedBalance(anyInt(), anyString());
 
         Ledger.Transaction transaction = new Ledger.Transaction(0, 0, 0, null, 5, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(5, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 995, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1000, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -500, 250);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(500, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 999_500L, 500);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1_000_000L, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -1_000_001L, 1000);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(-1, ledger.getCurrentBalance());
     }
 
     @Test
     public void testRecordTransaction_MaxConsumptionLimit() {
-        Agent agent = new Agent(mIrs, mScribe, mAnalyst);
         Ledger ledger = new Ledger();
 
         doReturn(1000L).when(mIrs).getConsumptionLimitLocked();
         doReturn(1_000_000L).when(mEconomicPolicy).getMaxSatiatedBalance(anyInt(), anyString());
 
         Ledger.Transaction transaction = new Ledger.Transaction(0, 0, 0, null, 5, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(5, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 995, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1000, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -500, 250);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(500, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 2000, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(2500, ledger.getCurrentBalance());
 
         // ConsumptionLimit can change as the battery level changes. Ledger balances shouldn't be
@@ -174,57 +175,56 @@
         doReturn(900L).when(mIrs).getConsumptionLimitLocked();
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 100, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(2600, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -50, 50);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(2550, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -200, 100);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(2350, ledger.getCurrentBalance());
 
         doReturn(800L).when(mIrs).getConsumptionLimitLocked();
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 100, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(2450, ledger.getCurrentBalance());
     }
 
     @Test
     public void testRecordTransaction_MaxSatiatedBalance() {
-        Agent agent = new Agent(mIrs, mScribe, mAnalyst);
         Ledger ledger = new Ledger();
 
         doReturn(1_000_000L).when(mIrs).getConsumptionLimitLocked();
         doReturn(1000L).when(mEconomicPolicy).getMaxSatiatedBalance(anyInt(), anyString());
 
         Ledger.Transaction transaction = new Ledger.Transaction(0, 0, 0, null, 5, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(5, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 995, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1000, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -500, 250);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(500, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 999_500L, 1000);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1_000, ledger.getCurrentBalance());
 
         // Shouldn't change in normal operation, but adding test case in case it does.
         doReturn(900L).when(mEconomicPolicy).getMaxSatiatedBalance(anyInt(), anyString());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, 500, 0);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(1_000, ledger.getCurrentBalance());
 
         transaction = new Ledger.Transaction(0, 0, 0, null, -1001, 500);
-        agent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
+        mAgent.recordTransactionLocked(0, "com.test", ledger, transaction, false);
         assertEquals(-1, ledger.getCurrentBalance());
     }
 }
diff --git a/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS b/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS
new file mode 100644
index 0000000..e2c6ce1
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/trust/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/service/trust/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
index 7e638a8..49f22ec 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
@@ -27,6 +27,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.junit.Assert.assertThrows;
+import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -428,6 +429,10 @@
     @SmallTest
     @Test
     public void testChangeMagnificationModeOnTestDisplay_capabilitiesIsAll_transitMode() {
+        // This test only makes sense for devices that support Window magnification
+        assumeTrue(mTestableContext.getPackageManager().hasSystemFeature(
+                PackageManager.FEATURE_WINDOW_MAGNIFICATION));
+
         final AccessibilityUserState userState = mA11yms.mUserStates.get(
                 mA11yms.getCurrentUserIdLocked());
         userState.setMagnificationCapabilitiesLocked(
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
index 6c7b995..3808f30 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/ProxyManagerTest.java
@@ -23,7 +23,14 @@
 import static com.android.server.accessibility.ProxyManager.PROXY_COMPONENT_CLASS_NAME;
 import static com.android.server.accessibility.ProxyManager.PROXY_COMPONENT_PACKAGE_NAME;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import android.accessibilityservice.AccessibilityGestureEvent;
 import android.accessibilityservice.AccessibilityServiceInfo;
@@ -40,6 +47,9 @@
 import android.os.IBinder;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
 import android.util.ArraySet;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -48,6 +58,8 @@
 import android.view.accessibility.IAccessibilityManagerClient;
 import android.view.inputmethod.EditorInfo;
 
+import androidx.test.InstrumentationRegistry;
+
 import com.android.internal.R;
 import com.android.internal.inputmethod.IAccessibilityInputMethodSession;
 import com.android.internal.inputmethod.IAccessibilityInputMethodSessionCallback;
@@ -58,20 +70,12 @@
 import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
 import com.android.server.wm.WindowManagerInternal;
 
-import static com.google.common.truth.Truth.assertThat;
-
-import androidx.test.InstrumentationRegistry;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 
 import java.util.ArrayList;
@@ -87,6 +91,9 @@
     private static final int DEVICE_ID = 10;
     private static final int STREAMED_CALLING_UID = 9876;
 
+    @Rule
+    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
     @Mock private Context mMockContext;
     @Mock private AccessibilitySecurityPolicy mMockSecurityPolicy;
     @Mock private AccessibilityWindowManager mMockA11yWindowManager;
@@ -218,6 +225,40 @@
     }
 
     /**
+     * Tests that the manager's AppsOnVirtualDeviceListener implementation propagates the running
+     * app changes to the proxy device.
+     */
+    @Test
+    @RequiresFlagsEnabled(Flags.FLAG_PROXY_USE_APPS_ON_VIRTUAL_DEVICE_LISTENER)
+    public void testUpdateProxyOfRunningAppsChange_changedUidIsStreamedApp_propagatesChange() {
+        final VirtualDeviceManagerInternal localVdm =
+                Mockito.mock(VirtualDeviceManagerInternal.class);
+        when(localVdm.getDeviceIdsForUid(anyInt())).thenReturn(new ArraySet(Set.of(DEVICE_ID)));
+
+        mProxyManager.setLocalVirtualDeviceManager(localVdm);
+        registerProxy(DISPLAY_ID);
+        verify(localVdm).registerAppsOnVirtualDeviceListener(any());
+
+        final ArraySet<Integer> runningUids = new ArraySet(Set.of(STREAMED_CALLING_UID));
+
+        // Flush any existing messages. The messages after this come from onProxyChanged.
+        mMessageCapturingHandler.sendAllMessages();
+
+        // The virtual device has been updated with the streamed app's UID, so the proxy is
+        // updated.
+        mProxyManager.notifyProxyOfRunningAppsChange(runningUids);
+
+        verify(localVdm).getDeviceIdsForUid(STREAMED_CALLING_UID);
+        verify(mMockProxySystemSupport).getCurrentUserClientsLocked();
+        verify(mMockProxySystemSupport).getGlobalClientsLocked();
+        // Messages to notify IAccessibilityManagerClients should be posted.
+        assertThat(mMessageCapturingHandler.hasMessages()).isTrue();
+
+        mProxyManager.unregisterProxy(DISPLAY_ID);
+        verify(localVdm).unregisterAppsOnVirtualDeviceListener(any());
+    }
+
+    /**
      * Tests that getting the first device id for an app uid, such as when an app queries for
      * device-specific state, returns the right device id.
      */
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
index 769be17..0f3daec 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthSessionTest.java
@@ -182,7 +182,8 @@
                     eq(TEST_PACKAGE),
                     eq(TEST_REQUEST_ID),
                     eq(sensor.getCookie()),
-                    anyBoolean() /* allowBackgroundAuthentication */);
+                    anyBoolean() /* allowBackgroundAuthentication */,
+                    anyBoolean() /* isForLegacyFingerprintManager */);
         }
 
         final int cookie1 = session.mPreAuthInfo.eligibleSensors.get(0).getCookie();
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java
new file mode 100644
index 0000000..f4e5faa
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsBroadcastReceiverTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.biometrics;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyFloat;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anySet;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static java.util.Collections.emptySet;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.res.Resources;
+import android.hardware.biometrics.BiometricsProtoEnums;
+import android.os.UserHandle;
+
+import com.android.internal.R;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+import java.io.File;
+import java.util.function.Consumer;
+
+public class AuthenticationStatsBroadcastReceiverTest {
+
+    @Rule
+    public MockitoRule mockitoRule = MockitoJUnit.rule();
+
+    private AuthenticationStatsBroadcastReceiver mBroadcastReceiver;
+    private static final float FRR_THRESHOLD = 0.2f;
+    private static final int USER_ID_1 = 1;
+
+    @Mock
+    Context mContext;
+    @Mock
+    private Resources mResources;
+    @Mock
+    private SharedPreferences mSharedPreferences;
+    @Mock
+    private SharedPreferences.Editor mEditor;
+    @Mock
+    Intent mIntent;
+    @Mock
+    Consumer<AuthenticationStatsCollector> mCallback;
+
+    @Captor
+    private ArgumentCaptor<AuthenticationStatsCollector> mArgumentCaptor;
+
+    @Before
+    public void setUp() {
+
+        when(mContext.getResources()).thenReturn(mResources);
+        when(mResources.getFraction(eq(R.fraction.config_biometricNotificationFrrThreshold),
+                anyInt(), anyInt())).thenReturn(FRR_THRESHOLD);
+        when(mContext.getSharedPreferences(any(File.class), anyInt()))
+                .thenReturn(mSharedPreferences);
+        when(mSharedPreferences.getStringSet(anyString(), anySet())).thenReturn(emptySet());
+        when(mSharedPreferences.edit()).thenReturn(mEditor);
+        when(mEditor.putFloat(anyString(), anyFloat())).thenReturn(mEditor);
+        when(mEditor.putStringSet(anyString(), anySet())).thenReturn(mEditor);
+
+        when(mIntent.getAction()).thenReturn(Intent.ACTION_USER_UNLOCKED);
+        when(mIntent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL))
+                .thenReturn(USER_ID_1);
+
+        mBroadcastReceiver = new AuthenticationStatsBroadcastReceiver(mContext,
+                BiometricsProtoEnums.MODALITY_FINGERPRINT, mCallback);
+    }
+
+    @Test
+    public void testRegisterReceiver() {
+        verify(mContext).registerReceiver(eq(mBroadcastReceiver), any());
+    }
+
+    @Test
+    public void testOnReceive_shouldInitializeAuthenticationStatsCollector() {
+        mBroadcastReceiver.onReceive(mContext, mIntent);
+
+        // Verify AuthenticationStatsCollector is initialized
+        verify(mCallback).accept(mArgumentCaptor.capture());
+        assertThat(mArgumentCaptor.getValue()).isNotNull();
+
+        // Verify receiver is unregistered after receiving the broadcast
+        verify(mContext).unregisterReceiver(mBroadcastReceiver);
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
index 0b730f1..a11a8f5 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/AuthenticationStatsCollectorTest.java
@@ -104,6 +104,7 @@
         when(mSharedPreferences.getStringSet(anyString(), anySet())).thenReturn(emptySet());
         when(mSharedPreferences.edit()).thenReturn(mEditor);
         when(mEditor.putFloat(anyString(), anyFloat())).thenReturn(mEditor);
+        when(mEditor.putStringSet(anyString(), anySet())).thenReturn(mEditor);
 
         mAuthenticationStatsCollector = new AuthenticationStatsCollector(mContext,
                 0 /* modality */, mBiometricNotification);
@@ -115,6 +116,11 @@
         // Assert that the user doesn't exist in the map initially.
         assertThat(mAuthenticationStatsCollector.getAuthenticationStatsForUser(USER_ID_1)).isNull();
 
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT))
+                .thenReturn(true);
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true);
+        when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
+
         mAuthenticationStatsCollector.authenticate(USER_ID_1, true /* authenticated */);
 
         AuthenticationStats authenticationStats =
@@ -130,6 +136,11 @@
         // Assert that the user doesn't exist in the map initially.
         assertThat(mAuthenticationStatsCollector.getAuthenticationStatsForUser(USER_ID_1)).isNull();
 
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT))
+                .thenReturn(true);
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true);
+        when(mFingerprintManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
+
         mAuthenticationStatsCollector.authenticate(USER_ID_1, false /* authenticated */);
 
         AuthenticationStats authenticationStats =
@@ -176,6 +187,11 @@
                         40 /* rejectedAttempts */, 0 /* enrollmentNotifications */,
                         0 /* modality */));
 
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT))
+                .thenReturn(true);
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true);
+        when(mFingerprintManager.hasEnrolledTemplates(anyInt())).thenReturn(true);
+
         mAuthenticationStatsCollector.authenticate(USER_ID_1, false /* authenticated */);
 
         // Assert that no notification should be sent.
@@ -233,13 +249,13 @@
         // Assert that no notification should be sent.
         verify(mBiometricNotification, never()).sendFaceEnrollNotification(any());
         verify(mBiometricNotification, never()).sendFpEnrollNotification(any());
-        // Assert that data has been reset.
+        // Assert that data hasn't been reset.
         AuthenticationStats authenticationStats = mAuthenticationStatsCollector
                 .getAuthenticationStatsForUser(USER_ID_1);
-        assertThat(authenticationStats.getTotalAttempts()).isEqualTo(0);
-        assertThat(authenticationStats.getRejectedAttempts()).isEqualTo(0);
+        assertThat(authenticationStats.getTotalAttempts()).isEqualTo(500);
+        assertThat(authenticationStats.getRejectedAttempts()).isEqualTo(400);
         assertThat(authenticationStats.getEnrollmentNotifications()).isEqualTo(0);
-        assertThat(authenticationStats.getFrr()).isWithin(0f).of(-1.0f);
+        assertThat(authenticationStats.getFrr()).isWithin(0f).of(0.8f);
     }
 
     @Test
@@ -260,13 +276,13 @@
         // Assert that no notification should be sent.
         verify(mBiometricNotification, never()).sendFaceEnrollNotification(any());
         verify(mBiometricNotification, never()).sendFpEnrollNotification(any());
-        // Assert that data has been reset.
+        // Assert that data hasn't been reset.
         AuthenticationStats authenticationStats = mAuthenticationStatsCollector
                 .getAuthenticationStatsForUser(USER_ID_1);
-        assertThat(authenticationStats.getTotalAttempts()).isEqualTo(0);
-        assertThat(authenticationStats.getRejectedAttempts()).isEqualTo(0);
+        assertThat(authenticationStats.getTotalAttempts()).isEqualTo(500);
+        assertThat(authenticationStats.getRejectedAttempts()).isEqualTo(400);
         assertThat(authenticationStats.getEnrollmentNotifications()).isEqualTo(0);
-        assertThat(authenticationStats.getFrr()).isWithin(0f).of(-1.0f);
+        assertThat(authenticationStats.getFrr()).isWithin(0f).of(0.8f);
     }
 
     @Test
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java b/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
index e79ac09..0230d77 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
@@ -598,7 +598,8 @@
                 anyString() /* opPackageName */,
                 eq(TEST_REQUEST_ID),
                 cookieCaptor.capture() /* cookie */,
-                anyBoolean() /* allowBackgroundAuthentication */);
+                anyBoolean() /* allowBackgroundAuthentication */,
+                anyBoolean() /* isForLegacyFingerprintManager */);
 
         // onReadyForAuthentication, mAuthSession state OK
         mBiometricService.mImpl.onReadyForAuthentication(TEST_REQUEST_ID, cookieCaptor.getValue());
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
index 046b01c..9e5a047 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/FaceAuthenticationClientTest.java
@@ -36,6 +36,7 @@
 import android.app.ActivityManager;
 import android.app.ActivityTaskManager;
 import android.content.ComponentName;
+import android.hardware.biometrics.BiometricManager;
 import android.hardware.biometrics.common.AuthenticateReason;
 import android.hardware.biometrics.common.ICancellationSignal;
 import android.hardware.biometrics.common.OperationContext;
@@ -109,6 +110,8 @@
     private ICancellationSignal mCancellationSignal;
     @Mock
     private AuthSessionCoordinator mAuthSessionCoordinator;
+    @Mock
+    private BiometricManager mBiometricManager;
     @Captor
     private ArgumentCaptor<OperationContextExt> mOperationContextCaptor;
     @Captor
@@ -119,6 +122,7 @@
 
     @Before
     public void setup() {
+        mContext.addMockSystemService(BiometricManager.class, mBiometricManager);
         when(mBiometricContext.updateContext(any(), anyBoolean())).thenAnswer(
                 i -> i.getArgument(0));
         when(mBiometricContext.getAuthSessionCoordinator()).thenReturn(mAuthSessionCoordinator);
@@ -212,11 +216,44 @@
                 .onError(anyInt(), anyInt(), eq(BIOMETRIC_ERROR_CANCELED), anyInt());
     }
 
+    @Test
+    public void testOnAuthenticatedFalseWhenListenerIsNull() throws RemoteException {
+        final FaceAuthenticationClient client = createClientWithNullListener();
+        client.start(mCallback);
+        client.onAuthenticated(new Face("friendly", 1 /* faceId */, 2 /* deviceId */),
+                false /* authenticated */, new ArrayList<>());
+
+        verify(mCallback).onClientFinished(client, true);
+    }
+
+    @Test
+    public void testOnAuthenticatedTrueWhenListenerIsNull() throws RemoteException {
+        final FaceAuthenticationClient client = createClientWithNullListener();
+        client.start(mCallback);
+        client.onAuthenticated(new Face("friendly", 1 /* faceId */, 2 /* deviceId */),
+                true /* authenticated */, new ArrayList<>());
+
+        verify(mCallback).onClientFinished(client, true);
+    }
+
     private FaceAuthenticationClient createClient() throws RemoteException {
-        return createClient(2 /* version */);
+        return createClient(2 /* version */, mClientMonitorCallbackConverter,
+                false /* allowBackgroundAuthentication */);
+    }
+
+    private FaceAuthenticationClient createClientWithNullListener() throws RemoteException {
+        return createClient(2 /* version */, null /* listener */,
+                true /* allowBackgroundAuthentication */);
     }
 
     private FaceAuthenticationClient createClient(int version) throws RemoteException {
+        return createClient(version, mClientMonitorCallbackConverter,
+                false /* allowBackgroundAuthentication */);
+    }
+
+    private FaceAuthenticationClient createClient(int version,
+            ClientMonitorCallbackConverter listener,
+            boolean allowBackgroundAuthentication) throws RemoteException {
         when(mHal.getInterfaceVersion()).thenReturn(version);
 
         final AidlSession aidl = new AidlSession(version, mHal, USER_ID, mHalSessionCallback);
@@ -229,11 +266,11 @@
                         FaceAuthenticateOptions.AUTHENTICATE_REASON_ASSISTANT_VISIBLE)
                 .build();
         return new FaceAuthenticationClient(mContext, () -> aidl, mToken,
-                2 /* requestId */, mClientMonitorCallbackConverter, OP_ID,
+                2 /* requestId */, listener, OP_ID,
                 false /* restricted */, options, 4 /* cookie */,
                 false /* requireConfirmation */,
                 mBiometricLogger, mBiometricContext, true /* isStrongBiometric */,
-                mUsageStats, null /* mLockoutCache */, false /* allowBackgroundAuthentication */,
+                mUsageStats, null /* mLockoutCache */, allowBackgroundAuthentication,
                 null /* sensorPrivacyManager */, 0 /* biometricStrength */) {
             @Override
             protected ActivityTaskManager getActivityTaskManager() {
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
index 46af905..8a11e31 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintAuthenticationClientTest.java
@@ -392,7 +392,6 @@
         final ActivityManager.RunningTaskInfo topTask = new ActivityManager.RunningTaskInfo();
         topTask.topActivity = new ComponentName("other", "thing");
         when(mActivityTaskManager.getTasks(anyInt())).thenReturn(List.of(topTask));
-        when(mHal.authenticateWithContext(anyLong(), any())).thenReturn(mCancellationSignal);
 
         final FingerprintAuthenticationClient client = createClientWithoutBackgroundAuth();
         client.start(mCallback);
@@ -406,21 +405,50 @@
                 .onError(anyInt(), anyInt(), eq(BIOMETRIC_ERROR_CANCELED), anyInt());
     }
 
+    @Test
+    public void testOnAuthenticatedFalseWhenListenerIsNull() throws RemoteException {
+        final FingerprintAuthenticationClient client = createClientWithNullListener();
+        client.start(mCallback);
+        client.onAuthenticated(new Fingerprint("friendly", 1 /* fingerId */,
+                        2 /* deviceId */), false /* authenticated */, new ArrayList<>());
+
+        verify(mCallback, never()).onClientFinished(eq(client), anyBoolean());
+    }
+
+    @Test
+    public void testOnAuthenticatedTrueWhenListenerIsNull() throws RemoteException {
+        final FingerprintAuthenticationClient client = createClientWithNullListener();
+        client.start(mCallback);
+        client.onAuthenticated(new Fingerprint("friendly", 1 /* fingerId */,
+                2 /* deviceId */), true /* authenticated */, new ArrayList<>());
+
+        verify(mCallback).onClientFinished(client, true);
+    }
+
     private FingerprintAuthenticationClient createClient() throws RemoteException {
-        return createClient(100 /* version */, true /* allowBackgroundAuthentication */);
+        return createClient(100 /* version */, true /* allowBackgroundAuthentication */,
+                mClientMonitorCallbackConverter);
     }
 
     private FingerprintAuthenticationClient createClientWithoutBackgroundAuth()
             throws RemoteException {
-        return createClient(100 /* version */, false /* allowBackgroundAuthentication */);
+        return createClient(100 /* version */, false /* allowBackgroundAuthentication */,
+                mClientMonitorCallbackConverter);
     }
 
     private FingerprintAuthenticationClient createClient(int version) throws RemoteException {
-        return createClient(version, true /* allowBackgroundAuthentication */);
+        return createClient(version, true /* allowBackgroundAuthentication */,
+                mClientMonitorCallbackConverter);
+    }
+
+    private FingerprintAuthenticationClient createClientWithNullListener() throws RemoteException {
+        return createClient(100 /* version */, true /* allowBackgroundAuthentication */,
+                null /* listener */);
     }
 
     private FingerprintAuthenticationClient createClient(int version,
-            boolean allowBackgroundAuthentication) throws RemoteException {
+            boolean allowBackgroundAuthentication, ClientMonitorCallbackConverter listener)
+            throws RemoteException {
         when(mHal.getInterfaceVersion()).thenReturn(version);
 
         final AidlSession aidl = new AidlSession(version, mHal, USER_ID, mHalSessionCallback);
@@ -430,7 +458,7 @@
                 .setSensorId(9)
                 .build();
         return new FingerprintAuthenticationClient(mContext, () -> aidl, mToken,
-                REQUEST_ID, mClientMonitorCallbackConverter, OP_ID,
+                REQUEST_ID, listener, OP_ID,
                 false /* restricted */, options, 4 /* cookie */,
                 false /* requireConfirmation */,
                 mBiometricLogger, mBiometricContext,
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
index 20d5f93..78d3a9d 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintDetectClientTest.java
@@ -19,6 +19,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.never;
@@ -147,6 +148,24 @@
         verify(mBiometricContext).unsubscribe(same(mOperationContextCaptor.getValue()));
     }
 
+    @Test
+    public void testWhenListenerIsNull() {
+        final AidlSession aidl = new AidlSession(0, mHal, USER_ID, mHalSessionCallback);
+        final FingerprintDetectClient client =  new FingerprintDetectClient(mContext, () -> aidl,
+                mToken, 6 /* requestId */, null /* listener */,
+                new FingerprintAuthenticateOptions.Builder()
+                        .setUserId(2)
+                        .setSensorId(1)
+                        .setOpPackageName("a-test")
+                        .build(),
+                mBiometricLogger, mBiometricContext,
+                mUdfpsOverlayController, true /* isStrongBiometric */);
+        client.start(mCallback);
+        client.onInteractionDetected();
+
+        verify(mCallback).onClientFinished(eq(client), anyBoolean());
+    }
+
     private FingerprintDetectClient createClient() throws RemoteException {
         return createClient(200 /* version */);
     }
diff --git a/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java b/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
index 78655a5..c40ad28 100644
--- a/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
@@ -79,9 +79,9 @@
                         SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS,
                         /* allowedUsers= */ new ArraySet<>(),
                         /* activityLaunchAllowedByDefault= */ true,
-                        /* activityPolicyExceptions= */ new ArraySet<>(),
+                        /* activityPolicyExemptions= */ new ArraySet<>(),
                         /* crossTaskNavigationAllowedByDefault= */ true,
-                        /* crossTaskNavigationExceptions= */ new ArraySet<>(),
+                        /* crossTaskNavigationExemptions= */ new ArraySet<>(),
                         /* activityListener= */ null,
                         /* pipBlockedCallback= */ null,
                         /* activityBlockedCallback= */ null,
diff --git a/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java b/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java
new file mode 100644
index 0000000..75d71da
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/media/BluetoothRouteControllerTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media;
+
+import static com.android.media.flags.Flags.FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER;
+
+import android.content.Context;
+import android.platform.test.annotations.RequiresFlagsDisabled;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import com.google.common.truth.Truth;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class BluetoothRouteControllerTest {
+
+    private final BluetoothRouteController.BluetoothRoutesUpdatedListener
+            mBluetoothRoutesUpdatedListener = routes -> {
+                // Empty on purpose.
+            };
+
+    @Rule
+    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        mContext = InstrumentationRegistry.getInstrumentation().getContext();
+    }
+
+    @Test
+    @RequiresFlagsDisabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+    public void createInstance_audioPoliciesFlagIsDisabled_createsLegacyController() {
+        BluetoothRouteController deviceRouteController =
+                BluetoothRouteController.createInstance(mContext, mBluetoothRoutesUpdatedListener);
+
+        Truth.assertThat(deviceRouteController).isInstanceOf(LegacyBluetoothRouteController.class);
+    }
+
+    @Test
+    @RequiresFlagsEnabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+    public void createInstance_audioPoliciesFlagIsEnabled_createsAudioPoliciesController() {
+        BluetoothRouteController deviceRouteController =
+                BluetoothRouteController.createInstance(mContext, mBluetoothRoutesUpdatedListener);
+
+        Truth.assertThat(deviceRouteController)
+                .isInstanceOf(AudioPoliciesBluetoothRouteController.class);
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java b/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java
new file mode 100644
index 0000000..ec4b8a8
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/media/DeviceRouteControllerTest.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.media;
+
+import static com.android.media.flags.Flags.FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER;
+
+import android.content.Context;
+import android.platform.test.annotations.RequiresFlagsDisabled;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import com.google.common.truth.Truth;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class DeviceRouteControllerTest {
+
+    private final DeviceRouteController.OnDeviceRouteChangedListener mOnDeviceRouteChangedListener =
+            deviceRoute -> {
+                // Empty on purpose.
+            };
+
+    @Rule
+    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
+    private Context mContext;
+
+    @Before
+    public void setUp() {
+        mContext = InstrumentationRegistry.getInstrumentation().getContext();
+    }
+
+    @Test
+    @RequiresFlagsDisabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+    public void createInstance_audioPoliciesFlagIsDisabled_createsLegacyController() {
+        DeviceRouteController deviceRouteController =
+                DeviceRouteController.createInstance(mContext, mOnDeviceRouteChangedListener);
+
+        Truth.assertThat(deviceRouteController).isInstanceOf(LegacyDeviceRouteController.class);
+    }
+
+    @Test
+    @RequiresFlagsEnabled(FLAG_ENABLE_AUDIO_POLICIES_DEVICE_AND_BLUETOOTH_CONTROLLER)
+    public void createInstance_audioPoliciesFlagIsEnabled_createsAudioPoliciesController() {
+        DeviceRouteController deviceRouteController =
+                DeviceRouteController.createInstance(mContext, mOnDeviceRouteChangedListener);
+
+        Truth.assertThat(deviceRouteController)
+                .isInstanceOf(AudioPoliciesDeviceRouteController.class);
+    }
+}
diff --git a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
index ddd1221..b0fd606 100644
--- a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
@@ -202,6 +202,24 @@
     }
 
     @Test
+    public void testCreateProjection_priorProjectionGrant() throws NameNotFoundException {
+        // Create a first projection.
+        MediaProjectionManagerService.MediaProjection projection = startProjectionPreconditions();
+        FakeIMediaProjectionCallback callback1 = new FakeIMediaProjectionCallback();
+        projection.start(callback1);
+
+        // Create a second projection.
+        MediaProjectionManagerService.MediaProjection secondProjection =
+                startProjectionPreconditions();
+        FakeIMediaProjectionCallback callback2 = new FakeIMediaProjectionCallback();
+        secondProjection.start(callback2);
+
+        // Check that the second projection's callback hasn't been stopped.
+        assertThat(callback1.mStopped).isTrue();
+        assertThat(callback2.mStopped).isFalse();
+    }
+
+    @Test
     public void testCreateProjection_attemptReuse_noPriorProjectionGrant()
             throws NameNotFoundException {
         // Create a first projection.
@@ -785,8 +803,11 @@
     }
 
     private static class FakeIMediaProjectionCallback extends IMediaProjectionCallback.Stub {
+        boolean mStopped = false;
+
         @Override
         public void onStop() throws RemoteException {
+            mStopped = true;
         }
 
         @Override
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
index 2273fcd..9f75cf8 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
@@ -113,6 +113,42 @@
         assertUserInfoEquals(data.info, read.info, /* parcelCopy= */ false);
     }
 
+    /** Tests that device policy restrictions are written/read properly. */
+    @Test
+    public void testWriteReadDevicePolicyUserRestrictions() throws Exception {
+        final String globalRestriction = UserManager.DISALLOW_FACTORY_RESET;
+        final String localRestriction = UserManager.DISALLOW_CONFIG_DATE_TIME;
+
+        UserData data = new UserData();
+        data.info = createUser(100, FLAG_FULL, "A type");
+
+        mUserManagerService.putUserInfo(data.info);
+
+        // Set a global and user restriction so they get written out to the user file.
+        setUserRestrictions(data.info.id, globalRestriction, localRestriction, true);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DataOutputStream out = new DataOutputStream(baos);
+        mUserManagerService.writeUserLP(data, out);
+        byte[] bytes = baos.toByteArray();
+
+        // Clear the restrictions to see if they are properly read in from the user file.
+        setUserRestrictions(data.info.id, globalRestriction, localRestriction, false);
+
+        mUserManagerService.readUserLP(data.info.id, new ByteArrayInputStream(bytes));
+        assertTrue(mUserManagerService.hasUserRestrictionOnAnyUser(globalRestriction));
+        assertTrue(mUserManagerService.hasUserRestrictionOnAnyUser(localRestriction));
+    }
+
+    /** Sets a global and local restriction and verifies they were set properly **/
+    private void setUserRestrictions(int id, String global, String local, boolean enabled) {
+        mUserManagerService.setUserRestrictionInner(UserHandle.USER_ALL, global, enabled);
+        assertEquals(mUserManagerService.hasUserRestrictionOnAnyUser(global), enabled);
+
+        mUserManagerService.setUserRestrictionInner(id, local, enabled);
+        assertEquals(mUserManagerService.hasUserRestrictionOnAnyUser(local), enabled);
+    }
+
     @Test
     public void testParcelUnparcelUserInfo() throws Exception {
         UserInfo info = createUser();
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index cb0a615..4576e9b 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -22,6 +22,8 @@
 import static android.app.ActivityManagerInternal.ServiceNotificationPolicy.SHOW_IMMEDIATELY;
 import static android.app.ActivityTaskManager.INVALID_TASK_ID;
 import static android.app.Notification.EXTRA_ALLOW_DURING_SETUP;
+import static android.app.Notification.EXTRA_PICTURE;
+import static android.app.Notification.EXTRA_PICTURE_ICON;
 import static android.app.Notification.FLAG_AUTO_CANCEL;
 import static android.app.Notification.FLAG_BUBBLE;
 import static android.app.Notification.FLAG_CAN_COLORIZE;
@@ -30,7 +32,6 @@
 import static android.app.Notification.FLAG_ONGOING_EVENT;
 import static android.app.Notification.FLAG_ONLY_ALERT_ONCE;
 import static android.app.Notification.FLAG_USER_INITIATED_JOB;
-import static android.app.Notification.GROUP_KEY_SILENT;
 import static android.app.NotificationChannel.USER_LOCKED_ALLOW_BUBBLE;
 import static android.app.NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED;
 import static android.app.NotificationManager.BUBBLE_PREFERENCE_ALL;
@@ -89,6 +90,7 @@
 import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER;
 import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER;
 import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER;
+import static com.android.server.notification.NotificationManagerService.BITMAP_EXPIRATION_TIME_MS;
 import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE;
 import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_ADJUSTED;
 import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_POSTED;
@@ -11285,114 +11287,142 @@
                 r.getSbn().getId(), r.getSbn().getTag(), r, false, false)).isTrue();
     }
 
-    @Test
-    public void testIsBigPictureWithBitmapOrIcon_notBigPicture_false() {
-        Notification n = new Notification.Builder(mContext).build();
+    private NotificationRecord createBigPictureRecord(boolean isBigPictureStyle, boolean hasImage,
+                                                      boolean isImageBitmap, boolean isExpired) {
+        Notification.Builder builder = new Notification.Builder(mContext);
+        Notification.BigPictureStyle style = new Notification.BigPictureStyle();
 
-        assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isFalse();
-    }
+        if (isBigPictureStyle && hasImage) {
+            if (isImageBitmap) {
+                style = style.bigPicture(Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888));
+            } else {
+                style = style.bigPicture(Icon.createWithResource(mContext, R.drawable.btn_plus));
+            }
+        }
+        if (isBigPictureStyle) {
+            builder.setStyle(style);
+        }
 
-    @Test
-    public void testIsBigPictureWithBitmapOrIcon_bigPictureWithBitmap_true() {
-        Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
+        Notification notification = builder.setChannelId(TEST_CHANNEL_ID).build();
 
-        Notification n = new Notification.Builder(mContext)
-                .setStyle(new Notification.BigPictureStyle().bigPicture(bitmap))
-                .build();
-
-        assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isTrue();
-    }
-
-    @Test
-    public void testIsBigPictureWithBitmapOrIcon_bigPictureWithIcon_true() {
-        Icon icon = Icon.createWithResource(mContext, R.drawable.btn_plus);
-
-        Notification n = new Notification.Builder(mContext)
-                .setStyle(new Notification.BigPictureStyle().bigPicture(icon))
-                .build();
-
-        assertThat(mService.isBigPictureWithBitmapOrIcon(n)).isTrue();
-    }
-
-    @Test
-    public void testIsBitmapExpired_notExpired_false() {
-        final boolean result = mService.isBitmapExpired(
-                /* timePosted= */ 0,
-                /* timeNow= */ 1,
-                /* timeToLive= */ 2);
-        assertThat(result).isFalse();
-    }
-
-    @Test
-    public void testIsBitmapExpired_expired_true() {
-        final boolean result = mService.isBitmapExpired(
-                /* timePosted= */ 0,
-                /* timeNow= */ 2,
-                /* timeToLive= */ 1);
-        assertThat(result).isTrue();
-    }
-
-    @Test
-    public void testRemoveBitmapAndRepost_removeBitmapFromExtras() {
-        // Create big picture NotificationRecord with bitmap
-        Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
-
-        Notification n = new Notification.Builder(mContext, "test")
-                .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(bitmap))
-                .build();
-
+        long timePostedMs = System.currentTimeMillis();
+        if (isExpired) {
+            timePostedMs -= BITMAP_EXPIRATION_TIME_MS;
+        }
         StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
-                n, UserHandle.getUserHandleForUid(mUid), null, 0);
+                notification, UserHandle.getUserHandleForUid(mUid), null, timePostedMs);
 
-        NotificationRecord bigPictureRecord =
-                new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+        return new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+    }
 
-        mService.removeBitmapAndRepost(bigPictureRecord);
-
-        Bitmap bitmapExtra = bigPictureRecord.getNotification().extras.getParcelable(
-                Notification.EXTRA_PICTURE, Bitmap.class);
-        assertThat(bitmapExtra).isNull();
+    private void addRecordAndRemoveBitmaps(NotificationRecord record) {
+        mService.addNotification(record);
+        mInternalService.removeBitmaps();
+        waitForIdle();
     }
 
     @Test
-    public void testRemoveBitmapAndRepost_removeIconFromExtras() {
-        // Create big picture NotificationRecord with Icon
-        Icon icon = Icon.createWithResource(mContext, R.drawable.btn_plus);
-
-        Notification n = new Notification.Builder(mContext, "test")
-                .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(icon))
-                .build();
-
-        StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
-                n, UserHandle.getUserHandleForUid(mUid), null, 0);
-
-        NotificationRecord bigPictureRecord =
-                new NotificationRecord(mContext, sbn, mTestNotificationChannel);
-
-        mService.removeBitmapAndRepost(bigPictureRecord);
-
-        Icon iconExtra = bigPictureRecord.getNotification().extras.getParcelable(
-                Notification.EXTRA_PICTURE_ICON, Icon.class);
-        assertThat(iconExtra).isNull();
+    public void testRemoveBitmaps_notBigPicture_noRepost() {
+        addRecordAndRemoveBitmaps(
+                createBigPictureRecord(
+                        /* isBigPictureStyle= */ false,
+                        /* hasImage= */ false,
+                        /* isImageBitmap= */ false,
+                        /* isExpired= */ false));
+        verify(mWorkerHandler, never())
+                .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
     }
 
     @Test
-    public void testRemoveBitmapAndRepost_flagOnlyAlertOnce() {
-        Bitmap bitmap = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);
+    public void testRemoveBitmaps_bigPictureNoImage_noRepost() {
+        addRecordAndRemoveBitmaps(
+                createBigPictureRecord(
+                        /* isBigPictureStyle= */ true,
+                        /* hasImage= */ false,
+                        /* isImageBitmap= */ false,
+                        /* isExpired= */ false));
+        verify(mWorkerHandler, never())
+                .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
+    }
 
-        Notification n = new Notification.Builder(mContext, "test")
-                .setStyle(new android.app.Notification.BigPictureStyle().bigPicture(bitmap))
-                .build();
+    @Test
+    public void testRemoveBitmaps_notExpired_noRepost() {
+        addRecordAndRemoveBitmaps(
+                createBigPictureRecord(
+                        /* isBigPictureStyle= */ true,
+                        /* hasImage= */ true,
+                        /* isImageBitmap= */ true,
+                        /* isExpired= */ false));
+        verify(mWorkerHandler, never())
+                .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
+    }
 
-        StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0,
-                n, UserHandle.getUserHandleForUid(mUid), null, 0);
+    @Test
+    public void testRemoveBitmaps_bitmapExpired_repost() {
+        addRecordAndRemoveBitmaps(
+                createBigPictureRecord(
+                        /* isBigPictureStyle= */ true,
+                        /* hasImage= */ true,
+                        /* isImageBitmap= */ true,
+                        /* isExpired= */ true));
+        verify(mWorkerHandler, times(1))
+                .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
+    }
 
-        NotificationRecord bigPictureRecord =
-                new NotificationRecord(mContext, sbn, mTestNotificationChannel);
+    @Test
+    public void testRemoveBitmaps_bitmapExpired_bitmapGone() {
+        NotificationRecord record = createBigPictureRecord(
+                /* isBigPictureStyle= */ true,
+                /* hasImage= */ true,
+                /* isImageBitmap= */ true,
+                /* isExpired= */ true);
+        addRecordAndRemoveBitmaps(record);
+        assertThat(record.getNotification().extras.containsKey(EXTRA_PICTURE)).isFalse();
+    }
 
-        mService.removeBitmapAndRepost(bigPictureRecord);
+    @Test
+    public void testRemoveBitmaps_bitmapExpired_silent() {
+        NotificationRecord record = createBigPictureRecord(
+                /* isBigPictureStyle= */ true,
+                /* hasImage= */ true,
+                /* isImageBitmap= */ true,
+                /* isExpired= */ true);
+        addRecordAndRemoveBitmaps(record);
+        assertThat(record.getNotification().flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
+    }
 
-        assertThat(n.flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
+    @Test
+    public void testRemoveBitmaps_iconExpired_repost() {
+        addRecordAndRemoveBitmaps(
+                createBigPictureRecord(
+                        /* isBigPictureStyle= */ true,
+                        /* hasImage= */ true,
+                        /* isImageBitmap= */ false,
+                        /* isExpired= */ true));
+        verify(mWorkerHandler, times(1))
+                .post(any(NotificationManagerService.EnqueueNotificationRunnable.class));
+    }
+
+    @Test
+    public void testRemoveBitmaps_iconExpired_iconGone() {
+        NotificationRecord record = createBigPictureRecord(
+                /* isBigPictureStyle= */ true,
+                /* hasImage= */ true,
+                /* isImageBitmap= */ false,
+                /* isExpired= */ true);
+        addRecordAndRemoveBitmaps(record);
+        assertThat(record.getNotification().extras.containsKey(EXTRA_PICTURE_ICON)).isFalse();
+    }
+
+    @Test
+    public void testRemoveBitmaps_iconExpired_silent() {
+        NotificationRecord record = createBigPictureRecord(
+                /* isBigPictureStyle= */ true,
+                /* hasImage= */ true,
+                /* isImageBitmap= */ false,
+                /* isExpired= */ true);
+        addRecordAndRemoveBitmaps(record);
+        assertThat(record.getNotification().flags & FLAG_ONLY_ALERT_ONCE).isNotEqualTo(0);
     }
 
     @Test
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 42e3383..d6a3877 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -47,6 +47,8 @@
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.MANAGE_MEDIA_PROJECTION"/>
+    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"/>
+
 
     <!-- TODO: Remove largeHeap hack when memory leak is fixed (b/123984854) -->
     <application android:debuggable="true"
@@ -104,6 +106,11 @@
             android:showWhenLocked="true"
             android:turnScreenOn="true" />
 
+        <activity android:name="android.app.Activity"
+            android:exported="true"
+            android:showWhenLocked="true"
+            android:turnScreenOn="true" />
+
         <activity
             android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
             android:exported="true">
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
index 31682bc..ae58700 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
@@ -517,7 +517,7 @@
 
         // The configuration change is still sent to the activity, even if it doesn't relaunch.
         final ActivityConfigurationChangeItem expected =
-                ActivityConfigurationChangeItem.obtain(newConfig);
+                ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
         verify(mAtm.getLifecycleManager()).scheduleTransaction(
                 eq(activity.app.getThread()), eq(activity.token), eq(expected));
     }
@@ -597,7 +597,7 @@
         activity.setRequestedOrientation(requestedOrientation);
 
         final ActivityConfigurationChangeItem expected =
-                ActivityConfigurationChangeItem.obtain(newConfig);
+                ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
         verify(mAtm.getLifecycleManager()).scheduleTransaction(eq(activity.app.getThread()),
                 eq(activity.token), eq(expected));
 
@@ -815,7 +815,7 @@
                     false /* preserveWindow */, true /* ignoreStopState */);
 
             final ActivityConfigurationChangeItem expected =
-                    ActivityConfigurationChangeItem.obtain(newConfig);
+                    ActivityConfigurationChangeItem.obtain(activity.token, newConfig);
             verify(mAtm.getLifecycleManager()).scheduleTransaction(
                     eq(activity.app.getThread()), eq(activity.token), eq(expected));
         } finally {
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
index ae87e38..e2bb115 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java
@@ -174,7 +174,7 @@
         mController = mock(ActivityStartController.class);
         BackgroundActivityStartController balController =
                 new BackgroundActivityStartController(mAtm, mSupervisor);
-        doReturn(balController).when(mController).getBackgroundActivityLaunchController();
+        doReturn(balController).when(mAtm.mTaskSupervisor).getBackgroundActivityLaunchController();
         mActivityMetricsLogger = mock(ActivityMetricsLogger.class);
         clearInvocations(mActivityMetricsLogger);
         mAppOpsManager = mAtm.getAppOpsManager();
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
index 5341588..72c3ebe 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java
@@ -237,26 +237,27 @@
         displayInfo.copyFrom(mDisplayInfo);
         displayInfo.type = Display.TYPE_VIRTUAL;
         DisplayContent virtualDisplay = createNewDisplay(displayInfo);
+        final KeyguardController keyguardController = mSupervisor.getKeyguardController();
 
         // Make sure we're starting out with 2 unlocked displays
         assertEquals(2, mRootWindowContainer.getChildCount());
         mRootWindowContainer.forAllDisplays(displayContent -> {
             assertFalse(displayContent.isKeyguardLocked());
-            assertFalse(displayContent.isAodShowing());
+            assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
         });
 
         // Check that setLockScreenShown locks both displays
         mAtm.setLockScreenShown(true, true);
         mRootWindowContainer.forAllDisplays(displayContent -> {
             assertTrue(displayContent.isKeyguardLocked());
-            assertTrue(displayContent.isAodShowing());
+            assertTrue(keyguardController.isAodShowing(displayContent.mDisplayId));
         });
 
         // Check setLockScreenShown unlocking both displays
         mAtm.setLockScreenShown(false, false);
         mRootWindowContainer.forAllDisplays(displayContent -> {
             assertFalse(displayContent.isKeyguardLocked());
-            assertFalse(displayContent.isAodShowing());
+            assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
         });
     }
 
@@ -270,25 +271,26 @@
         displayInfo.displayGroupId = Display.DEFAULT_DISPLAY_GROUP + 1;
         displayInfo.flags = Display.FLAG_OWN_DISPLAY_GROUP | Display.FLAG_ALWAYS_UNLOCKED;
         DisplayContent newDisplay = createNewDisplay(displayInfo);
+        final KeyguardController keyguardController = mSupervisor.getKeyguardController();
 
         // Make sure we're starting out with 2 unlocked displays
         assertEquals(2, mRootWindowContainer.getChildCount());
         mRootWindowContainer.forAllDisplays(displayContent -> {
             assertFalse(displayContent.isKeyguardLocked());
-            assertFalse(displayContent.isAodShowing());
+            assertFalse(keyguardController.isAodShowing(displayContent.mDisplayId));
         });
 
         // setLockScreenShown should only lock the default display, not the virtual one
         mAtm.setLockScreenShown(true, true);
 
         assertTrue(mDefaultDisplay.isKeyguardLocked());
-        assertTrue(mDefaultDisplay.isAodShowing());
+        assertTrue(keyguardController.isAodShowing(mDefaultDisplay.mDisplayId));
 
         DisplayContent virtualDisplay = mRootWindowContainer.getDisplayContent(
                 newDisplay.getDisplayId());
         assertNotEquals(Display.DEFAULT_DISPLAY, virtualDisplay.getDisplayId());
         assertFalse(virtualDisplay.isKeyguardLocked());
-        assertFalse(virtualDisplay.isAodShowing());
+        assertFalse(keyguardController.isAodShowing(virtualDisplay.mDisplayId));
     }
 
     /*
diff --git a/services/tests/wmtests/src/com/android/server/wm/CompatScaleProviderTest.java b/services/tests/wmtests/src/com/android/server/wm/CompatScaleProviderTest.java
new file mode 100644
index 0000000..96e3cb1
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/CompatScaleProviderTest.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
+import static org.junit.Assert.assertThrows;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InOrder;
+
+/**
+ * Tests for the {@link CompatScaleProvider} interface.
+ * See {@link CompatModePackages} class for implementation.
+ *
+ * Build/Install/Run:
+ * atest WmTests:CompatScaleProviderTest
+ */
+@SmallTest
+@Presubmit
+public class CompatScaleProviderTest extends SystemServiceTestsBase {
+    private static final String TEST_PACKAGE = "compat.mode.packages";
+    static final int TEST_USER_ID = 1;
+
+    private ActivityTaskManagerService mAtm;
+
+    /**
+     * setup method before every test.
+     */
+    @Before
+    public void setUp() {
+        mAtm = mSystemServicesTestRule.getActivityTaskManagerService();
+    }
+
+    /**
+     * Registering a {@link CompatScaleProvider} with an invalid id should throw an exception.
+     */
+    @Test
+    public void registerCompatScaleProviderWithInvalidId() {
+        CompatScaleProvider compatScaleProvider = mock(CompatScaleProvider.class);
+        assertThrows(
+                IllegalArgumentException.class,
+                () ->  mAtm.registerCompatScaleProvider(-1, compatScaleProvider)
+        );
+    }
+
+    /**
+     * Registering a {@code null} {@link CompatScaleProvider} should throw an exception.
+     */
+    @Test
+    public void registerCompatScaleProviderFailIfCallbackIsNull() {
+        assertThrows(
+                IllegalArgumentException.class,
+                () ->  mAtm.registerCompatScaleProvider(
+                            CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT, null)
+        );
+    }
+
+    /**
+     * Registering a {@link CompatScaleProvider} with a already registered id should throw an
+     * exception.
+     */
+    @Test
+    public void registerCompatScaleProviderFailIfIdIsAlreadyRegistered() {
+        CompatScaleProvider compatScaleProvider = mock(CompatScaleProvider.class);
+        mAtm.registerCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT,
+                compatScaleProvider);
+        assertThrows(
+                IllegalArgumentException.class,
+                () ->  mAtm.registerCompatScaleProvider(
+                            CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT, compatScaleProvider)
+        );
+        mAtm.unregisterCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT);
+    }
+
+    /**
+     * Successfully registering a {@link CompatScaleProvider} with should result in callbacks
+     * getting called.
+     */
+    @Test
+    public void registerCompatScaleProviderSuccessfully() {
+        CompatScaleProvider compatScaleProvider = mock(CompatScaleProvider.class);
+        mAtm.registerCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT,
+                compatScaleProvider);
+        mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+        verify(compatScaleProvider, times(1)).getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+        mAtm.unregisterCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT);
+    }
+
+    /**
+     * Unregistering a {@link CompatScaleProvider} with a unregistered id should throw an exception.
+     */
+    @Test
+    public void unregisterCompatScaleProviderFailIfIdNotRegistered() {
+        assertThrows(
+                IllegalArgumentException.class,
+                () ->  mAtm.unregisterCompatScaleProvider(
+                            CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT)
+        );
+    }
+
+    /**
+     * Unregistering a {@link CompatScaleProvider} with an invalid id should throw an exception.
+     */
+    @Test
+    public void unregisterCompatScaleProviderFailIfIdNotInRange() {
+        assertThrows(
+                IllegalArgumentException.class,
+                () ->  mAtm.unregisterCompatScaleProvider(-1)
+        );
+    }
+
+    /**
+     * Successfully unregistering a {@link CompatScaleProvider} should stop the callbacks from
+     * getting called.
+     */
+    @Test
+    public void unregisterCompatScaleProviderSuccessfully() {
+        CompatScaleProvider compatScaleProvider = mock(CompatScaleProvider.class);
+        mAtm.registerCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT,
+                compatScaleProvider);
+        mAtm.unregisterCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT);
+        mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+        verify(compatScaleProvider, never()).getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+    }
+
+    /**
+     * Order of calling {@link CompatScaleProvider} is same as the id that was used for
+     * registering it.
+     */
+    @Test
+    public void registerCompatScaleProviderRespectsOrderId() {
+        CompatScaleProvider gameModeCompatScaleProvider = mock(CompatScaleProvider.class);
+        CompatScaleProvider productCompatScaleProvider = mock(CompatScaleProvider.class);
+        mAtm.registerCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_GAME,
+                gameModeCompatScaleProvider);
+        mAtm.registerCompatScaleProvider(CompatScaleProvider.COMPAT_SCALE_MODE_PRODUCT,
+                productCompatScaleProvider);
+        mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+        InOrder inOrder = inOrder(gameModeCompatScaleProvider, productCompatScaleProvider);
+        inOrder.verify(gameModeCompatScaleProvider).getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+        inOrder.verify(productCompatScaleProvider).getCompatScale(TEST_PACKAGE, TEST_USER_ID);
+    }
+}
diff --git a/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java b/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
index c84eab3..ecd84e1 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ContentRecorderTests.java
@@ -16,6 +16,11 @@
 
 package com.android.server.wm;
 
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
+import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
 import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
 import static android.view.Display.DEFAULT_DISPLAY;
 import static android.view.Display.INVALID_DISPLAY;
@@ -77,6 +82,7 @@
 @RunWith(WindowTestRunner.class)
 public class ContentRecorderTests extends WindowTestsBase {
     private static IBinder sTaskWindowContainerToken;
+    private DisplayContent mVirtualDisplayContent;
     private Task mTask;
     private final ContentRecordingSession mDisplaySession =
             ContentRecordingSession.createDisplaySession(DEFAULT_DISPLAY);
@@ -107,11 +113,11 @@
         displayInfo.logicalWidth = sSurfaceSize.x;
         displayInfo.logicalHeight = sSurfaceSize.y;
         displayInfo.state = STATE_ON;
-        final DisplayContent virtualDisplayContent = createNewDisplay(displayInfo);
-        final int displayId = virtualDisplayContent.getDisplayId();
-        mContentRecorder = new ContentRecorder(virtualDisplayContent,
+        mVirtualDisplayContent = createNewDisplay(displayInfo);
+        final int displayId = mVirtualDisplayContent.getDisplayId();
+        mContentRecorder = new ContentRecorder(mVirtualDisplayContent,
                 mMediaProjectionManagerWrapper);
-        spyOn(virtualDisplayContent);
+        spyOn(mVirtualDisplayContent);
 
         // GIVEN MediaProjection has already initialized the WindowToken of the DisplayArea to
         // record.
@@ -119,7 +125,7 @@
         mDisplaySession.setDisplayToRecord(mDefaultDisplay.mDisplayId);
 
         // GIVEN there is a window token associated with a task to record.
-        sTaskWindowContainerToken = setUpTaskWindowContainerToken(virtualDisplayContent);
+        sTaskWindowContainerToken = setUpTaskWindowContainerToken(mVirtualDisplayContent);
         mTaskSession = ContentRecordingSession.createTaskSession(sTaskWindowContainerToken);
         mTaskSession.setVirtualDisplayId(displayId);
 
@@ -252,7 +258,11 @@
     public void testOnConfigurationChanged_resizesSurface() {
         mContentRecorder.setContentRecordingSession(mDisplaySession);
         mContentRecorder.updateRecording();
-        mContentRecorder.onConfigurationChanged(ORIENTATION_PORTRAIT);
+        // Ensure a different orientation when we check if something has changed.
+        @Configuration.Orientation final int lastOrientation =
+                mDisplayContent.getConfiguration().orientation == ORIENTATION_PORTRAIT
+                        ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
+        mContentRecorder.onConfigurationChanged(lastOrientation);
 
         verify(mTransaction, atLeast(2)).setPosition(eq(mRecordedSurface), anyFloat(),
                 anyFloat());
@@ -261,12 +271,53 @@
     }
 
     @Test
+    public void testOnConfigurationChanged_resizesVirtualDisplay() {
+        final int newWidth = 55;
+        mContentRecorder.setContentRecordingSession(mDisplaySession);
+        mContentRecorder.updateRecording();
+
+        // The user rotates the device, so the host app resizes the virtual display for the capture.
+        resizeDisplay(mDisplayContent, newWidth, sSurfaceSize.y);
+        resizeDisplay(mVirtualDisplayContent, newWidth, sSurfaceSize.y);
+        mContentRecorder.onConfigurationChanged(mDisplayContent.getConfiguration().orientation);
+
+        verify(mTransaction, atLeast(2)).setPosition(eq(mRecordedSurface), anyFloat(),
+                anyFloat());
+        verify(mTransaction, atLeast(2)).setMatrix(eq(mRecordedSurface), anyFloat(), anyFloat(),
+                anyFloat(), anyFloat());
+    }
+
+    @Test
+    public void testOnConfigurationChanged_rotateVirtualDisplay() {
+        mContentRecorder.setContentRecordingSession(mDisplaySession);
+        mContentRecorder.updateRecording();
+
+        // Change a value that we shouldn't rely upon; it has the wrong type.
+        mVirtualDisplayContent.setOverrideOrientation(SCREEN_ORIENTATION_FULL_SENSOR);
+        mContentRecorder.onConfigurationChanged(
+                mVirtualDisplayContent.getConfiguration().orientation);
+
+        // No resize is issued, only the initial transformations when we started recording.
+        verify(mTransaction).setPosition(eq(mRecordedSurface), anyFloat(),
+                anyFloat());
+        verify(mTransaction).setMatrix(eq(mRecordedSurface), anyFloat(), anyFloat(),
+                anyFloat(), anyFloat());
+    }
+
+    @Test
     public void testOnTaskOrientationConfigurationChanged_resizesSurface() {
         mContentRecorder.setContentRecordingSession(mTaskSession);
         mContentRecorder.updateRecording();
 
         Configuration config = mTask.getConfiguration();
-        config.orientation = ORIENTATION_PORTRAIT;
+        // Ensure a different orientation when we compare.
+        @Configuration.Orientation final int orientation =
+                config.orientation == ORIENTATION_PORTRAIT ? ORIENTATION_LANDSCAPE
+                        : ORIENTATION_PORTRAIT;
+        final Rect lastBounds = config.windowConfiguration.getBounds();
+        config.orientation = orientation;
+        config.windowConfiguration.setBounds(
+                new Rect(0, 0, lastBounds.height(), lastBounds.width()));
         mTask.onConfigurationChanged(config);
 
         verify(mTransaction, atLeast(2)).setPosition(eq(mRecordedSurface), anyFloat(),
@@ -279,13 +330,15 @@
     public void testOnTaskBoundsConfigurationChanged_notifiesCallback() {
         mTask.getRootTask().setWindowingMode(WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW);
 
+        final int minWidth = 222;
+        final int minHeight = 777;
         final int recordedWidth = 333;
         final int recordedHeight = 999;
 
         final ActivityInfo info = new ActivityInfo();
         info.windowLayout = new ActivityInfo.WindowLayout(-1 /* width */,
                 -1 /* widthFraction */, -1 /* height */, -1 /* heightFraction */,
-                Gravity.NO_GRAVITY, recordedWidth, recordedHeight);
+                Gravity.NO_GRAVITY, minWidth, minHeight);
         mTask.setMinDimensions(info);
 
         // WHEN a recording is ongoing.
@@ -311,6 +364,39 @@
     }
 
     @Test
+    public void testTaskWindowingModeChanged_pip_stopsRecording() {
+        // WHEN a recording is ongoing.
+        mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+        mContentRecorder.setContentRecordingSession(mTaskSession);
+        mContentRecorder.updateRecording();
+        assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+
+        // WHEN a configuration change arrives, and the task is now pinned.
+        mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+        Configuration configuration = mTask.getConfiguration();
+        mTask.onConfigurationChanged(configuration);
+
+        // THEN recording is paused.
+        assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+    }
+
+    @Test
+    public void testTaskWindowingModeChanged_fullscreen_startsRecording() {
+        // WHEN a recording is ongoing.
+        mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+        mContentRecorder.setContentRecordingSession(mTaskSession);
+        mContentRecorder.updateRecording();
+        assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+
+        // WHEN the task is now fullscreen.
+        mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+        mContentRecorder.updateRecording();
+
+        // THEN recording is started.
+        assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+    }
+
+    @Test
     public void testStartRecording_notifiesCallback_taskSession() {
         // WHEN a recording is ongoing.
         mContentRecorder.setContentRecordingSession(mTaskSession);
@@ -335,6 +421,45 @@
     }
 
     @Test
+    public void testStartRecording_taskInPIP_recordingNotStarted() {
+        // GIVEN a task is in PIP.
+        mContentRecorder.setContentRecordingSession(mTaskSession);
+        mTask.setWindowingMode(WINDOWING_MODE_PINNED);
+
+        // WHEN a recording tries to start.
+        mContentRecorder.updateRecording();
+
+        // THEN recording does not start.
+        assertThat(mContentRecorder.isCurrentlyRecording()).isFalse();
+    }
+
+    @Test
+    public void testStartRecording_taskInSplit_recordingStarted() {
+        // GIVEN a task is in PIP.
+        mContentRecorder.setContentRecordingSession(mTaskSession);
+        mTask.setWindowingMode(WINDOWING_MODE_MULTI_WINDOW);
+
+        // WHEN a recording tries to start.
+        mContentRecorder.updateRecording();
+
+        // THEN recording does not start.
+        assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+    }
+
+    @Test
+    public void testStartRecording_taskInFullscreen_recordingStarted() {
+        // GIVEN a task is in PIP.
+        mContentRecorder.setContentRecordingSession(mTaskSession);
+        mTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+
+        // WHEN a recording tries to start.
+        mContentRecorder.updateRecording();
+
+        // THEN recording does not start.
+        assertThat(mContentRecorder.isCurrentlyRecording()).isTrue();
+    }
+
+    @Test
     public void testOnVisibleRequestedChanged_notifiesCallback() {
         // WHEN a recording is ongoing.
         mContentRecorder.setContentRecordingSession(mTaskSession);
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
index 769a309..1b44c01 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
@@ -573,8 +573,9 @@
 
         final ClientTransaction transaction = ClientTransaction.obtain(
                 mActivity.app.getThread(), mActivity.token);
-        transaction.addCallback(RefreshCallbackItem.obtain(cycleThroughStop ? ON_STOP : ON_PAUSE));
-        transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(
+        transaction.addCallback(RefreshCallbackItem.obtain(mActivity.token,
+                cycleThroughStop ? ON_STOP : ON_PAUSE));
+        transaction.setLifecycleStateRequest(ResumeActivityItem.obtain(mActivity.token,
                 /* isForward */ false, /* shouldSendCompatFakeFocus */ false));
 
         verify(mActivity.mAtmService.getLifecycleManager(), times(refreshRequested ? 1 : 0))
diff --git a/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java b/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java
index 994dcf1..ffa1ed9 100644
--- a/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java
@@ -23,8 +23,6 @@
 import static android.view.WindowInsets.Type.navigationBars;
 import static android.view.WindowInsets.Type.statusBars;
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
 import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
 import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE;
@@ -108,7 +106,7 @@
 
     @Test
     public void testControlsForDispatch_forceStatusBarVisible() {
-        addStatusBar().mAttrs.privateFlags |= PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
+        addStatusBar().mAttrs.forciblyShownTypes |= statusBars();
         addNavigationBar();
 
         final InsetsSourceControl[] controls = addAppWindowAndGetControlsForDispatch();
@@ -120,8 +118,8 @@
 
     @Test
     public void testControlsForDispatch_statusBarForceShowNavigation() {
-        addWindow(TYPE_NOTIFICATION_SHADE, "notificationShade").mAttrs.privateFlags |=
-                PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
+        addWindow(TYPE_NOTIFICATION_SHADE, "notificationShade").mAttrs.forciblyShownTypes |=
+                navigationBars();
         addStatusBar();
         addNavigationBar();
 
@@ -135,7 +133,7 @@
     @Test
     public void testControlsForDispatch_statusBarForceShowNavigation_butFocusedAnyways() {
         WindowState notifShade = addWindow(TYPE_NOTIFICATION_SHADE, "notificationShade");
-        notifShade.mAttrs.privateFlags |= PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
+        notifShade.mAttrs.forciblyShownTypes |= navigationBars();
         addNavigationBar();
 
         mDisplayContent.getInsetsPolicy().updateBarControlTarget(notifShade);
@@ -329,6 +327,7 @@
                 addNavigationBar().getControllableInsetProvider().getSource();
         statusBarSource.setVisible(false);
         navBarSource.setVisible(false);
+        mAppWindow.setRequestedVisibleTypes(0, navigationBars() | statusBars());
         mAppWindow.mAboveInsetsState.addSource(navBarSource);
         mAppWindow.mAboveInsetsState.addSource(statusBarSource);
         final InsetsPolicy policy = mDisplayContent.getInsetsPolicy();
@@ -389,6 +388,50 @@
         assertFalse(policy.isTransient(navigationBars()));
     }
 
+    @Test
+    public void testFakeControlTarget_overrideVisibilityReceivedByWindows() {
+        final WindowState statusBar = addStatusBar();
+        final InsetsSourceProvider statusBarProvider = statusBar.getControllableInsetProvider();
+        statusBar.mSession.mCanForceShowingInsets = true;
+        statusBar.setHasSurface(true);
+        statusBarProvider.setServerVisible(true);
+
+        final InsetsSource statusBarSource = statusBarProvider.getSource();
+        final int statusBarId = statusBarSource.getId();
+        assertTrue(statusBarSource.isVisible());
+
+        final WindowState app1 = addWindow(TYPE_APPLICATION, "app1");
+        app1.mAboveInsetsState.addSource(statusBarSource);
+        assertTrue(app1.getInsetsState().peekSource(statusBarId).isVisible());
+
+        final WindowState app2 = addWindow(TYPE_APPLICATION, "app2");
+        app2.mAboveInsetsState.addSource(statusBarSource);
+        assertTrue(app2.getInsetsState().peekSource(statusBarId).isVisible());
+
+        app2.setRequestedVisibleTypes(0, navigationBars() | statusBars());
+        mDisplayContent.getInsetsPolicy().updateBarControlTarget(app2);
+        waitUntilWindowAnimatorIdle();
+
+        // app2 is the real control target now. It can override the visibility of all sources that
+        // it controls.
+        assertFalse(statusBarSource.isVisible());
+        assertFalse(app1.getInsetsState().peekSource(statusBarId).isVisible());
+        assertFalse(app2.getInsetsState().peekSource(statusBarId).isVisible());
+
+        statusBar.mAttrs.forciblyShownTypes = statusBars();
+        mDisplayContent.getDisplayPolicy().applyPostLayoutPolicyLw(
+                statusBar, statusBar.mAttrs, null, null);
+        mDisplayContent.getInsetsPolicy().updateBarControlTarget(app2);
+        waitUntilWindowAnimatorIdle();
+
+        // app2 is the fake control target now. It can only override the visibility of sources
+        // received by windows, but not the raw source.
+        assertTrue(statusBarSource.isVisible());
+        assertFalse(app1.getInsetsState().peekSource(statusBarId).isVisible());
+        assertFalse(app2.getInsetsState().peekSource(statusBarId).isVisible());
+
+    }
+
     private WindowState addNavigationBar() {
         final Binder owner = new Binder();
         final WindowState win = createWindow(null, TYPE_NAVIGATION_BAR, "navBar");
diff --git a/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java
index 114796d..2085d61 100644
--- a/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/InsetsStateControllerTest.java
@@ -367,9 +367,11 @@
         doReturn(rotatedState).when(app.mToken).getFixedRotationTransformInsetsState();
         assertTrue(rotatedState.isSourceOrDefaultVisible(ID_STATUS_BAR, statusBars()));
 
-        provider.getSource().setVisible(false);
+        app.setRequestedVisibleTypes(0, statusBars());
+        mDisplayContent.getInsetsPolicy().updateBarControlTarget(app);
         mDisplayContent.getInsetsPolicy().showTransient(statusBars(),
                 true /* isGestureOnSystemBar */);
+        waitUntilWindowAnimatorIdle();
 
         assertTrue(mDisplayContent.getInsetsPolicy().isTransient(statusBars()));
         assertFalse(app.getInsetsState().isSourceOrDefaultVisible(ID_STATUS_BAR, statusBars()));
diff --git a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java b/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java
index 80e169d..be3f01e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java
@@ -17,14 +17,15 @@
 package com.android.server.wm;
 
 import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
-
+import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
+import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
 import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
-
+import static junit.framework.Assert.assertEquals;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
@@ -37,6 +38,8 @@
 
 import androidx.test.filters.SmallTest;
 
+import com.android.window.flags.FakeFeatureFlagsImpl;
+
 import org.junit.Before;
 import org.junit.Test;
 
@@ -57,12 +60,16 @@
     private LetterboxConfiguration mLetterboxConfiguration;
     private LetterboxConfigurationPersister mLetterboxConfigurationPersister;
 
+    private MutableFakeFeatureFlagsImpl mMutableFakeFeatureFlags;
+
+
     @Before
     public void setUp() throws Exception {
         mContext = getInstrumentation().getTargetContext();
+        mMutableFakeFeatureFlags = new MutableFakeFeatureFlagsImpl();
         mLetterboxConfigurationPersister = mock(LetterboxConfigurationPersister.class);
         mLetterboxConfiguration = new LetterboxConfiguration(mContext,
-                mLetterboxConfigurationPersister);
+                mLetterboxConfigurationPersister, mMutableFakeFeatureFlags);
     }
 
     @Test
@@ -92,6 +99,22 @@
     }
 
     @Test
+    public void test_whenFlagEnabled_wallpaperIsDefaultBackground() {
+        mMutableFakeFeatureFlags.setLetterboxBackgroundWallpaperFlag(true);
+        assertEquals(LETTERBOX_BACKGROUND_WALLPAPER,
+                mLetterboxConfiguration.getLetterboxBackgroundType());
+        assertEquals(1, mMutableFakeFeatureFlags.getInvocationCount());
+    }
+
+    @Test
+    public void test_whenFlagDisabled_solidColorIsDefaultBackground() {
+        mMutableFakeFeatureFlags.setLetterboxBackgroundWallpaperFlag(false);
+        assertEquals(LETTERBOX_BACKGROUND_SOLID_COLOR,
+                mLetterboxConfiguration.getLetterboxBackgroundType());
+        assertEquals(1, mMutableFakeFeatureFlags.getInvocationCount());
+    }
+
+    @Test
     public void test_whenMovedHorizontally_updatePositionAccordingly() {
         // Starting from center
         assertForHorizontalMove(
@@ -288,4 +311,23 @@
                 false /* forTabletopMode */,
                 LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP);
     }
+
+    private static class MutableFakeFeatureFlagsImpl extends FakeFeatureFlagsImpl {
+        private boolean mLetterboxBackgroundWallpaperFlag;
+        private int mInvocationCount;
+
+        public void setLetterboxBackgroundWallpaperFlag(boolean letterboxBackgroundWallpaperFlag) {
+            mLetterboxBackgroundWallpaperFlag = letterboxBackgroundWallpaperFlag;
+        }
+
+        @Override
+        public boolean letterboxBackgroundWallpaperFlag() {
+            mInvocationCount++;
+            return mLetterboxBackgroundWallpaperFlag;
+        }
+
+        int getInvocationCount() {
+            return mInvocationCount;
+        }
+    }
 }
diff --git a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
index 0cdd9b8..8f68c0f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
@@ -112,6 +112,7 @@
 import android.view.WindowInsets;
 import android.view.WindowManager;
 
+import androidx.test.filters.FlakyTest;
 import androidx.test.filters.MediumTest;
 
 import com.android.internal.policy.SystemBarUtils;
@@ -2361,6 +2362,7 @@
     }
 
     @Test
+    @FlakyTest(bugId = 299220009)
     public void testUserOverrideAspectRatioNotEnabled() {
         setUpDisplaySizeWithApp(/* dw */ 1600, /* dh */ 1400);
 
@@ -2409,8 +2411,9 @@
                 .setUid(android.os.Process.myUid())
                 .build();
         activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
-        activity.mWmService.mLetterboxConfiguration
-                .setUserAppAspectRatioSettingsOverrideEnabled(enabled);
+        spyOn(activity.mWmService.mLetterboxConfiguration);
+        doReturn(enabled).when(activity.mWmService.mLetterboxConfiguration)
+                .isUserAppAspectRatioSettingsEnabled();
         // Set user aspect ratio override
         final IPackageManager pm = mAtm.getPackageManager();
         try {
@@ -4249,6 +4252,7 @@
         // Set up a display in landscape with a fixed-orientation PORTRAIT app
         setUpDisplaySizeWithApp(2800, 1400);
         mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
+        mWm.mLetterboxConfiguration.setIsAutomaticReachabilityInBookModeEnabled(false);
         mWm.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
         prepareUnresizable(mActivity, 1.75f, SCREEN_ORIENTATION_PORTRAIT);
 
diff --git a/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java b/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java
new file mode 100644
index 0000000..e8a847c
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.wm;
+
+import static android.view.InputWindowHandle.USE_SURFACE_TRUSTED_OVERLAY;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
+import static org.junit.Assume.assumeTrue;
+
+import android.app.Activity;
+import android.app.Instrumentation;
+import android.os.IBinder;
+import android.platform.test.annotations.Presubmit;
+import android.server.wm.BuildUtils;
+import android.server.wm.CtsWindowInfoUtils;
+import android.view.View;
+import android.view.ViewTreeObserver;
+import android.view.WindowManager;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestName;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+@Presubmit
+public class TrustedOverlayTests {
+    private static final String TAG = "TrustedOverlayTests";
+    private static final long TIMEOUT_S = 5L * BuildUtils.HW_TIMEOUT_MULTIPLIER;
+
+    @Rule
+    public TestName mName = new TestName();
+
+    private final ActivityTestRule<Activity> mActivityRule = new ActivityTestRule<>(
+            Activity.class);
+
+    private Instrumentation mInstrumentation;
+    private Activity mActivity;
+
+    @Before
+    public void setup() {
+        mInstrumentation = InstrumentationRegistry.getInstrumentation();
+        mActivity = mActivityRule.launchActivity(null);
+    }
+
+    @Test
+    public void setTrustedOverlayInputWindow() throws InterruptedException {
+        assumeFalse(USE_SURFACE_TRUSTED_OVERLAY);
+        testTrustedOverlayChildHelper(false);
+    }
+
+    @Test
+    public void setTrustedOverlayChildLayer() throws InterruptedException {
+        assumeTrue(USE_SURFACE_TRUSTED_OVERLAY);
+        testTrustedOverlayChildHelper(true);
+    }
+
+    private void testTrustedOverlayChildHelper(boolean expectTrusted) throws InterruptedException {
+        IBinder[] tokens = new IBinder[2];
+        CountDownLatch hostTokenReady = new CountDownLatch(1);
+        mInstrumentation.runOnMainSync(() -> {
+            mActivity.getWindow().addPrivateFlags(PRIVATE_FLAG_TRUSTED_OVERLAY);
+            View rootView = mActivity.getWindow().getDecorView();
+            if (rootView.isAttachedToWindow()) {
+                tokens[0] = rootView.getWindowToken();
+                hostTokenReady.countDown();
+            } else {
+                rootView.getViewTreeObserver().addOnWindowAttachListener(
+                        new ViewTreeObserver.OnWindowAttachListener() {
+                            @Override
+                            public void onWindowAttached() {
+                                tokens[0] = rootView.getWindowToken();
+                                hostTokenReady.countDown();
+                            }
+
+                            @Override
+                            public void onWindowDetached() {
+                            }
+                        });
+            }
+        });
+
+        assertTrue("Failed to wait for host to get added",
+                hostTokenReady.await(TIMEOUT_S, TimeUnit.SECONDS));
+
+        mInstrumentation.runOnMainSync(() -> {
+            WindowManager wm = mActivity.getSystemService(WindowManager.class);
+
+            View childView = new View(mActivity) {
+                @Override
+                protected void onAttachedToWindow() {
+                    super.onAttachedToWindow();
+                    tokens[1] = getWindowToken();
+                }
+            };
+            WindowManager.LayoutParams params = new WindowManager.LayoutParams();
+            params.token = tokens[0];
+            params.type = TYPE_APPLICATION_PANEL;
+            wm.addView(childView, params);
+        });
+
+        boolean[] foundTrusted = new boolean[2];
+
+        CtsWindowInfoUtils.waitForWindowInfos(
+                windowInfos -> {
+                    for (var windowInfo : windowInfos) {
+                        if (windowInfo.windowToken == tokens[0]
+                                && windowInfo.isTrustedOverlay) {
+                            foundTrusted[0] = true;
+                        } else if (windowInfo.windowToken == tokens[1]
+                                && windowInfo.isTrustedOverlay) {
+                            foundTrusted[1] = true;
+                        }
+                    }
+                    return foundTrusted[0] && foundTrusted[1];
+                }, TIMEOUT_S, TimeUnit.SECONDS);
+
+        if (!foundTrusted[0] || !foundTrusted[1]) {
+            CtsWindowInfoUtils.dumpWindowsOnScreen(TAG, mName.getMethodName());
+        }
+
+        assertEquals("Failed to find parent window or was not marked trusted", expectTrusted,
+                foundTrusted[0]);
+        assertEquals("Failed to find child window or was not marked trusted", expectTrusted,
+                foundTrusted[1]);
+    }
+}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
index f1c5865..b028b47 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
@@ -22,6 +22,7 @@
 import android.app.usage.UsageStats;
 import android.app.usage.UsageStatsManager;
 import android.os.Build;
+import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.util.ArrayMap;
 import android.util.ArraySet;
@@ -1567,6 +1568,13 @@
         }
     }
 
+    void deleteDataFor(String pkg) {
+        // reuse the existing prune method to delete data for the specified package.
+        // we'll use the current timestamp so that all events before now get pruned.
+        prunePackagesDataOnUpgrade(
+                new HashMap<>(Collections.singletonMap(pkg, SystemClock.elapsedRealtime())));
+    }
+
     IntervalStats readIntervalStatsForFile(int interval, long fileName) {
         synchronized (mLock) {
             final IntervalStats stats = new IntervalStats();
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 90b798c..7db32a9 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -2043,6 +2043,12 @@
         mAppStandby.clearLastUsedTimestampsForTest(packageName, userId);
     }
 
+    void deletePackageData(@NonNull String packageName, @UserIdInt int userId) {
+        synchronized (mLock) {
+            mUserState.get(userId).deleteDataFor(packageName);
+        }
+    }
+
     private final class BinderService extends IUsageStatsManager.Stub {
 
         private boolean hasPermission(String callingPackage) {
diff --git a/services/usage/java/com/android/server/usage/UsageStatsShellCommand.java b/services/usage/java/com/android/server/usage/UsageStatsShellCommand.java
index 772b22a..4cb31f9 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsShellCommand.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsShellCommand.java
@@ -38,6 +38,8 @@
         switch (cmd) {
             case "clear-last-used-timestamps":
                 return runClearLastUsedTimestamps();
+            case "delete-package-data":
+                return deletePackageData();
             default:
                 return handleDefaultCommands(cmd);
         }
@@ -51,14 +53,38 @@
         pw.println("    Print this help text.");
         pw.println();
         pw.println("clear-last-used-timestamps PACKAGE_NAME [-u | --user USER_ID]");
-        pw.println("    Clears any existing usage data for the given package.");
+        pw.println("    Clears the last used timestamps for the given package.");
+        pw.println();
+        pw.println("delete-package-data PACKAGE_NAME [-u | --user USER_ID]");
+        pw.println("    Deletes all the usage stats for the given package.");
         pw.println();
     }
 
     @SuppressLint("AndroidFrameworkRequiresPermission")
     private int runClearLastUsedTimestamps() {
         final String packageName = getNextArgRequired();
+        final int userId = getUserId();
+        if (userId == -1) {
+            return -1;
+        }
 
+        mService.clearLastUsedTimestamps(packageName, userId);
+        return 0;
+    }
+
+    @SuppressLint("AndroidFrameworkRequiresPermission")
+    private int deletePackageData() {
+        final String packageName = getNextArgRequired();
+        final int userId = getUserId();
+        if (userId == -1) {
+            return -1;
+        }
+
+        mService.deletePackageData(packageName, userId);
+        return 0;
+    }
+
+    private int getUserId() {
         int userId = UserHandle.USER_CURRENT;
         String opt;
         while ((opt = getNextOption()) != null) {
@@ -72,8 +98,6 @@
         if (userId == UserHandle.USER_CURRENT) {
             userId = ActivityManager.getCurrentUser();
         }
-
-        mService.clearLastUsedTimestamps(packageName, userId);
-        return 0;
+        return userId;
     }
 }
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index fd56b6e..7d2e1a4 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -974,6 +974,10 @@
         mDatabase.dumpMappings(ipw);
     }
 
+    void deleteDataFor(String pkg) {
+        mDatabase.deleteDataFor(pkg);
+    }
+
     void dumpFile(IndentingPrintWriter ipw, String[] args) {
         if (args == null || args.length == 0) {
             // dump all files for every interval for specified user
diff --git a/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java b/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
index 3870dfd..4f99f14 100644
--- a/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
+++ b/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/WallpaperEffectsGenerationPerUserService.java
@@ -95,21 +95,29 @@
         String newTaskId = cinematicEffectRequest.getTaskId();
         // Previous request is still being processed.
         if (mCinematicEffectListenerWrapper != null) {
+            CinematicEffectResponse cinematicEffectResponse;
             if (mCinematicEffectListenerWrapper.mTaskId.equals(newTaskId)) {
-                invokeCinematicListenerAndCleanup(
-                        new CinematicEffectResponse.Builder(
-                                CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_PENDING, newTaskId)
-                                .build()
-                );
+                cinematicEffectResponse =  new CinematicEffectResponse.Builder(
+                        CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_PENDING, newTaskId)
+                        .build();
             } else {
-                invokeCinematicListenerAndCleanup(
-                        new CinematicEffectResponse.Builder(
-                                CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS,
-                                newTaskId).build()
-                );
+                cinematicEffectResponse =  new CinematicEffectResponse.Builder(
+                        CinematicEffectResponse.CINEMATIC_EFFECT_STATUS_TOO_MANY_REQUESTS,
+                        newTaskId)
+                        .build();
             }
-            return;
+            try {
+                cinematicEffectListener.onCinematicEffectGenerated(cinematicEffectResponse);
+                return;
+            } catch (RemoteException e) {
+                if (isDebug()) {
+                    Slog.w(TAG, "RemoteException invoking cinematic effect listener for task["
+                            + mCinematicEffectListenerWrapper.mTaskId + "]");
+                }
+                return;
+            }
         }
+
         RemoteWallpaperEffectsGenerationService remoteService = ensureRemoteServiceLocked();
         if (remoteService != null) {
             remoteService.executeOnResolvedService(
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index 5f6c14a..6130af5 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -18,6 +18,7 @@
 
 import android.Manifest;
 import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -39,6 +40,7 @@
 import com.android.internal.telephony.IIntegerConsumer;
 import com.android.internal.telephony.ITelephony;
 import com.android.internal.telephony.IVoidConsumer;
+import com.android.internal.telephony.flags.Flags;
 import com.android.telephony.Rlog;
 
 import java.lang.annotation.Retention;
@@ -769,6 +771,16 @@
      */
     public static final int SATELLITE_MODEM_STATE_UNAVAILABLE = 5;
     /**
+     * The satellite modem is powered on but the device is not registered to a satellite cell.
+     */
+    @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
+    public static final int SATELLITE_MODEM_STATE_NOT_CONNECTED = 6;
+    /**
+     * The satellite modem is powered on and the device is registered to a satellite cell.
+     */
+    @FlaggedApi(Flags.FLAG_OEM_ENABLED_SATELLITE_FLAG)
+    public static final int SATELLITE_MODEM_STATE_CONNECTED = 7;
+    /**
      * Satellite modem state is unknown. This generic modem state should be used only when the
      * modem state cannot be mapped to other specific modem states.
      */
@@ -782,6 +794,8 @@
             SATELLITE_MODEM_STATE_DATAGRAM_RETRYING,
             SATELLITE_MODEM_STATE_OFF,
             SATELLITE_MODEM_STATE_UNAVAILABLE,
+            SATELLITE_MODEM_STATE_NOT_CONNECTED,
+            SATELLITE_MODEM_STATE_CONNECTED,
             SATELLITE_MODEM_STATE_UNKNOWN
     })
     @Retention(RetentionPolicy.SOURCE)
diff --git a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
index e4f9413..162fe2b 100644
--- a/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
+++ b/telephony/java/android/telephony/satellite/stub/SatelliteModemState.aidl
@@ -46,6 +46,14 @@
      */
     SATELLITE_MODEM_STATE_UNAVAILABLE = 5,
     /**
+     * The satellite modem is powered on but the device is not registered to a satellite cell.
+     */
+    SATELLITE_MODEM_STATE_NOT_CONNECTED = 6,
+    /**
+     * The satellite modem is powered on and the device is registered to a satellite cell.
+     */
+    SATELLITE_MODEM_STATE_CONNECTED = 7,
+    /**
      * Satellite modem state is unknown. This generic modem state should be used only when the
      * modem state cannot be mapped to other specific modem states.
      */
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
index 1a65611..e106f65 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeShownOnAppStartHelper.kt
@@ -18,8 +18,6 @@
 
 import android.app.Instrumentation
 import android.tools.common.Rotation
-import android.tools.common.traces.Condition
-import android.tools.common.traces.DeviceStateDump
 import android.tools.common.traces.component.ComponentNameMatcher
 import android.tools.common.traces.component.IComponentMatcher
 import android.tools.device.helpers.FIND_TIMEOUT
@@ -54,14 +52,14 @@
         launchedAppComponentMatcherOverride: IComponentMatcher?,
         action: String?,
         stringExtras: Map<String, String>,
-        waitConditions: Array<Condition<DeviceStateDump>>
+        waitConditionsBuilder: WindowManagerStateHelper.StateSyncBuilder
     ) {
         super.launchViaIntent(
             wmHelper,
             launchedAppComponentMatcherOverride,
             action,
             stringExtras,
-            waitConditions
+            waitConditionsBuilder
         )
         waitIMEShown(wmHelper)
     }
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
index 82d2ae0..c30786f 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
@@ -244,12 +244,16 @@
         action: String? = null,
         stringExtras: Map<String, String>
     ) {
-        launchViaIntentAndWaitShown(
+        launchViaIntent(
             wmHelper,
             launchedAppComponentMatcherOverride,
             action,
             stringExtras,
-            waitConditions = arrayOf(ConditionsFactory.hasPipWindow())
+            waitConditionsBuilder = wmHelper
+                .StateSyncBuilder()
+                .add(ConditionsFactory.isWMStateComplete())
+                .withAppTransitionIdle()
+                .add(ConditionsFactory.hasPipWindow())
         )
 
         wmHelper
@@ -261,7 +265,7 @@
 
     /** Expand the PIP window back to full screen via intent and wait until the app is visible */
     fun exitPipToFullScreenViaIntent(wmHelper: WindowManagerStateHelper) =
-        launchViaIntentAndWaitShown(wmHelper)
+        launchViaIntent(wmHelper)
 
     fun clickEnterPipButton(wmHelper: WindowManagerStateHelper) {
         clickObject(ENTER_PIP_BUTTON_ID)
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
index c090415..ee22d07 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchBetweenTwoAppsForwardTest.kt
@@ -16,7 +16,6 @@
 
 package com.android.server.wm.flicker.quickswitch
 
-import android.platform.test.annotations.Presubmit
 import android.tools.common.NavBar
 import android.tools.common.datatypes.Rect
 import android.tools.common.traces.component.ComponentNameMatcher
@@ -51,6 +50,7 @@
 @RunWith(Parameterized::class)
 @Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@FlakyTest(bugId = 298544839)
 class QuickSwitchBetweenTwoAppsForwardTest(flicker: LegacyFlickerTest) : BaseTest(flicker) {
     private val testApp1 = SimpleAppHelper(instrumentation)
     private val testApp2 = NonResizeableAppHelper(instrumentation)
@@ -92,7 +92,6 @@
      * Checks that the transition starts with [testApp1]'s windows filling/covering exactly the
      * entirety of the display.
      */
-    @Presubmit
     @Test
     open fun startsWithApp1WindowsCoverFullScreen() {
         flicker.assertWmStart {
@@ -112,7 +111,6 @@
     }
 
     /** Checks that the transition starts with [testApp1] being the top window. */
-    @Presubmit
     @Test
     open fun startsWithApp1WindowBeingOnTop() {
         flicker.assertWmStart { this.isAppWindowOnTop(testApp1) }
@@ -122,7 +120,6 @@
      * Checks that [testApp2] windows fill the entire screen (i.e. is "fullscreen") at the end of
      * the transition once we have fully quick switched from [testApp1] back to the [testApp2].
      */
-    @Presubmit
     @Test
     open fun endsWithApp2WindowsCoveringFullScreen() {
         flicker.assertWmEnd { this.visibleRegion(testApp2).coversExactly(startDisplayBounds) }
@@ -132,7 +129,6 @@
      * Checks that [testApp2] layers fill the entire screen (i.e. is "fullscreen") at the end of the
      * transition once we have fully quick switched from [testApp1] back to the [testApp2].
      */
-    @Presubmit
     @Test
     open fun endsWithApp2LayersCoveringFullScreen() {
         flicker.assertLayersEnd {
@@ -145,7 +141,6 @@
      * Checks that [testApp2] is the top window at the end of the transition once we have fully
      * quick switched from [testApp1] back to the [testApp2].
      */
-    @Presubmit
     @Test
     open fun endsWithApp2BeingOnTop() {
         flicker.assertWmEnd { this.isAppWindowOnTop(testApp2) }
@@ -155,7 +150,6 @@
      * Checks that [testApp2]'s window starts off invisible and becomes visible at some point before
      * the end of the transition and then stays visible until the end of the transition.
      */
-    @Presubmit
     @Test
     open fun app2WindowBecomesAndStaysVisible() {
         flicker.assertWm {
@@ -171,7 +165,6 @@
      * Checks that [testApp2]'s layer starts off invisible and becomes visible at some point before
      * the end of the transition and then stays visible until the end of the transition.
      */
-    @Presubmit
     @Test
     open fun app2LayerBecomesAndStaysVisible() {
         flicker.assertLayers { this.isInvisible(testApp2).then().isVisible(testApp2) }
@@ -181,7 +174,6 @@
      * Checks that [testApp1]'s window starts off visible and becomes invisible at some point before
      * the end of the transition and then stays invisible until the end of the transition.
      */
-    @Presubmit
     @Test
     open fun app1WindowBecomesAndStaysInvisible() {
         flicker.assertWm { this.isAppWindowVisible(testApp1).then().isAppWindowInvisible(testApp1) }
@@ -191,7 +183,6 @@
      * Checks that [testApp1]'s layer starts off visible and becomes invisible at some point before
      * the end of the transition and then stays invisible until the end of the transition.
      */
-    @Presubmit
     @Test
     open fun app1LayerBecomesAndStaysInvisible() {
         flicker.assertLayers { this.isVisible(testApp1).then().isInvisible(testApp1) }
@@ -202,7 +193,6 @@
      * Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
      * visible.
      */
-    @Presubmit
     @Test
     open fun app2WindowIsVisibleOnceApp1WindowIsInvisible() {
         flicker.assertWm {
@@ -221,7 +211,6 @@
      * Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
      * visible.
      */
-    @Presubmit
     @Test
     open fun app2LayerIsVisibleOnceApp1LayerIsInvisible() {
         flicker.assertLayers {
@@ -236,7 +225,6 @@
     }
 
     /** {@inheritDoc} */
-    @Presubmit
     @Test
     override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
 
@@ -245,14 +233,34 @@
     @Test
     override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
 
-    @FlakyTest(bugId = 246284708)
     @Test
     override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
         super.visibleLayersShownMoreThanOneConsecutiveEntry()
 
-    @FlakyTest(bugId = 250518877)
+    @Test override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
+
+    @Test override fun entireScreenCovered() = super.entireScreenCovered()
+
     @Test
-    override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
+    override fun navBarLayerIsVisibleAtStartAndEnd() = super.navBarLayerIsVisibleAtStartAndEnd()
+
+    @Test
+    override fun navBarWindowIsVisibleAtStartAndEnd() = super.navBarWindowIsVisibleAtStartAndEnd()
+
+    @Test
+    override fun statusBarLayerIsVisibleAtStartAndEnd() =
+        super.statusBarLayerIsVisibleAtStartAndEnd()
+
+    @Test
+    override fun statusBarLayerPositionAtStartAndEnd() = super.statusBarLayerPositionAtStartAndEnd()
+
+    @Test override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible()
+
+    @Test override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible()
+
+    @Test
+    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
+        super.visibleWindowsShownMoreThanOneConsecutiveEntry()
 
     companion object {
         private var startDisplayBounds = Rect.EMPTY
diff --git a/tests/TrustTests/Android.bp b/tests/TrustTests/Android.bp
index a1b888a..c216bce 100644
--- a/tests/TrustTests/Android.bp
+++ b/tests/TrustTests/Android.bp
@@ -25,6 +25,7 @@
         "androidx.test.rules",
         "androidx.test.ext.junit",
         "androidx.test.uiautomator_uiautomator",
+        "flag-junit",
         "mockito-target-minus-junit4",
         "servicestests-utils",
         "truth-prebuilt",
diff --git a/tests/TrustTests/src/android/trust/test/GrantAndRevokeTrustTest.kt b/tests/TrustTests/src/android/trust/test/GrantAndRevokeTrustTest.kt
index f864fed..1dfd5c0 100644
--- a/tests/TrustTests/src/android/trust/test/GrantAndRevokeTrustTest.kt
+++ b/tests/TrustTests/src/android/trust/test/GrantAndRevokeTrustTest.kt
@@ -16,6 +16,10 @@
 
 package android.trust.test
 
+import android.content.pm.PackageManager
+import android.platform.test.annotations.RequiresFlagsDisabled
+import android.platform.test.annotations.RequiresFlagsEnabled
+import android.platform.test.flag.junit.DeviceFlagsValueProvider
 import android.service.trust.GrantTrustResult
 import android.trust.BaseTrustAgentService
 import android.trust.TrustTestActivity
@@ -27,6 +31,7 @@
 import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
 import androidx.test.uiautomator.UiDevice
 import com.android.server.testutils.mock
+import org.junit.Assume.assumeFalse
 import org.junit.Before
 import org.junit.Rule
 import org.junit.Test
@@ -45,6 +50,7 @@
     private val activityScenarioRule = ActivityScenarioRule(TrustTestActivity::class.java)
     private val lockStateTrackingRule = LockStateTrackingRule()
     private val trustAgentRule = TrustAgentRule<GrantAndRevokeTrustAgent>()
+    private val packageManager = getInstrumentation().getTargetContext().getPackageManager()
 
     @get:Rule
     val rule: RuleChain = RuleChain
@@ -52,6 +58,7 @@
         .around(ScreenLockRule())
         .around(lockStateTrackingRule)
         .around(trustAgentRule)
+        .around(DeviceFlagsValueProvider.createCheckFlagsRule())
 
     @Before
     fun manageTrust() {
@@ -72,7 +79,7 @@
         trustAgentRule.agent.grantTrust(GRANT_MESSAGE, 10000, 0) {}
         uiDevice.sleep()
 
-        lockStateTrackingRule.assertUnlocked()
+        lockStateTrackingRule.assertUnlockedAndTrusted()
     }
 
     @Test
@@ -86,6 +93,51 @@
     }
 
     @Test
+    @RequiresFlagsEnabled(android.security.Flags.FLAG_FIX_UNLOCKED_DEVICE_REQUIRED_KEYS)
+    fun grantCannotActivelyUnlockDevice() {
+        // On automotive, trust agents can actively unlock the device.
+        assumeFalse(packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE))
+
+        // Lock the device.
+        uiDevice.sleep()
+        lockStateTrackingRule.assertLocked()
+
+        // Grant trust.
+        trustAgentRule.agent.grantTrust(GRANT_MESSAGE, 10000, 0) {}
+
+        // The grant should not have unlocked the device.  Wait a bit so that
+        // TrustManagerService probably will have finished processing the grant.
+        await()
+        lockStateTrackingRule.assertLocked()
+
+        // Turn the screen on and off to cause TrustManagerService to refresh
+        // its deviceLocked state.  Then verify the state is still locked.  This
+        // part failed before the fix for b/296464083.
+        uiDevice.wakeUp()
+        uiDevice.sleep()
+        await()
+        lockStateTrackingRule.assertLocked()
+    }
+
+    @Test
+    @RequiresFlagsDisabled(android.security.Flags.FLAG_FIX_UNLOCKED_DEVICE_REQUIRED_KEYS)
+    fun grantCouldCauseWrongDeviceLockedStateDueToBug() {
+        // On automotive, trust agents can actively unlock the device.
+        assumeFalse(packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE))
+
+        // Verify that b/296464083 exists.  That is, when the device is locked
+        // and a trust agent grants trust, the deviceLocked state incorrectly
+        // becomes false even though the device correctly remains locked.
+        uiDevice.sleep()
+        lockStateTrackingRule.assertLocked()
+        trustAgentRule.agent.grantTrust(GRANT_MESSAGE, 10000, 0) {}
+        uiDevice.wakeUp()
+        uiDevice.sleep()
+        await()
+        lockStateTrackingRule.assertUnlockedButNotReally()
+    }
+
+    @Test
     fun grantDoesNotCallBack() {
         val callback = mock<(GrantTrustResult) -> Unit>()
         trustAgentRule.agent.grantTrust(GRANT_MESSAGE, 0, 0, callback)
diff --git a/tests/TrustTests/src/android/trust/test/TemporaryAndRenewableTrustTest.kt b/tests/TrustTests/src/android/trust/test/TemporaryAndRenewableTrustTest.kt
index ae72247..96362b8 100644
--- a/tests/TrustTests/src/android/trust/test/TemporaryAndRenewableTrustTest.kt
+++ b/tests/TrustTests/src/android/trust/test/TemporaryAndRenewableTrustTest.kt
@@ -102,7 +102,7 @@
         trustAgentRule.agent.grantTrust(
             GRANT_MESSAGE, 0, FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE) {}
 
-        lockStateTrackingRule.assertUnlocked()
+        lockStateTrackingRule.assertUnlockedAndTrusted()
     }
 
     @Test
@@ -125,7 +125,7 @@
             Log.i(TAG, "Callback received; status=${it.status}")
             result = it
         }
-        lockStateTrackingRule.assertUnlocked()
+        lockStateTrackingRule.assertUnlockedAndTrusted()
 
         wait("callback triggered") { result?.status == STATUS_UNLOCKED_BY_GRANT }
     }
diff --git a/tests/TrustTests/src/android/trust/test/lib/LockStateTrackingRule.kt b/tests/TrustTests/src/android/trust/test/lib/LockStateTrackingRule.kt
index c1a7bd9..5a8f828 100644
--- a/tests/TrustTests/src/android/trust/test/lib/LockStateTrackingRule.kt
+++ b/tests/TrustTests/src/android/trust/test/lib/LockStateTrackingRule.kt
@@ -16,6 +16,7 @@
 
 package android.trust.test.lib
 
+import android.app.KeyguardManager
 import android.app.trust.TrustManager
 import android.content.Context
 import android.util.Log
@@ -26,18 +27,23 @@
 import org.junit.runners.model.Statement
 
 /**
- * Rule for tracking the lock state of the device based on events emitted to [TrustListener].
+ * Rule for tracking the trusted state of the device based on events emitted to
+ * [TrustListener].  Provides helper methods for verifying that the trusted
+ * state has a particular value and is consistent with (a) the keyguard "locked"
+ * (i.e. showing) value when applicable, and (b) the device locked value that is
+ * tracked by TrustManagerService and is queryable via KeyguardManager.
  */
 class LockStateTrackingRule : TestRule {
     private val context: Context = getApplicationContext()
     private val windowManager = checkNotNull(WindowManagerGlobal.getWindowManagerService())
+    private val keyguardManager = context.getSystemService(KeyguardManager::class.java) as KeyguardManager
 
-    @Volatile lateinit var lockState: LockState
+    @Volatile lateinit var trustState: TrustState
         private set
 
     override fun apply(base: Statement, description: Description) = object : Statement() {
         override fun evaluate() {
-            lockState = LockState(locked = windowManager.isKeyguardLocked)
+            trustState = TrustState()
             val trustManager = context.getSystemService(TrustManager::class.java) as TrustManager
             val listener = Listener()
 
@@ -51,12 +57,25 @@
     }
 
     fun assertLocked() {
-        wait("un-locked per TrustListener") { lockState.locked == true }
-        wait("keyguard lock") { windowManager.isKeyguardLocked }
+        wait("device locked") { keyguardManager.isDeviceLocked }
+        // isDeviceLocked implies isKeyguardLocked && !trusted.
+        wait("keyguard locked") { windowManager.isKeyguardLocked }
+        wait("not trusted") { trustState.trusted == false }
     }
 
-    fun assertUnlocked() {
-        wait("locked per TrustListener") { lockState.locked == false }
+    // TODO(b/299298338) remove this when removing FLAG_FIX_UNLOCKED_DEVICE_REQUIRED_KEYS
+    fun assertUnlockedButNotReally() {
+        wait("device unlocked") { !keyguardManager.isDeviceLocked }
+        wait("not trusted") { trustState.trusted == false }
+        wait("keyguard locked") { windowManager.isKeyguardLocked }
+    }
+
+    fun assertUnlockedAndTrusted() {
+        wait("device unlocked") { !keyguardManager.isDeviceLocked }
+        wait("trusted") { trustState.trusted == true }
+        // Can't check for !isKeyguardLocked here, since isKeyguardLocked
+        // returns true in the case where the keyguard is dismissible with
+        // swipe, which is considered "device unlocked"!
     }
 
     inner class Listener : TestTrustListener() {
@@ -68,12 +87,12 @@
             trustGrantedMessages: MutableList<String>
         ) {
             Log.d(TAG, "Device became trusted=$enabled")
-            lockState = lockState.copy(locked = !enabled)
+            trustState = trustState.copy(trusted=enabled)
         }
     }
 
-    data class LockState(
-        val locked: Boolean? = null
+    data class TrustState(
+        val trusted: Boolean? = null
     )
 
     companion object {
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 0aaf3e8..82bcfc2 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -99,7 +99,7 @@
 
     String8 fullPath(root);
     appendPath(fullPath, String8(path));
-    FileType type = getFileType(fullPath);
+    FileType type = getFileType(fullPath.c_str());
 
     int plen = strlen(path);
 
@@ -287,19 +287,19 @@
         Vector<String8> subtags = AaptUtil::splitAndLowerCase(part, '+');
         subtags.removeItemsAt(0);
         if (subtags.size() == 1) {
-            setLanguage(subtags[0]);
+            setLanguage(subtags[0].c_str());
         } else if (subtags.size() == 2) {
-            setLanguage(subtags[0]);
+            setLanguage(subtags[0].c_str());
 
             // The second tag can either be a region, a variant or a script.
             switch (subtags[1].size()) {
                 case 2:
                 case 3:
-                    setRegion(subtags[1]);
+                    setRegion(subtags[1].c_str());
                     break;
                 case 4:
                     if (isAlpha(subtags[1])) {
-                        setScript(subtags[1]);
+                        setScript(subtags[1].c_str());
                         break;
                     }
                     // This is not alphabetical, so we fall through to variant
@@ -308,7 +308,7 @@
                 case 6:
                 case 7:
                 case 8:
-                    setVariant(subtags[1]);
+                    setVariant(subtags[1].c_str());
                     break;
                 default:
                     fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n",
@@ -317,14 +317,14 @@
             }
         } else if (subtags.size() == 3) {
             // The language is always the first subtag.
-            setLanguage(subtags[0]);
+            setLanguage(subtags[0].c_str());
 
             // The second subtag can either be a script or a region code.
             // If its size is 4, it's a script code, else it's a region code.
             if (subtags[1].size() == 4) {
-                setScript(subtags[1]);
+                setScript(subtags[1].c_str());
             } else if (subtags[1].size() == 2 || subtags[1].size() == 3) {
-                setRegion(subtags[1]);
+                setRegion(subtags[1].c_str());
             } else {
                 fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name %s\n", part.c_str());
                 return -1;
@@ -333,15 +333,15 @@
             // The third tag can either be a region code (if the second tag was
             // a script), else a variant code.
             if (subtags[2].size() >= 4) {
-                setVariant(subtags[2]);
+                setVariant(subtags[2].c_str());
             } else {
-                setRegion(subtags[2]);
+                setRegion(subtags[2].c_str());
             }
         } else if (subtags.size() == 4) {
-            setLanguage(subtags[0]);
-            setScript(subtags[1]);
-            setRegion(subtags[2]);
-            setVariant(subtags[3]);
+            setLanguage(subtags[0].c_str());
+            setScript(subtags[1].c_str());
+            setRegion(subtags[2].c_str());
+            setVariant(subtags[3].c_str());
         } else {
             fprintf(stderr, "ERROR: Invalid BCP 47 tag in directory name: %s\n", part.c_str());
             return -1;
@@ -351,7 +351,7 @@
     } else {
         if ((part.length() == 2 || part.length() == 3)
                && isAlpha(part) && strcmp("car", part.c_str())) {
-            setLanguage(part);
+            setLanguage(part.c_str());
             if (++currentIndex == size) {
                 return size;
             }
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 800466a..43a8b52 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -401,7 +401,7 @@
 Vector<String8> getNfcAidCategories(AssetManager& assets, const String8& xmlPath, bool offHost,
         String8 *outError = NULL)
 {
-    Asset* aidAsset = assets.openNonAsset(xmlPath, Asset::ACCESS_BUFFER);
+    Asset* aidAsset = assets.openNonAsset(xmlPath.c_str(), Asset::ACCESS_BUFFER);
     if (aidAsset == NULL) {
         if (outError != NULL) *outError = "xml resource does not exist";
         return Vector<String8>();
@@ -2760,7 +2760,7 @@
             appendPath(dependencyFile, "R.java.d");
         }
         // Make sure we have a clean dependency file to start with
-        fp = fopen(dependencyFile, "w");
+        fp = fopen(dependencyFile.c_str(), "w");
         fclose(fp);
     }
 
@@ -2849,7 +2849,7 @@
     if (bundle->getGenDependencies()) {
         // Now that writeResourceSymbols or writeAPK has taken care of writing
         // the targets to our dependency file, we'll write the prereqs
-        fp = fopen(dependencyFile, "a+");
+        fp = fopen(dependencyFile.c_str(), "a+");
         fprintf(fp, " : ");
         bool includeRaw = (outputAPKFile != NULL);
         err = writeDependencyPreReqs(bundle, assets, fp, includeRaw);
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 3a198fd..7e4e186 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -924,7 +924,7 @@
 
     if (bundle->getCompileSdkVersion() != 0) {
         if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersion",
-                    String8::format("%d", bundle->getCompileSdkVersion()),
+                    String8::format("%d", bundle->getCompileSdkVersion()).c_str(),
                     errorOnFailedInsert, true)) {
             return UNKNOWN_ERROR;
         }
@@ -932,21 +932,21 @@
 
     if (bundle->getCompileSdkVersionCodename() != "") {
         if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "compileSdkVersionCodename",
-                    bundle->getCompileSdkVersionCodename(), errorOnFailedInsert, true)) {
+                    bundle->getCompileSdkVersionCodename().c_str(), errorOnFailedInsert, true)) {
             return UNKNOWN_ERROR;
         }
     }
 
     if (bundle->getPlatformBuildVersionCode() != "") {
         if (!addTagAttribute(root, "", "platformBuildVersionCode",
-                    bundle->getPlatformBuildVersionCode(), errorOnFailedInsert, true)) {
+                    bundle->getPlatformBuildVersionCode().c_str(), errorOnFailedInsert, true)) {
             return UNKNOWN_ERROR;
         }
     }
 
     if (bundle->getPlatformBuildVersionName() != "") {
         if (!addTagAttribute(root, "", "platformBuildVersionName",
-                    bundle->getPlatformBuildVersionName(), errorOnFailedInsert, true)) {
+                    bundle->getPlatformBuildVersionName().c_str(), errorOnFailedInsert, true)) {
             return UNKNOWN_ERROR;
         }
     }
@@ -1210,7 +1210,7 @@
     sp<XMLNode> manifest = XMLNode::newElement(filename, String16(), String16("manifest"));
 
     // Add the 'package' attribute which is set to the package name.
-    const char* packageName = assets->getPackage();
+    const char* packageName = assets->getPackage().c_str();
     const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride();
     if (manifestPackageNameOverride != NULL) {
         packageName = manifestPackageNameOverride;
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 8d02683..1af8d6f 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -472,13 +472,13 @@
 
             ENCODE_LENGTH(strings, sizeof(uint8_t), encSize)
 
-            strncpy((char*)strings, encStr, encSize+1);
+            strncpy((char*)strings, encStr.c_str(), encSize + 1);
         } else {
             char16_t* strings = (char16_t*)dat;
 
             ENCODE_LENGTH(strings, sizeof(char16_t), strSize)
 
-            strcpy16_htod(strings, ent.value);
+            strcpy16_htod(strings, ent.value.c_str());
         }
 
         strPos += totalSize;
@@ -592,7 +592,7 @@
     ssize_t res = indices != NULL && indices->size() > 0 ? indices->itemAt(0) : -1;
     if (kIsDebug) {
         printf("Offset for string %s: %zd (%s)\n", String8(val).c_str(), res,
-                res >= 0 ? String8(mEntries[mEntryArray[res]].value).c_str() : String8());
+               res >= 0 ? String8(mEntries[mEntryArray[res]].value).c_str() : "");
     }
     return res;
 }
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index a887ac9..1a648c0 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -559,7 +559,7 @@
     root->removeWhitespace(stripAll, cDataTags);
 
     if (kIsDebug) {
-        printf("Input XML from %s:\n", (const char*)file->getPrintableSource());
+        printf("Input XML from %s:\n", file->getPrintableSource().c_str());
         root->print();
     }
     sp<AaptFile> rsc = new AaptFile(String8(), AaptGroupEntry(), String8());
diff --git a/tools/aapt/ZipEntry.cpp b/tools/aapt/ZipEntry.cpp
index 5339285..6886993 100644
--- a/tools/aapt/ZipEntry.cpp
+++ b/tools/aapt/ZipEntry.cpp
@@ -18,6 +18,8 @@
 // Access to entries in a Zip archive.
 //
 
+#define _POSIX_THREAD_SAFE_FUNCTIONS // For mingw localtime_r().
+
 #define LOG_TAG "zip"
 
 #include "ZipEntry.h"
@@ -337,39 +339,26 @@
 /*
  * Set the CDE/LFH timestamp from UNIX time.
  */
-void ZipEntry::setModWhen(time_t when)
-{
-#if !defined(_WIN32)
-    struct tm tmResult;
-#endif
-    time_t even;
-    unsigned short zdate, ztime;
-
-    struct tm* ptm;
-
+void ZipEntry::setModWhen(time_t when) {
     /* round up to an even number of seconds */
-    even = (time_t)(((unsigned long)(when) + 1) & (~1));
+    time_t even = (time_t)(((unsigned long)(when) + 1) & (~1));
 
     /* expand */
-#if !defined(_WIN32)
-    ptm = localtime_r(&even, &tmResult);
-#else
-    ptm = localtime(&even);
-#endif
+    struct tm tmResult;
+    struct tm* ptm = localtime_r(&even, &tmResult);
 
     int year;
     year = ptm->tm_year;
     if (year < 80)
         year = 80;
 
-    zdate = (year - 80) << 9 | (ptm->tm_mon+1) << 5 | ptm->tm_mday;
-    ztime = ptm->tm_hour << 11 | ptm->tm_min << 5 | ptm->tm_sec >> 1;
+    unsigned short zdate = (year - 80) << 9 | (ptm->tm_mon + 1) << 5 | ptm->tm_mday;
+    unsigned short ztime = ptm->tm_hour << 11 | ptm->tm_min << 5 | ptm->tm_sec >> 1;
 
     mCDE.mLastModFileTime = mLFH.mLastModFileTime = ztime;
     mCDE.mLastModFileDate = mLFH.mLastModFileDate = zdate;
 }
 
-
 /*
  * ===========================================================================
  *      ZipEntry::LocalFileHeader
diff --git a/tools/aapt/tests/AaptGroupEntry_test.cpp b/tools/aapt/tests/AaptGroupEntry_test.cpp
index bf5ca59..8621e9b 100644
--- a/tools/aapt/tests/AaptGroupEntry_test.cpp
+++ b/tools/aapt/tests/AaptGroupEntry_test.cpp
@@ -24,7 +24,7 @@
 
 static ::testing::AssertionResult TestParse(AaptGroupEntry& entry, const String8& dirName,
         String8* outType) {
-    if (entry.initFromDirName(dirName, outType)) {
+    if (entry.initFromDirName(dirName.c_str(), outType)) {
         return ::testing::AssertionSuccess() << dirName << " was successfully parsed";
     }
     return ::testing::AssertionFailure() << dirName << " could not be parsed";
diff --git a/tools/aapt2/DominatorTree_test.cpp b/tools/aapt2/DominatorTree_test.cpp
index a0679a6..087f456 100644
--- a/tools/aapt2/DominatorTree_test.cpp
+++ b/tools/aapt2/DominatorTree_test.cpp
@@ -50,8 +50,8 @@
  private:
   void VisitConfig(const DominatorTree::Node* node, const int indent) {
     auto config_string = node->value()->config.toString();
-    buffer_ << std::string(indent, ' ') << (config_string.empty() ? "<default>" : config_string)
-            << std::endl;
+    buffer_ << std::string(indent, ' ')
+            << (config_string.empty() ? "<default>" : config_string.c_str()) << std::endl;
   }
 
   void VisitNode(const DominatorTree::Node* node, const int indent) {
diff --git a/tools/aapt2/compile/InlineXmlFormatParser.h b/tools/aapt2/compile/InlineXmlFormatParser.h
index 4300023..3a5161b 100644
--- a/tools/aapt2/compile/InlineXmlFormatParser.h
+++ b/tools/aapt2/compile/InlineXmlFormatParser.h
@@ -21,8 +21,8 @@
 #include <vector>
 
 #include "android-base/macros.h"
-
 #include "process/IResourceTableConsumer.h"
+#include "xml/XmlDom.h"
 
 namespace aapt {
 
diff --git a/tools/aapt2/format/Archive_test.cpp b/tools/aapt2/format/Archive_test.cpp
index 3c44da7..fd50af9 100644
--- a/tools/aapt2/format/Archive_test.cpp
+++ b/tools/aapt2/format/Archive_test.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include <stdlib.h>
+
 #include "test/Test.h"
 
 namespace aapt {
@@ -34,6 +36,29 @@
   std::string error_;
 };
 
+class TzSetter {
+ public:
+  explicit TzSetter(const std::string& new_tz) {
+    old_tz_ = getenv("TZ");
+    new_tz_ = "TZ=" + new_tz;
+    putenv(const_cast<char*>(new_tz_.c_str()));
+    tzset();
+  }
+
+  ~TzSetter() {
+    if (old_tz_) {
+      putenv(old_tz_);
+    } else {
+      putenv(const_cast<char*>("TZ"));
+    }
+    tzset();
+  }
+
+ private:
+  char* old_tz_;
+  std::string new_tz_;
+};
+
 std::unique_ptr<uint8_t[]> MakeTestArray() {
   auto array = std::make_unique<uint8_t[]>(kTestDataLength);
   for (int index = 0; index < kTestDataLength; ++index) {
@@ -86,6 +111,22 @@
   }
 }
 
+void VerifyZipFileTimestamps(const std::string& output_path) {
+  std::unique_ptr<io::ZipFileCollection> zip = io::ZipFileCollection::Create(output_path, nullptr);
+  auto it = zip->Iterator();
+  while (it->HasNext()) {
+    auto file = it->Next();
+    struct tm modification_time;
+    ASSERT_TRUE(file->GetModificationTime(&modification_time));
+    EXPECT_EQ(modification_time.tm_year, 80);
+    EXPECT_EQ(modification_time.tm_mon, 0);
+    EXPECT_EQ(modification_time.tm_mday, 1);
+    EXPECT_EQ(modification_time.tm_hour, 0);
+    EXPECT_EQ(modification_time.tm_min, 0);
+    EXPECT_EQ(modification_time.tm_sec, 0);
+  }
+}
+
 TEST_F(ArchiveTest, DirectoryWriteEntrySuccess) {
   std::string output_path = GetTestPath("output");
   std::unique_ptr<IArchiveWriter> writer = MakeDirectoryWriter(output_path);
@@ -206,4 +247,73 @@
   ASSERT_EQ("ZipFileWriteFileError", writer->GetError());
 }
 
+TEST_F(ArchiveTest, ZipFileTimeZoneUTC) {
+  TzSetter tz("UTC0");
+  std::string output_path = GetTestPath("output.apk");
+  std::unique_ptr<IArchiveWriter> writer = MakeZipFileWriter(output_path);
+  std::unique_ptr<uint8_t[]> data1 = MakeTestArray();
+  std::unique_ptr<uint8_t[]> data2 = MakeTestArray();
+
+  ASSERT_TRUE(writer->StartEntry("test1", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data1.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  ASSERT_TRUE(writer->StartEntry("test2", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data2.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  writer.reset();
+
+  // All zip file entries must have the same timestamp, regardless of time zone. See: b/277978832
+  VerifyZipFileTimestamps(output_path);
+}
+
+TEST_F(ArchiveTest, ZipFileTimeZoneWestOfUTC) {
+  TzSetter tz("PST8");
+  std::string output_path = GetTestPath("output.apk");
+  std::unique_ptr<IArchiveWriter> writer = MakeZipFileWriter(output_path);
+  std::unique_ptr<uint8_t[]> data1 = MakeTestArray();
+  std::unique_ptr<uint8_t[]> data2 = MakeTestArray();
+
+  ASSERT_TRUE(writer->StartEntry("test1", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data1.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  ASSERT_TRUE(writer->StartEntry("test2", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data2.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  writer.reset();
+
+  // All zip file entries must have the same timestamp, regardless of time zone. See: b/277978832
+  VerifyZipFileTimestamps(output_path);
+}
+
+TEST_F(ArchiveTest, ZipFileTimeZoneEastOfUTC) {
+  TzSetter tz("EET-2");
+  std::string output_path = GetTestPath("output.apk");
+  std::unique_ptr<IArchiveWriter> writer = MakeZipFileWriter(output_path);
+  std::unique_ptr<uint8_t[]> data1 = MakeTestArray();
+  std::unique_ptr<uint8_t[]> data2 = MakeTestArray();
+
+  ASSERT_TRUE(writer->StartEntry("test1", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data1.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  ASSERT_TRUE(writer->StartEntry("test2", 0));
+  ASSERT_TRUE(writer->Write(static_cast<const void*>(data2.get()), kTestDataLength));
+  ASSERT_TRUE(writer->FinishEntry());
+  ASSERT_FALSE(writer->HadError());
+
+  writer.reset();
+
+  // All zip file entries must have the same timestamp, regardless of time zone. See: b/277978832
+  VerifyZipFileTimestamps(output_path);
+}
+
 }  // namespace aapt
diff --git a/tools/aapt2/io/File.h b/tools/aapt2/io/File.h
index 08d497d..673d1b7 100644
--- a/tools/aapt2/io/File.h
+++ b/tools/aapt2/io/File.h
@@ -57,6 +57,11 @@
     return false;
   }
 
+  // Fills in buf with the last modification time of the file. Returns true if successful,
+  // otherwise false (i.e., the operation is not supported or the file system is unable to provide
+  // a last modification time).
+  virtual bool GetModificationTime(struct tm* buf) const = 0;
+
  private:
   // Any segments created from this IFile need to be owned by this IFile, so
   // keep them
@@ -79,6 +84,10 @@
     return file_->GetSource();
   }
 
+  bool GetModificationTime(struct tm* buf) const override {
+    return file_->GetModificationTime(buf);
+  };
+
  private:
   DISALLOW_COPY_AND_ASSIGN(FileSegment);
 
diff --git a/tools/aapt2/io/FileSystem.cpp b/tools/aapt2/io/FileSystem.cpp
index a64982a..6a692e4 100644
--- a/tools/aapt2/io/FileSystem.cpp
+++ b/tools/aapt2/io/FileSystem.cpp
@@ -14,9 +14,12 @@
  * limitations under the License.
  */
 
+#define _POSIX_THREAD_SAFE_FUNCTIONS  // For mingw localtime_r().
+
 #include "io/FileSystem.h"
 
 #include <dirent.h>
+#include <sys/stat.h>
 
 #include "android-base/errors.h"
 #include "androidfw/Source.h"
@@ -54,6 +57,23 @@
   return source_;
 }
 
+bool RegularFile::GetModificationTime(struct tm* buf) const {
+  if (buf == nullptr) {
+    return false;
+  }
+  struct stat stat_buf;
+  if (stat(source_.path.c_str(), &stat_buf) != 0) {
+    return false;
+  }
+
+  struct tm* ptm;
+  struct tm tm_result;
+  ptm = localtime_r(&stat_buf.st_mtime, &tm_result);
+
+  *buf = *ptm;
+  return true;
+}
+
 FileCollectionIterator::FileCollectionIterator(FileCollection* collection)
     : current_(collection->files_.begin()), end_(collection->files_.end()) {}
 
diff --git a/tools/aapt2/io/FileSystem.h b/tools/aapt2/io/FileSystem.h
index 0e798fc..f975196 100644
--- a/tools/aapt2/io/FileSystem.h
+++ b/tools/aapt2/io/FileSystem.h
@@ -32,6 +32,7 @@
   std::unique_ptr<IData> OpenAsData() override;
   std::unique_ptr<io::InputStream> OpenInputStream() override;
   const android::Source& GetSource() const override;
+  bool GetModificationTime(struct tm* buf) const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(RegularFile);
diff --git a/tools/aapt2/io/ZipArchive.cpp b/tools/aapt2/io/ZipArchive.cpp
index 4a5385d..cb5bbe9 100644
--- a/tools/aapt2/io/ZipArchive.cpp
+++ b/tools/aapt2/io/ZipArchive.cpp
@@ -75,6 +75,14 @@
   return zip_entry_.method != kCompressStored;
 }
 
+bool ZipFile::GetModificationTime(struct tm* buf) const {
+  if (buf == nullptr) {
+    return false;
+  }
+  *buf = zip_entry_.GetModificationTime();
+  return true;
+}
+
 ZipFileCollectionIterator::ZipFileCollectionIterator(
     ZipFileCollection* collection)
     : current_(collection->files_.begin()), end_(collection->files_.end()) {}
diff --git a/tools/aapt2/io/ZipArchive.h b/tools/aapt2/io/ZipArchive.h
index c263aa4..ac125d0 100644
--- a/tools/aapt2/io/ZipArchive.h
+++ b/tools/aapt2/io/ZipArchive.h
@@ -38,6 +38,7 @@
   std::unique_ptr<io::InputStream> OpenInputStream() override;
   const android::Source& GetSource() const override;
   bool WasCompressed() override;
+  bool GetModificationTime(struct tm* buf) const override;
 
  private:
   ::ZipArchiveHandle zip_handle_;
diff --git a/tools/aapt2/test/Common.h b/tools/aapt2/test/Common.h
index 83a0f3f..e48668c 100644
--- a/tools/aapt2/test/Common.h
+++ b/tools/aapt2/test/Common.h
@@ -98,6 +98,10 @@
     return source_;
   }
 
+  bool GetModificationTime(struct tm* buf) const override {
+    return false;
+  };
+
  private:
   DISALLOW_COPY_AND_ASSIGN(TestFile);
 
diff --git a/tools/lint/common/Android.bp b/tools/lint/common/Android.bp
index 898f88b..8bfbfe5 100644
--- a/tools/lint/common/Android.bp
+++ b/tools/lint/common/Android.bp
@@ -27,3 +27,30 @@
     libs: ["lint_api"],
     kotlincflags: ["-Xjvm-default=all"],
 }
+
+java_defaults {
+    name: "AndroidLintCheckerTestDefaults",
+    srcs: ["checks/src/test/java/**/*.kt"],
+    static_libs: [
+        "junit",
+        "lint",
+        "lint_tests",
+    ],
+    test_options: {
+        unit_test: true,
+        tradefed_options: [
+            {
+                // lint bundles in some classes that were built with older versions
+                // of libraries, and no longer load. Since tradefed tries to load
+                // all classes in the jar to look for tests, it crashes loading them.
+                // Exclude these classes from tradefed's search.
+                name: "exclude-paths",
+                value: "org/apache",
+            },
+            {
+                name: "exclude-paths",
+                value: "META-INF",
+            },
+        ],
+    },
+}
diff --git a/tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/AidlImplementationDetector.kt b/tools/lint/common/src/main/java/com/google/android/lint/aidl/AidlImplementationDetector.kt
similarity index 100%
rename from tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/AidlImplementationDetector.kt
rename to tools/lint/common/src/main/java/com/google/android/lint/aidl/AidlImplementationDetector.kt
diff --git a/tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/Constants.kt b/tools/lint/common/src/main/java/com/google/android/lint/aidl/Constants.kt
similarity index 99%
rename from tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/Constants.kt
rename to tools/lint/common/src/main/java/com/google/android/lint/aidl/Constants.kt
index f1727b7..a18ed15 100644
--- a/tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/Constants.kt
+++ b/tools/lint/common/src/main/java/com/google/android/lint/aidl/Constants.kt
@@ -29,9 +29,10 @@
 const val BINDER_CLASS = "android.os.Binder"
 const val IINTERFACE_INTERFACE = "android.os.IInterface"
 
-const val AIDL_PERMISSION_HELPER_SUFFIX = "_enforcePermission"
 const val PERMISSION_PREFIX_LITERAL = "android.permission."
 
+const val AIDL_PERMISSION_HELPER_SUFFIX = "_enforcePermission"
+
 /**
  * If a non java (e.g. c++) backend is enabled, the @EnforcePermission
  * annotation cannot be used.  At time of writing, the mechanism
diff --git a/tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/EnforcePermissionUtils.kt b/tools/lint/common/src/main/java/com/google/android/lint/aidl/EnforcePermissionUtils.kt
similarity index 100%
rename from tools/lint/global/checks/src/main/java/com/google/android/lint/aidl/EnforcePermissionUtils.kt
rename to tools/lint/common/src/main/java/com/google/android/lint/aidl/EnforcePermissionUtils.kt
diff --git a/tools/lint/fix/soong_lint_fix.py b/tools/lint/fix/soong_lint_fix.py
index cd4d778d..acc0ad0 100644
--- a/tools/lint/fix/soong_lint_fix.py
+++ b/tools/lint/fix/soong_lint_fix.py
@@ -29,6 +29,39 @@
 PATH_SUFFIX = "android_common/lint"
 FIX_ZIP = "suggested-fixes.zip"
 
+
+class SoongModule:
+    """A Soong module to lint.
+
+    The constructor takes the name of the module (for example,
+    "framework-minus-apex"). find() must be called to extract the intermediate
+    module path from Soong's module-info.json
+    """
+    def __init__(self, name):
+        self._name = name
+
+    def find(self, module_info):
+        """Finds the module in the loaded module_info.json."""
+        if self._name not in module_info:
+            raise Exception(f"Module {self._name} not found!")
+
+        partial_path = module_info[self._name]["path"][0]
+        print(f"Found module {partial_path}/{self._name}.")
+        self._path = f"{PATH_PREFIX}/{partial_path}/{self._name}/{PATH_SUFFIX}"
+
+    @property
+    def name(self):
+        return self._name
+
+    @property
+    def lint_report(self):
+        return f"{self._path}/lint-report.txt"
+
+    @property
+    def suggested_fixes(self):
+        return f"{self._path}/{FIX_ZIP}"
+
+
 class SoongLintFix:
     """
     This class creates a command line tool that will
@@ -53,16 +86,14 @@
         self._parser = _setup_parser()
         self._args = None
         self._kwargs = None
-        self._path = None
-        self._target = None
+        self._modules = []
 
-
-    def run(self, additional_setup=None, custom_fix=None):
+    def run(self):
         """
         Run the script
         """
         self._setup()
-        self._find_module()
+        self._find_modules()
         self._lint()
 
         if not self._args.no_fix:
@@ -87,8 +118,6 @@
 
         os.chdir(ANDROID_BUILD_TOP)
 
-
-    def _find_module(self):
         print("Refreshing soong modules...")
         try:
             os.mkdir(ANDROID_PRODUCT_OUT)
@@ -97,48 +126,47 @@
         subprocess.call(f"{SOONG_UI} --make-mode {PRODUCT_OUT}/module-info.json", **self._kwargs)
         print("done.")
 
+
+    def _find_modules(self):
         with open(f"{ANDROID_PRODUCT_OUT}/module-info.json") as f:
             module_info = json.load(f)
 
-        if self._args.module not in module_info:
-            sys.exit(f"Module {self._args.module} not found!")
-
-        module_path = module_info[self._args.module]["path"][0]
-        print(f"Found module {module_path}/{self._args.module}.")
-
-        self._path = f"{PATH_PREFIX}/{module_path}/{self._args.module}/{PATH_SUFFIX}"
-        self._target = f"{self._path}/lint-report.txt"
-
+        for module_name in self._args.modules:
+            module = SoongModule(module_name)
+            module.find(module_info)
+            self._modules.append(module)
 
     def _lint(self):
         print("Cleaning up any old lint results...")
-        try:
-            os.remove(f"{self._target}")
-            os.remove(f"{self._path}/{FIX_ZIP}")
-        except FileNotFoundError:
-            pass
+        for module in self._modules:
+            try:
+                os.remove(f"{module.lint_report}")
+                os.remove(f"{module.suggested_fixes}")
+            except FileNotFoundError:
+                pass
         print("done.")
 
-        print(f"Generating {self._target}")
-        subprocess.call(f"{SOONG_UI} --make-mode {self._target}", **self._kwargs)
+        target = " ".join([ module.lint_report for module in self._modules ])
+        print(f"Generating {target}")
+        subprocess.call(f"{SOONG_UI} --make-mode {target}", **self._kwargs)
         print("done.")
 
-
     def _fix(self):
-        print("Copying suggested fixes to the tree...")
-        with zipfile.ZipFile(f"{self._path}/{FIX_ZIP}") as zip:
-            for name in zip.namelist():
-                if name.startswith("out") or not name.endswith(".java"):
-                    continue
-                with zip.open(name) as src, open(f"{ANDROID_BUILD_TOP}/{name}", "wb") as dst:
-                    shutil.copyfileobj(src, dst)
+        for module in self._modules:
+            print(f"Copying suggested fixes for {module.name} to the tree...")
+            with zipfile.ZipFile(f"{module.suggested_fixes}") as zip:
+                for name in zip.namelist():
+                    if name.startswith("out") or not name.endswith(".java"):
+                        continue
+                    with zip.open(name) as src, open(f"{ANDROID_BUILD_TOP}/{name}", "wb") as dst:
+                        shutil.copyfileobj(src, dst)
             print("done.")
 
-
     def _print(self):
-        print("### lint-report.txt ###", end="\n\n")
-        with open(self._target, "r") as f:
-            print(f.read())
+        for module in self._modules:
+            print(f"### lint-report.txt {module.name} ###", end="\n\n")
+            with open(module.lint_report, "r") as f:
+                print(f.read())
 
 
 def _setup_parser():
@@ -151,7 +179,8 @@
         **Gotcha**: You must have run `source build/envsetup.sh` and `lunch` first.
         """, formatter_class=argparse.RawTextHelpFormatter)
 
-    parser.add_argument('module',
+    parser.add_argument('modules',
+                        nargs='+',
                         help='The soong build module to run '
                              '(e.g. framework-minus-apex or services.core.unboosted)')
 
@@ -170,4 +199,4 @@
     return parser
 
 if __name__ == "__main__":
-    SoongLintFix().run()
\ No newline at end of file
+    SoongLintFix().run()
diff --git a/tools/lint/framework/Android.bp b/tools/lint/framework/Android.bp
index 30a6daa..5acdf43 100644
--- a/tools/lint/framework/Android.bp
+++ b/tools/lint/framework/Android.bp
@@ -37,28 +37,9 @@
 
 java_test_host {
     name: "AndroidFrameworkLintCheckerTest",
+    defaults: ["AndroidLintCheckerTestDefaults"],
     srcs: ["checks/src/test/java/**/*.kt"],
     static_libs: [
         "AndroidFrameworkLintChecker",
-        "junit",
-        "lint",
-        "lint_tests",
     ],
-    test_options: {
-        unit_test: true,
-        tradefed_options: [
-            {
-                // lint bundles in some classes that were built with older versions
-                // of libraries, and no longer load. Since tradefed tries to load
-                // all classes in the jar to look for tests, it crashes loading them.
-                // Exclude these classes from tradefed's search.
-                name: "exclude-paths",
-                value: "org/apache",
-            },
-            {
-                name: "exclude-paths",
-                value: "META-INF",
-            },
-        ],
-    },
 }
diff --git a/tools/lint/global/Android.bp b/tools/lint/global/Android.bp
index bedb7bd..3e74171 100644
--- a/tools/lint/global/Android.bp
+++ b/tools/lint/global/Android.bp
@@ -38,28 +38,9 @@
 
 java_test_host {
     name: "AndroidGlobalLintCheckerTest",
+    defaults: ["AndroidLintCheckerTestDefaults"],
     srcs: ["checks/src/test/java/**/*.kt"],
     static_libs: [
         "AndroidGlobalLintChecker",
-        "junit",
-        "lint",
-        "lint_tests",
     ],
-    test_options: {
-        unit_test: true,
-        tradefed_options: [
-            {
-                // lint bundles in some classes that were built with older versions
-                // of libraries, and no longer load. Since tradefed tries to load
-                // all classes in the jar to look for tests, it crashes loading them.
-                // Exclude these classes from tradefed's search.
-                name: "exclude-paths",
-                value: "org/apache",
-            },
-            {
-                name: "exclude-paths",
-                value: "META-INF",
-            },
-        ],
-    },
 }
diff --git a/tools/lint/utils/Android.bp b/tools/lint/utils/Android.bp
new file mode 100644
index 0000000..75e8d68
--- /dev/null
+++ b/tools/lint/utils/Android.bp
@@ -0,0 +1,45 @@
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "frameworks_base_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["frameworks_base_license"],
+}
+
+java_library_host {
+    name: "AndroidUtilsLintChecker",
+    srcs: ["checks/src/main/java/**/*.kt"],
+    plugins: ["auto_service_plugin"],
+    libs: [
+        "auto_service_annotations",
+        "lint_api",
+    ],
+    static_libs: [
+        "AndroidCommonLint",
+    ],
+    kotlincflags: ["-Xjvm-default=all"],
+}
+
+java_test_host {
+    name: "AndroidUtilsLintCheckerTest",
+    defaults: ["AndroidLintCheckerTestDefaults"],
+    srcs: ["checks/src/test/java/**/*.kt"],
+    static_libs: [
+        "AndroidUtilsLintChecker",
+    ],
+}
diff --git a/tools/lint/utils/checks/src/main/java/com/google/android/lint/AndroidUtilsIssueRegistry.kt b/tools/lint/utils/checks/src/main/java/com/google/android/lint/AndroidUtilsIssueRegistry.kt
new file mode 100644
index 0000000..fa61c42
--- /dev/null
+++ b/tools/lint/utils/checks/src/main/java/com/google/android/lint/AndroidUtilsIssueRegistry.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.android.lint
+
+import com.android.tools.lint.client.api.IssueRegistry
+import com.android.tools.lint.client.api.Vendor
+import com.android.tools.lint.detector.api.CURRENT_API
+import com.google.android.lint.aidl.AnnotatedAidlCounter
+import com.google.auto.service.AutoService
+
+@AutoService(IssueRegistry::class)
+@Suppress("UnstableApiUsage")
+class AndroidUtilsIssueRegistry : IssueRegistry() {
+    override val issues = listOf(
+        AnnotatedAidlCounter.ISSUE_ANNOTATED_AIDL_COUNTER,
+    )
+
+    override val api: Int
+        get() = CURRENT_API
+
+    override val minApi: Int
+        get() = 8
+
+    override val vendor: Vendor = Vendor(
+        vendorName = "Android",
+        feedbackUrl = "http://b/issues/new?component=315013",
+        contact = "tweek@google.com"
+    )
+}
diff --git a/tools/lint/utils/checks/src/main/java/com/google/android/lint/aidl/AnnotatedAidlCounter.kt b/tools/lint/utils/checks/src/main/java/com/google/android/lint/aidl/AnnotatedAidlCounter.kt
new file mode 100644
index 0000000..f0ec3f4
--- /dev/null
+++ b/tools/lint/utils/checks/src/main/java/com/google/android/lint/aidl/AnnotatedAidlCounter.kt
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.android.lint.aidl
+
+import com.android.tools.lint.detector.api.Category
+import com.android.tools.lint.detector.api.Context
+import com.android.tools.lint.detector.api.Implementation
+import com.android.tools.lint.detector.api.Issue
+import com.android.tools.lint.detector.api.JavaContext
+import com.android.tools.lint.detector.api.Location
+import com.android.tools.lint.detector.api.Scope
+import com.android.tools.lint.detector.api.Severity
+import org.jetbrains.uast.UBlockExpression
+import org.jetbrains.uast.UMethod
+
+import java.util.TreeMap
+
+/**
+ *  Count the number of AIDL interfaces. Reports the number of annotated and
+ *  non-annotated methods.
+ */
+@Suppress("UnstableApiUsage")
+class AnnotatedAidlCounter : AidlImplementationDetector() {
+
+    private data class Stat(
+        var unannotated: Int = 0,
+        var enforced: Int = 0,
+        var notRequired: Int = 0,
+    )
+
+    private var packagesStats: TreeMap<String, Stat> = TreeMap<String, Stat>()
+
+    override fun visitAidlMethod(
+            context: JavaContext,
+            node: UMethod,
+            interfaceName: String,
+            body: UBlockExpression
+    ) {
+        val packageName = context.uastFile?.packageName ?: "<unknown>"
+        var packageStat = packagesStats.getOrDefault(packageName, Stat())
+        when {
+            node.hasAnnotation(ANNOTATION_ENFORCE_PERMISSION) -> packageStat.enforced += 1
+            node.hasAnnotation(ANNOTATION_REQUIRES_NO_PERMISSION) -> packageStat.notRequired += 1
+            else -> packageStat.unannotated += 1
+        }
+        packagesStats.put(packageName, packageStat)
+        // context.driver.client.log(null, "%s.%s#%s".format(packageName, interfaceName, node.name))
+    }
+
+    override fun afterCheckRootProject(context: Context) {
+        var total = Stat()
+        for ((packageName, stat) in packagesStats) {
+            context.client.log(null, "package $packageName => $stat")
+            total.unannotated += stat.unannotated
+            total.enforced += stat.enforced
+            total.notRequired += stat.notRequired
+        }
+        val location = Location.create(context.project.dir)
+        context.report(
+            ISSUE_ANNOTATED_AIDL_COUNTER,
+            location,
+            "module ${context.project.name} => $total"
+        )
+    }
+
+    companion object {
+
+        @JvmField
+        val ISSUE_ANNOTATED_AIDL_COUNTER = Issue.create(
+                id = "AnnotatedAidlCounter",
+                briefDescription = "Statistics on the number of annotated AIDL methods.",
+                explanation = "",
+                category = Category.SECURITY,
+                priority = 5,
+                severity = Severity.INFORMATIONAL,
+                implementation = Implementation(
+                        AnnotatedAidlCounter::class.java,
+                        Scope.JAVA_FILE_SCOPE
+                ),
+        )
+    }
+}
diff --git a/tools/lint/utils/checks/src/test/java/com/google/android/lint/aidl/AnnotatedAidlCounterTest.kt b/tools/lint/utils/checks/src/test/java/com/google/android/lint/aidl/AnnotatedAidlCounterTest.kt
new file mode 100644
index 0000000..692b7da
--- /dev/null
+++ b/tools/lint/utils/checks/src/test/java/com/google/android/lint/aidl/AnnotatedAidlCounterTest.kt
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.android.lint.aidl
+
+import com.android.tools.lint.checks.infrastructure.LintDetectorTest
+import com.android.tools.lint.checks.infrastructure.TestFile
+import com.android.tools.lint.checks.infrastructure.TestLintTask
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Issue
+
+@Suppress("UnstableApiUsage")
+class AnnotatedAidlCounterTest : LintDetectorTest() {
+    override fun getDetector(): Detector = AnnotatedAidlCounter()
+
+    override fun getIssues(): List<Issue> = listOf(
+        AnnotatedAidlCounter.ISSUE_ANNOTATED_AIDL_COUNTER,
+    )
+
+    override fun lint(): TestLintTask = super.lint().allowMissingSdk(true)
+
+    /** No issue scenario */
+
+    fun testDoesNotDetectIssuesCorrectAnnotationOnMethod() {
+        lint().files(java(
+            """
+            package test.pkg;
+            import android.annotation.EnforcePermission;
+            public class TestClass2 extends IFooMethod.Stub {
+                @Override
+                @EnforcePermission(android.Manifest.permission.READ_PHONE_STATE)
+                public void testMethod() {}
+            }
+            """).indented(),
+                *stubs
+        )
+        .run()
+        .expect("""
+        app: Information: module app => Stat(unannotated=0, enforced=1, notRequired=0) [AnnotatedAidlCounter]
+        0 errors, 0 warnings
+        """)
+    }
+
+    // A service with permission annotation on the method.
+    private val interfaceIFooMethodStub: TestFile = java(
+        """
+        public interface IFooMethod extends android.os.IInterface {
+         public static abstract class Stub extends android.os.Binder implements IFooMethod {}
+          @android.annotation.EnforcePermission(android.Manifest.permission.READ_PHONE_STATE)
+          public void testMethod();
+        }
+        """
+    ).indented()
+
+    // A service without any permission annotation.
+    private val interfaceIBarStub: TestFile = java(
+        """
+        public interface IBar extends android.os.IInterface {
+         public static abstract class Stub extends android.os.Binder implements IBar {
+            @Override
+            public void testMethod() {}
+          }
+          public void testMethod();
+        }
+        """
+    ).indented()
+
+    private val manifestPermissionStub: TestFile = java(
+        """
+        package android.Manifest;
+        class permission {
+          public static final String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
+        }
+        """
+    ).indented()
+
+    private val enforcePermissionAnnotationStub: TestFile = java(
+        """
+        package android.annotation;
+        public @interface EnforcePermission {}
+        """
+    ).indented()
+
+    private val stubs = arrayOf(interfaceIFooMethodStub, interfaceIBarStub,
+            manifestPermissionStub, enforcePermissionAnnotationStub)
+}
diff --git a/tools/validatekeymaps/Main.cpp b/tools/validatekeymaps/Main.cpp
index 0fa13b8..70d875e 100644
--- a/tools/validatekeymaps/Main.cpp
+++ b/tools/validatekeymaps/Main.cpp
@@ -165,7 +165,7 @@
 
         case FileType::INPUT_DEVICE_CONFIGURATION: {
             android::base::Result<std::unique_ptr<PropertyMap>> propertyMap =
-                    PropertyMap::load(String8(filename));
+                    PropertyMap::load(String8(filename).c_str());
             if (!propertyMap.ok()) {
                 error("Error parsing input device configuration file: %s.\n\n",
                       propertyMap.error().message().c_str());
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..6bd8595
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..d5d6fb6
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..fe8dc69
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..ccd8a33
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/phone/light_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..de84c4a
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..af9d7cf
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/dark_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..33daab9
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_landscape_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png
new file mode 100644
index 0000000..14a799c
--- /dev/null
+++ b/vendor/unbundled_google/packages/SystemUIGoogle/tests/screenshotBiometrics/assets/tablet/light_portrait_credential_view_pin_or_password_emergency_call_button.png
Binary files differ
diff --git a/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java b/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
index d41c019..bc41829 100644
--- a/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
+++ b/wifi/java/src/android/net/wifi/sharedconnectivity/app/SharedConnectivityManager.java
@@ -23,9 +23,11 @@
 import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
 import android.annotation.TestApi;
+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.res.Resources;
 import android.net.wifi.sharedconnectivity.service.ISharedConnectivityCallback;
@@ -35,6 +37,7 @@
 import android.os.IBinder;
 import android.os.IInterface;
 import android.os.RemoteException;
+import android.os.UserManager;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -67,7 +70,7 @@
 @SystemApi
 public class SharedConnectivityManager {
     private static final String TAG = SharedConnectivityManager.class.getSimpleName();
-    private static final boolean DEBUG = true;
+    private static final boolean DEBUG = false;
 
     private static final class SharedConnectivityCallbackProxy extends
             ISharedConnectivityCallback.Stub {
@@ -172,6 +175,7 @@
     private final String mServicePackageName;
     private final String mIntentAction;
     private ServiceConnection mServiceConnection;
+    private UserManager mUserManager;
 
     /**
      * Creates a new instance of {@link SharedConnectivityManager}.
@@ -217,12 +221,14 @@
         mContext = context;
         mServicePackageName = servicePackageName;
         mIntentAction = serviceIntentAction;
+        mUserManager = context.getSystemService(UserManager.class);
     }
 
     private void bind() {
         mServiceConnection = new ServiceConnection() {
             @Override
             public void onServiceConnected(ComponentName name, IBinder service) {
+                if (DEBUG) Log.i(TAG, "onServiceConnected");
                 mService = ISharedConnectivityService.Stub.asInterface(service);
                 synchronized (mProxyDataLock) {
                     if (!mCallbackProxyCache.isEmpty()) {
@@ -253,9 +259,45 @@
             }
         };
 
-        mContext.bindService(
+        boolean result = mContext.bindService(
                 new Intent().setPackage(mServicePackageName).setAction(mIntentAction),
                 mServiceConnection, Context.BIND_AUTO_CREATE);
+        if (!result) {
+            if (DEBUG) Log.i(TAG, "bindService failed");
+            mServiceConnection = null;
+            if (mUserManager != null && !mUserManager.isUserUnlocked()) {  // In direct boot mode
+                IntentFilter intentFilter = new IntentFilter();
+                intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
+                mContext.registerReceiver(mBroadcastReceiver, intentFilter);
+            } else {
+                synchronized (mProxyDataLock) {
+                    if (!mCallbackProxyCache.isEmpty()) {
+                        mCallbackProxyCache.keySet().forEach(
+                                callback -> callback.onRegisterCallbackFailed(
+                                        new IllegalStateException(
+                                                "Failed to bind after user unlock")));
+                        mCallbackProxyCache.clear();
+                    }
+                }
+            }
+        }
+    }
+
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            context.unregisterReceiver(mBroadcastReceiver);
+            bind();
+        }
+    };
+
+    /**
+     * @hide
+     */
+    @TestApi
+    @NonNull
+    public BroadcastReceiver getBroadcastReceiver() {
+        return mBroadcastReceiver;
     }
 
     private void registerCallbackInternal(SharedConnectivityClientCallback callback,
@@ -357,6 +399,13 @@
             return false;
         }
 
+        // Try to unregister the broadcast receiver to guard against memory leaks.
+        try {
+            mContext.unregisterReceiver(mBroadcastReceiver);
+        } catch (IllegalArgumentException e) {
+            // This is fine, it means the receiver was never registered or was already unregistered.
+        }
+
         if (mService == null) {
             boolean shouldUnbind;
             synchronized (mProxyDataLock) {